diff options
author | Laurent Ghigonis <laurent@p1sec.com> | 2012-07-22 01:08:34 +0200 |
---|---|---|
committer | Laurent Ghigonis <laurent@p1sec.com> | 2012-07-22 01:08:34 +0200 |
commit | d6d5ea47494b569882c032432dde23ec2505c631 (patch) | |
tree | 574e96066540b86f2c58dbaf1bd5bc9d073366a2 /glougloud/user.c | |
parent | fix imcompatibility between imsg and imsgev ! (diff) | |
download | glouglou-d6d5ea47494b569882c032432dde23ec2505c631.tar.xz glouglou-d6d5ea47494b569882c032432dde23ec2505c631.zip |
follow imsgev changes
Diffstat (limited to '')
-rw-r--r-- | glougloud/user.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/glougloud/user.c b/glougloud/user.c index 644e092..38caae7 100644 --- a/glougloud/user.c +++ b/glougloud/user.c @@ -121,6 +121,7 @@ static void ev_timer(int, short, void *); static void usrconn(struct imsgev *, struct imsg *); static void imsgev_main(struct imsgev *, int, struct imsg *); +static void imsgev_main_needfd(struct imsgev *); static struct phandler phandlers[] = { { phandler_ether, DLT_EN10MB }, @@ -168,7 +169,7 @@ user_init(int fd[2], pcap_t *pcap) cap = xcalloc(1, sizeof(struct capture)); cap->fd = fd[1]; - imsgev_init(&cap->iev, cap->fd, NULL, &imsgev_main); + imsgev_init(&cap->iev, cap->fd, NULL, imsgev_main, imsgev_main_needfd); for (i=0; i<CONN_FREEIDS_COUNT-1; i++) cap->conn_freeids[i] = i; cap->time = time(NULL); @@ -785,7 +786,7 @@ imsgev_main(struct imsgev *iev, int code, struct imsg *imsg) case IMSGEV_EREAD: case IMSGEV_EWRITE: case IMSGEV_EIMSG: - fatal("imsgev read/write error"); + fatal("user: imsgev read/write error"); /* NOTREACHED */ break; case IMSGEV_DONE: @@ -795,3 +796,8 @@ imsgev_main(struct imsgev *iev, int code, struct imsg *imsg) } } +static void +imsgev_main_needfd(struct imsgev *iev) +{ + fatal("server: imsgev_main_needfd"); +} |