Nodes use events, so event system should be initialised first and destroyed last.
[tinc] / src / net_packet.c
index 8b877c2..20bee34 100644 (file)
 #include <openssl/hmac.h>
 
 #include <zlib.h>
+#ifdef HAVE_LZO_LZO1X_H
+#include <lzo/lzo1x.h>
+#endif
+#ifdef HAVE_LZO1X_H
 #include <lzo1x.h>
+#endif
 
 #include "avl_tree.h"
 #include "conf.h"
@@ -96,7 +101,7 @@ void send_mtu_probe(node_t *n)
                send_udppacket(n, &packet);
        }
 
-       n->mtuevent = xmalloc(sizeof(*n->mtuevent));
+       n->mtuevent = new_event();
        n->mtuevent->handler = (event_handler_t)send_mtu_probe;
        n->mtuevent->data = n;
        n->mtuevent->time = now + 1;