Date: Tuesday, April 24, 2007 @ 17:55:41
  Author: gilles
    Path: /cvsroot/carob/carob/test

Modified: ConnectionSetup.cpp (1.21 -> 1.22)

In teardown(), avoid testing of connections that could not be created properly 
(was leading to segfaults)


---------------------+
 ConnectionSetup.cpp |    7 +++++++
 1 files changed, 7 insertions(+)


Index: carob/test/ConnectionSetup.cpp
diff -u carob/test/ConnectionSetup.cpp:1.21 carob/test/ConnectionSetup.cpp:1.22
--- carob/test/ConnectionSetup.cpp:1.21 Tue Feb  6 15:57:34 2007
+++ carob/test/ConnectionSetup.cpp      Tue Apr 24 17:55:41 2007
@@ -126,6 +126,13 @@
 
 void ConnectionSetup::tearDown()
 {
+  if (connectionPtr == NULL)
+  {
+    // the connection failed => we don't want to test it and we need a new one.
+    lastConnection = NULL;
+    return;
+  }
+
   testConnection();
 
   if (reuseConnection)

_______________________________________________
Carob-commits mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/carob-commits

Reply via email to