diff --git a/AUTHORS b/AUTHORS index bc9777f5b6f..69209659de3 100644 --- a/AUTHORS +++ b/AUTHORS @@ -23,7 +23,7 @@ Jose Gaspar (helped modify example/external/nameclient.cpp example for windows) Claudio Castellini (useful bug reports, drivers, QUICKSTART documentation) Michael Bucko (sig::yarp::draw fixes, bug reports) Nelson Gon\c calves (testing and patch for SWIG, Java, Matlab on MINGW) -Marco Barbosa (64-bit linux bug fix) +Marco Barbosa (64-bit linux bug fix, report of event notification problem) Tomassino Ferrauto (patches to Bottle implementation; shmem bug tracking) Boris Duran (patches for SWIG for motor control classes) Mattia Castelnovi (a bunch of drivers) diff --git a/ChangeLog b/ChangeLog index 29d362d3fba..9b422448b6d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2009-01-20 Paul Fitzpatrick + + * src/libYARP_OS/src/PortCoreOutputUnit.cpp: when a message fails + to be written because the carrier has dropped, then break the + connection. (Occasional messaging problems in unreliable + protocols like udp/mcast should not lead to a dropped carrier. + This is a fix for the "Port disconnect event problem" reported by + Marco Barbosa on robotcub-hackers mailing list. + + * src/libYARP_OS/include/yarp/os/impl/Protocol.h: propagate + failure of communication to deactivation of carrier. + 2009-01-08 Lorenzo Natale * conf/FindGthread.cmake * conf/YarpReqLib.cmake diff --git a/src/libYARP_OS/include/yarp/os/impl/Protocol.h b/src/libYARP_OS/include/yarp/os/impl/Protocol.h index 64ca753d539..307a86eab74 100644 --- a/src/libYARP_OS/include/yarp/os/impl/Protocol.h +++ b/src/libYARP_OS/include/yarp/os/impl/Protocol.h @@ -392,7 +392,7 @@ class yarp::os::impl::Protocol : public OutputProtocol, public InputProtocol { virtual bool isActive() { YARP_ASSERT(delegate!=NULL); - return delegate->isActive(); + return delegate->isActive() && checkStreams(); } virtual bool isTextMode() { diff --git a/src/libYARP_OS/src/PortCoreOutputUnit.cpp b/src/libYARP_OS/src/PortCoreOutputUnit.cpp index 2b8fc796cb7..e1a79f76ce8 100644 --- a/src/libYARP_OS/src/PortCoreOutputUnit.cpp +++ b/src/libYARP_OS/src/PortCoreOutputUnit.cpp @@ -288,7 +288,12 @@ void PortCoreOutputUnit::sendHelper() { } } if (!done) { - op->write(buf); + if (op->isActive()) { + op->write(buf); + } + if (!op->isActive()) { + done = true; + } } } if (done) {