[Bug 527] New: Can not connect ports using only IDL interface

For more infomation about this bug, visit
Summary: Can not connect ports using only IDL interface
Product: RTT
Version: 1.4.0
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Corba
AssignedTo: orocos-dev [..] ...
ReportedBy: peter [dot] soetens [..] ...
CC: orocos-dev [..] ...
Estimated Hours: 0.0

Created an attachment (id=249)
--> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=249)
adds idl methods for connecting ports

The ControlTask.idl file does not have the connectPorts() function,
to connect all ports of two components.
Also, there are no IDL functions to connect two data or buffer ports
from the DataFlowInterface idl.

The work-around is using ControlTaskServer and ControlTaskProxy, but the patch
in attachment tries to fix this issue correctly.

[Bug 527] Can not connect ports using only IDL interface

For more infomation about this bug, visit

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

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

--- Comment #6 from Peter Soetens
<peter [dot] soetens [..] ...> 2008-04-15 23:11:35 ---
This CORBA bug has been fixed and code was improved in fixes for bug #532.

[Bug 527] Can not connect ports using only IDL interface

For more infomation about this bug, visit

--- Comment #5 from Peter Soetens
<peter [dot] soetens [..] ...> 2008-03-17 15:05:42 ---
For the record, this bug was initiated, traced and fixed by Sylvain Joyeux.

[Bug 527] Can not connect ports using only IDL interface

For more infomation about this bug, visit

--- Comment #4 from Peter Soetens
<peter [dot] soetens [..] ...> 2008-03-17 14:55:00 ---
OMG !

$ svn di src/corba/
Index: src/corba/CorbaPort.hpp
===================================================================
--- src/corba/CorbaPort.hpp (revision 29069)
+++ src/corba/CorbaPort.hpp (working copy)
@@ -163,6 +163,10 @@
log(Error) << "Can not create remote port connection without local
port." < return 0;
}
+
+ virtual int serverProtocol() const {
+ return ORO_CORBA_PROTOCOL_ID;
+ }
};

}}
+ sspr@lt00129:~/src/Orocos/trunk/rtt
$ svn ci src/corba -m"Fix for bug #527: Can not connect ports using only IDL
interface. CorbaPort did not implement serverProtocol, hence, the
ConnectionFactory thought it was a local port."
Sending src/corba/CorbaPort.hpp
Transmitting file data .
Committed revision 29075.

[Bug 527] Can not connect ports using only IDL interface

For more infomation about this bug, visit

--- Comment #3 from Peter Soetens
<peter [dot] soetens [..] ...> 2008-03-17 13:55:06 ---
This additional patch fixes some possible null-pointer crashes. Applied on
trunk.

$ svn di
Index: corba/DataFlowI.cpp
===================================================================
--- corba/DataFlowI.cpp (revision 29069)
+++ corba/DataFlowI.cpp (working copy)
@@ -125,7 +125,8 @@
if ( p->connected() == false) {
ci = p->createConnection();
// A newly created connection starts unconnected.
- ci->connect();
+ if (ci)
+ ci->connect();
} else {
ci = p->connection();
}
@@ -160,7 +161,8 @@
if ( p->connected() == false) {
ci = p->createConnection();
// A newly created connection starts unconnected.
- ci->connect();
+ if (ci)
+ ci->connect();
} else {
ci = p->connection();
}
@@ -269,9 +271,11 @@
// Create a helper proxy object and use the common C++ calls to connect to
that proxy.
::RTT::Corba::CorbaPort cport( port_name, _this(), data,
ControlTaskProxy::ProxyPOA() ) ;
ConnectionInterface::shared_ptr ci = cport.createConnection( p );
- if (ci)
+ if (ci) {
ci->connect();
- return ci->connected();
+ return ci->connected();
+ }
+ return 0;
}

CORBA::Boolean RTT_Corba_DataFlowInterface_i::connectBufferPort (
@@ -288,8 +292,10 @@
// Create a helpr proxy object and use the common C++ calls to connect to
that proxy.
::RTT::Corba::CorbaPort cport( port_name, _this(), buffer,
ControlTaskProxy::ProxyPOA() ) ;
ConnectionInterface::shared_ptr ci = cport.createConnection(p);
- if (ci)
+ if (ci) {
ci->connect();
- return ci->connected();
+ return ci->connected();
+ }
+ return 0;
}

+ sspr@lt00129:~/src/Orocos/trunk/rtt/src
$ svn ci corba/ -m"Fix crash when ci is null in createBuffer/DataPort."
Sending corba/DataFlowI.cpp
Transmitting file data .
Committed revision 29073.

[Bug 527] Can not connect ports using only IDL interface

For more infomation about this bug, visit

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

What |Removed |Added
--------------------------------------------------------------------------
Target Milestone|--- |1.6.0

--- Comment #2 from Peter Soetens
<peter [dot] soetens [..] ...> 2008-03-17 10:48:24 ---
Committed on trunk/rtt:

$ svn ci src/corba/ -m"Fix bug #527: Can not connect ports using only IDL
interface. Patch applied but requires unit tests."
Sending src/corba/ControlTask.idl
Sending src/corba/ControlTaskI.cpp
Sending src/corba/ControlTaskI.h
Sending src/corba/CorbaPort.hpp
Sending src/corba/DataFlow.idl
Sending src/corba/DataFlowI.cpp
Sending src/corba/DataFlowI.h
Transmitting file data .......
Committed revision 29069.

[Bug 527] Can not connect ports using only IDL interface

For more infomation about this bug, visit

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

What |Removed |Added
--------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|orocos- |peter [dot] soetens [..] ...
|dev [..] ... |
Attachment #249 is|0 |1
obsolete| |

--- Comment #1 from Peter Soetens
<peter [dot] soetens [..] ...> 2008-03-17 10:17:22 ---
Created an attachment (id=250)
--> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=250)
Fixes typo in previous patch