projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rename "event_t" to "tevent_t", along with associated functions.
[tinc]
/
src
/
net.c
diff --git
a/src/net.c
b/src/net.c
index
e834f92
..
9156147
100644
(file)
--- a/
src/net.c
+++ b/
src/net.c
@@
-29,7
+29,7
@@
#include "conf.h"
#include "connection.h"
#include "device.h"
#include "conf.h"
#include "connection.h"
#include "device.h"
-#include "event.h"
+#include "
t
event.h"
#include "graph.h"
#include "logger.h"
#include "meta.h"
#include "graph.h"
#include "logger.h"
#include "meta.h"
@@
-355,7
+355,7
@@
int main_loop(void)
struct timeval tv;
int r, maxfd;
time_t last_ping_check, last_config_check, last_graph_dump;
struct timeval tv;
int r, maxfd;
time_t last_ping_check, last_config_check, last_graph_dump;
- event_t *event;
+
t
event_t *event;
cp();
cp();
@@
-429,12
+429,7
@@
int main_loop(void)
if(sigalrm) {
logger(LOG_INFO, _("Flushing event queue"));
if(sigalrm) {
logger(LOG_INFO, _("Flushing event queue"));
-
- while(event_tree->head) {
- event = event_tree->head->data;
- event->handler(event->data);
- event_del(event);
- }
+ flush_events();
sigalrm = false;
}
sigalrm = false;
}
@@
-463,7
+458,8
@@
int main_loop(void)
if(c->outgoing) {
free(c->outgoing->name);
if(c->outgoing) {
free(c->outgoing->name);
- freeaddrinfo(c->outgoing->ai);
+ if(c->outgoing->ai)
+ freeaddrinfo(c->outgoing->ai);
free(c->outgoing);
c->outgoing = NULL;
}
free(c->outgoing);
c->outgoing = NULL;
}