Date: Friday, April 6, 2007 @ 17:45:38
Author: gilles
Path: /cvsroot/carob/carob
Modified: include/JavaSocket.hpp (1.47 -> 1.48) src/Connection.cpp (1.115
-> 1.116)
Flush socket after connection establishement to finalize connection at the
controller side
Had to define an empty flush() in JavaSocket for the case buffered sockets are
disabled
Fixes CAROB-137
------------------------+
include/JavaSocket.hpp | 4 ++++
src/Connection.cpp | 2 ++
2 files changed, 6 insertions(+)
Index: carob/include/JavaSocket.hpp
diff -u carob/include/JavaSocket.hpp:1.47 carob/include/JavaSocket.hpp:1.48
--- carob/include/JavaSocket.hpp:1.47 Thu Mar 1 12:36:03 2007
+++ carob/include/JavaSocket.hpp Fri Apr 6 17:45:37 2007
@@ -165,6 +165,10 @@
*/
void shutdown() { canceled = true; }
/**
+ * No op, we are not buffered
+ */
+ void flush() const throw (SocketIOException,
UnexpectedException) {};
+ /**
* Execute poll (or select depending on compilation flag CAROB_USE_SELECT) on
* the given file descriptor and return after either data is ready to be read
* or given timeout is elapsed
Index: carob/src/Connection.cpp
diff -u carob/src/Connection.cpp:1.115 carob/src/Connection.cpp:1.116
--- carob/src/Connection.cpp:1.115 Thu Mar 1 12:36:03 2007
+++ carob/src/Connection.cpp Fri Apr 6 17:45:37 2007
@@ -230,6 +230,8 @@
*driverSocketPtr<<parameters.getUserName();
*driverSocketPtr<<parameters.getUserPass();
finalizeConnect();
+ // finalize also at the controller side by flushing data (see CAROB-137)
+ driverSocketPtr->flush();
}
catch (ConnectionException connExcpt)
{
_______________________________________________
Carob-commits mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/carob-commits