]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ensure killtcp structure is initialised
authorAndrew Tridgell <tridge@samba.org>
Fri, 13 Jul 2007 01:55:58 +0000 (11:55 +1000)
committerAndrew Tridgell <tridge@samba.org>
Fri, 13 Jul 2007 01:55:58 +0000 (11:55 +1000)
(This used to be ctdb commit 2fe7d1ce87e55e125411e7406a9e00b8f55e3cb7)

ctdb/server/ctdb_takeover.c

index a4536e1c9dc53cace23c0a7c7528115c7d3bd8b0..72774628169ae34c4316d09c26822492dab0cd74 100644 (file)
@@ -908,7 +908,8 @@ static void capture_tcp_handler(struct event_context *ev, struct fd_event *fde,
 }
 
 
-/* called every second until all sentenced connections have been reset
+/* 
+   called every second until all sentenced connections have been reset
  */
 static void ctdb_tickle_sentenced_connections(struct event_context *ev, struct timed_event *te, 
                                              struct timeval t, void *private_data)
@@ -976,7 +977,7 @@ static int ctdb_killtcp_add_connection(struct ctdb_context *ctdb,
           a new structure
         */
        if (killtcp == NULL) {
-               killtcp = talloc(ctdb, struct ctdb_kill_tcp);
+               killtcp = talloc_zero(ctdb, struct ctdb_kill_tcp);
                CTDB_NO_MEMORY(ctdb, killtcp);
 
                killtcp->ctdb        = ctdb;
@@ -1027,7 +1028,7 @@ static int ctdb_killtcp_add_connection(struct ctdb_context *ctdb,
                /* We also need to set up some events to tickle all these connections
                   until they are all reset
                */
-               event_add_timed(ctdb->ev, killtcp, timeval_current_ofs(0, 0), 
+               event_add_timed(ctdb->ev, killtcp, timeval_zero(), 
                                ctdb_tickle_sentenced_connections, killtcp);
        }