dont even try to send a message from the main daemon if the transport is down
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Tue, 30 Jun 2009 02:09:28 +0000 (12:09 +1000)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Mon, 27 Jul 2009 03:07:03 +0000 (13:07 +1000)
server/ctdb_daemon.c

index 861c90c851b6e9fe31366ef756c89a535719f024..1a94cfc661ba60f037e5df8a65d0a146ed0177fc 100644 (file)
@@ -1000,6 +1000,11 @@ int ctdb_daemon_send_message(struct ctdb_context *ctdb, uint32_t pnn,
        struct ctdb_req_message *r;
        int len;
 
+       if (ctdb->methods == NULL) {
+               DEBUG(DEBUG_ERR,(__location__ " Failed to send message. Transport is DOWN\n"));
+               return -1;
+       }
+
        /* see if this is a message to ourselves */
        if (pnn == ctdb->pnn) {
                return ctdb_local_message(ctdb, srvid, data);