dont try to send error packets if the transport is down
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Tue, 30 Jun 2009 02:10:27 +0000 (12:10 +1000)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Mon, 27 Jul 2009 03:07:25 +0000 (13:07 +1000)
server/ctdb_call.c

index 5e7261c12014167ce8824639e867bbef9c3aeaac..0df411e777db576ff817ca903f79a67cb262f6e7 100644 (file)
@@ -69,6 +69,11 @@ static void ctdb_send_error(struct ctdb_context *ctdb,
        char *msg;
        int msglen, len;
 
+       if (ctdb->methods == NULL) {
+               DEBUG(DEBUG_ERR,(__location__ " Failed to send error. Transport is DOWN\n"));
+               return -1;
+       }
+
        va_start(ap, fmt);
        msg = talloc_vasprintf(ctdb, fmt, ap);
        if (msg == NULL) {