if we fail a dmaster migration due to the transport being down, then that is a fatal...
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Tue, 30 Jun 2009 02:13:15 +0000 (12:13 +1000)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Mon, 27 Jul 2009 03:07:46 +0000 (13:07 +1000)
server/ctdb_call.c

index 0df411e777db576ff817ca903f79a67cb262f6e7..908c77c8256eb41fc011684622650a943e04db5b 100644 (file)
@@ -71,7 +71,7 @@ static void ctdb_send_error(struct ctdb_context *ctdb,
 
        if (ctdb->methods == NULL) {
                DEBUG(DEBUG_ERR,(__location__ " Failed to send error. Transport is DOWN\n"));
-               return -1;
+               return;
        }
 
        va_start(ap, fmt);
@@ -146,7 +146,12 @@ static void ctdb_send_dmaster_reply(struct ctdb_db_context *ctdb_db,
        header->dmaster = new_dmaster;
        ret = ctdb_ltdb_store(ctdb_db, key, header, data);
        if (ret != 0) {
-               ctdb_fatal(ctdb, "ctdb_req_dmaster unable to update dmaster");
+               ctdb_fatal(ctdb, "ctdb_send_dmaster_reply unable to update dmaster");
+               return;
+       }
+
+       if (ctdb->methods == NULL) {
+               ctdb_fatal(ctdb, "ctdb_send_dmaster_reply cant update dmaster sicne transport is down");
                return;
        }