diff options
Diffstat (limited to 'glougloud/user.c')
-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"); +} |