Properly use the timeout_initialized() macro.
authorGuus Sliepen <guus@tinc-vpn.org>
Thu, 17 May 2007 22:17:24 +0000 (22:17 +0000)
committerGuus Sliepen <guus@tinc-vpn.org>
Thu, 17 May 2007 22:17:24 +0000 (22:17 +0000)
src/graph.c
src/net_packet.c

index 02650f7..9589477 100644 (file)
@@ -376,7 +376,7 @@ void graph(void)
        sssp_bfs();
        mst_kruskal();
 
-       if(!ev.ev_callback)
+       if(!timeout_initialized(&ev))
                timeout_set(&ev, dump_graph, NULL);
        event_add(&ev, &(struct timeval){5, 0});
 }
index 57794f9..84b2707 100644 (file)
@@ -98,7 +98,7 @@ static void send_mtu_probe_handler(int fd, short events, void *data) {
 }
 
 void send_mtu_probe(node_t *n) {
-       if(!n->mtuevent.ev_callback)
+       if(!timeout_initialized(&n->mtuevent))
                timeout_set(&n->mtuevent, send_mtu_probe_handler, n);
        send_mtu_probe_handler(0, 0, n);
 }