projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Convert to libevent.
[tinc]
/
src
/
connection.c
diff --git
a/src/connection.c
b/src/connection.c
index
c4c9fd4
..
1f2f96c
100644
(file)
--- a/
src/connection.c
+++ b/
src/connection.c
@@
-70,6
+70,7
@@
connection_t *new_connection(void)
return NULL;
gettimeofday(&c->start, NULL);
return NULL;
gettimeofday(&c->start, NULL);
+ event_set(&c->ev, -1, 0, NULL, NULL);
return c;
}
return c;
}
@@
-78,20
+79,14
@@
void free_connection(connection_t *c)
{
cp();
{
cp();
- if(c
->hostname)
+ if(c
) {
free(c->hostname);
free(c->hostname);
-
- if(c->inkey)
free(c->inkey);
free(c->inkey);
-
- if(c->outkey)
free(c->outkey);
free(c->outkey);
-
- if(c->mychallenge)
free(c->mychallenge);
free(c->mychallenge);
-
- if(c->hischallenge)
free(c->hischallenge);
free(c->hischallenge);
+ event_del(&c->ev);
+ }
free(c);
}
free(c);
}