Libevent prints a warning to stderr if we do that.
n->minmtu = 0;
n->mtuprobes = 0;
- event_del(&n->mtuevent);
+ if(timeout_initialized(&n->mtuevent))
+ event_del(&n->mtuevent);
xasprintf(&envp[0], "NETNAME=%s", netname ? : "");
xasprintf(&envp[1], "DEVICE=%s", device ? : "");
signal_del(&sighup_event);
signal_del(&sigterm_event);
signal_del(&sigquit_event);
- event_del(&timeout_event);
+
+ if(timeout_initialized(&timeout_event))
+ event_del(&timeout_event);
return 0;
}
}
buffer_read(&c->outbuf, outlen);
- if(!c->outbuf.len)
+ if(!c->outbuf.len && event_initialized(&c->outevent))
event_del(&c->outevent);
}
connection_t *c;
node_t *n;
- event_del(&outgoing->ev);
+ if(event_initialized(&outgoing->ev))
+ event_del(&outgoing->ev);
n = lookup_node(outgoing->name);
cipher_close(&n->outcipher);
digest_close(&n->outdigest);
- event_del(&n->mtuevent);
+ if(timeout_initialized(&n->mtuevent))
+ event_del(&n->mtuevent);
if(n->hostname)
free(n->hostname);
void exit_requests(void) {
splay_delete_tree(past_request_tree);
- event_del(&past_request_event);
+ if(timeout_initialized(&past_request_event))
+ event_del(&past_request_event);
}