LibCTDB : initialize ctdb->pnn to -1 when we create a new context
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Tue, 23 Aug 2011 06:15:34 +0000 (16:15 +1000)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Tue, 23 Aug 2011 06:15:34 +0000 (16:15 +1000)
but before we learn the pnn of the local node

libctdb/ctdb.c

index e407910a30761f7c18a785c87ffa6a834082f4de..98c86f600db60e6d317eb85e1d17761beddc25e5 100644 (file)
@@ -151,6 +151,7 @@ struct ctdb_connection *ctdb_connect(const char *addr,
                log_fn(log_priv, LOG_ERR, "ctdb_connect: no memory", ap);
                goto fail;
        }
+       ctdb->pnn = -1;
        ctdb->outq = NULL;
        ctdb->doneq = NULL;
        ctdb->in = NULL;