Tiny simplification of ctdb_queue_packet()
authorVolker Lendecke <vl@samba.org>
Wed, 9 Dec 2009 16:20:23 +0000 (17:20 +0100)
committerMichael Adam <obnox@samba.org>
Fri, 11 Dec 2009 23:45:38 +0000 (00:45 +0100)
server/ctdb_server.c

index 3ccbee75bb6d56d50d7571da697f465eeaee1b0c..ce109532e6f08999e2334f585dd77c693be66ea0 100644 (file)
@@ -583,16 +583,18 @@ void ctdb_queue_packet(struct ctdb_context *ctdb, struct ctdb_req_header *hdr)
 
        if (node->pnn == ctdb->pnn) {
                ctdb_defer_packet(ctdb, hdr);
-       } else {
-               if (ctdb->methods == NULL) {
-                       DEBUG(DEBUG_ALERT, (__location__ " Can not queue packet. Transport is DOWN\n"));
-                       return;
-               }
+               return;
+       }
 
-               node->tx_cnt++;
-               if (ctdb->methods->queue_pkt(node, (uint8_t *)hdr, hdr->length) != 0) {
-                       ctdb_fatal(ctdb, "Unable to queue packet\n");
-               }
+       if (ctdb->methods == NULL) {
+               DEBUG(DEBUG_ALERT, (__location__ " Can not queue packet. "
+                                   "Transport is DOWN\n"));
+               return;
+       }
+
+       node->tx_cnt++;
+       if (ctdb->methods->queue_pkt(node, (uint8_t *)hdr, hdr->length) != 0) {
+               ctdb_fatal(ctdb, "Unable to queue packet\n");
        }
 }