Skip to content

Commit

Permalink
fix for event drop notification
Browse files Browse the repository at this point in the history
svn path=/trunk/yarp2/; revision=7080
  • Loading branch information
paulfitz committed Jan 20, 2009
1 parent 2d14525 commit b6a1fef
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 deletions.
2 changes: 1 addition & 1 deletion AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
12 changes: 12 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
2009-01-20 Paul Fitzpatrick <[email protected]>

* 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 <[email protected]>
* conf/FindGthread.cmake
* conf/YarpReqLib.cmake
Expand Down
2 changes: 1 addition & 1 deletion src/libYARP_OS/include/yarp/os/impl/Protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
7 changes: 6 additions & 1 deletion src/libYARP_OS/src/PortCoreOutputUnit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit b6a1fef

Please sign in to comment.