projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use threads for TCP connections.
[tinc]
/
src
/
net.c
diff --git
a/src/net.c
b/src/net.c
index
7d44d17
..
dbff75b
100644
(file)
--- a/
src/net.c
+++ b/
src/net.c
@@
-208,7
+208,7
@@
static void timeout_handler(int fd, short events, void *event) {
event_add(event, &(struct timeval){pingtimeout, 0});
}
event_add(event, &(struct timeval){pingtimeout, 0});
}
-void handle_meta_connection_data(
int fd, short events,
void *data) {
+void handle_meta_connection_data(void *data) {
connection_t *c = data;
int result;
socklen_t len = sizeof result;
connection_t *c = data;
int result;
socklen_t len = sizeof result;
@@
-230,9
+230,11
@@
void handle_meta_connection_data(int fd, short events, void *data) {
}
}
}
}
- if (!receive_meta(c)) {
- terminate_connection(c, c->status.active);
- return;
+ while(true) {
+ if (!receive_meta(c)) {
+ terminate_connection(c, c->status.active);
+ return;
+ }
}
}
}
}