[Bug 595] New: patch: configureComponents()

For more infomation about this bug, visit
Summary: patch: configureComponents()
Product: OCL
Version: 1.6.0
Platform: All
OS/Version: All
Status: NEW
Severity: minor
Priority: P2
Component: Deployment
AssignedTo: orocos-dev [..] ...
ReportedBy: davide [dot] faconti [..] ...
CC: orocos-dev [..] ...
Estimated Hours: 0.0

Created an attachment (id=352)
--> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=352)
patch to configureComnents

There are two bugs actually.
First, multiple items in ComponentsMap are generated if you call
loadComponents(..) twice.
This will make fail the operation configureComponents() and, consequently, it
will make impossible to startComponents().

The second bug is a failure if you try to call configureComponents twice. If
you try to configure twice a peer, just give a warning, but don't set
valid=false.
Attached you find the patch-
EXTRA: I have defined the following pointers to improve readability.

ConnectionData *connection = &(it->second);
std::string connection_name = it->first;

[Bug 595] patch: configureComponents()

https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=595

Peter Soetens <peter [..] ...> changed:

What |Removed |Added
----------------------------------------------------------------------------
Resolution| |FIXED
Status|ASSIGNED |RESOLVED

--- Comment #4 from Peter Soetens <peter [..] ...> 2009-06-21 21:58:50 ---
This was fixed in OCL 1.8.0

[Bug 595] patch: configureComponents()

For more infomation about this bug, visit

--- Comment #3 from Peter Soetens
<peter [dot] soetens [..] ...> 2008-12-03 18:01:49 ---
I tested this and came to the conclusion that if you first kickout a single
component
and then reload it with a kickstart("single-component.cpf") the process halts
when you have listed ports (before).
The deployer's Valid property becomes false if ports are already connected...
How do you
cope with that ?

Peter

[Bug 595] patch: configureComponents()

For more infomation about this bug, visit

--- Comment #2 from Peter Soetens
<peter [dot] soetens [..] ...> 2008-12-03 17:46:41 ---
Just another note: the patch had TABs instead of spaces, so I had to re-indent
all your modifications. Futhermore, I would change two things:

1. AutoConf: Also configure when already configured:
@ -928,13 +928,13 @@ namespace OCL
// AutoConf
if (comps[comp.getName()].autoconf )
{
- if( !peer->isConfigured() || !peer->isRunning() )
+ if( !peer->isActive() )
{
if ( peer->configure() == false)
valid = false;
}
}
.
2. Remove the following dead code:

- while (p != connection->ports.end() )
- {
- (*p)->getName();
- ++p;
- }

It was probably there for testing ?

[Bug 595] patch: configureComponents()

For more infomation about this bug, visit

Peter Soetens
<peter [dot] soetens [..] ...> changed:

What |Removed |Added
--------------------------------------------------------------------------
Status|NEW |ASSIGNED
CC| |peter [dot] soetens [..] ...
Target Milestone|--- |1.6.1

--- Comment #1 from Peter Soetens
<peter [dot] soetens [..] ...> 2008-11-14 12:43:07 ---
(In reply to comment #0)
> Created an attachment (id=352)
--> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=352) [details]

The patch is 'inverted', you compared new->old, while you should have done
old->new.

so do diff -Naur deployment_original/ deployment/ > config_components.patch

How does this patch compare to the changes I proposed earlier on the mailing
list ?

Peter

[Bug 595] patch: configureComponents()

At 13:08 14/11/2008, you wrote:
>Sorry for the inverted patch.

Also, your patch did not include the changes in
DeploymentComponent.hpp. Using diff -Naur old/ new/ > fixes.patch
you get the complete patch of all files.

>
>
>How does this patch compare to the changes I proposed earlier on the
>mailing list ?
>
>Which post of the mailing list are you talking about? Please tell me
>the link or the title of the post.
>Anyway, according to our previous e-mails, I believe that there was
>still the problem of multiple items in conmap.

Ok, I meant the unloadComponentImpl. Aparantly, I did not post this
to the mailing list, but only to you in private :-]
So it all looks as it should be.

Could you 'reply-to-all' in order to keep the discussion on the
mailinglist ? Thanks !

Peter