From 22fb69d337c39312b44af8c03f41342caaf98d89 Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Tue, 30 Jun 2009 11:55:42 +1000 Subject: [PATCH] dont even try to allocate a packet if the transport is down since it will fail (This used to be ctdb commit a73f316cb9cec877dc0bc3f7baa21be1b1454273) --- ctdb/server/ctdb_call.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ctdb/server/ctdb_call.c b/ctdb/server/ctdb_call.c index ca6fba7c649..5e7261c1201 100644 --- a/ctdb/server/ctdb_call.c +++ b/ctdb/server/ctdb_call.c @@ -663,6 +663,11 @@ struct ctdb_call_state *ctdb_daemon_call_send_remote(struct ctdb_db_context *ctd struct ctdb_call_state *state; struct ctdb_context *ctdb = ctdb_db->ctdb; + if (ctdb->methods == NULL) { + DEBUG(DEBUG_ERR,(__location__ " Failed send packet. Transport is down\n")); + return NULL; + } + state = talloc_zero(ctdb_db, struct ctdb_call_state); CTDB_NO_MEMORY_NULL(ctdb, state); state->call = talloc(state, struct ctdb_call);