core: Added timeout support for ConnectRequest
[lumina.git] / core / src / listen_handler.c
blob178eb393e83cc6511d172e0caefcdf94ce9e75e3
1 #include "listen_handler.h"
2 #include <malloc.h> /* calloc */
4 listen_handler_t *new_listen_handler(core_t *c) {
5 listen_handler_t *h = calloc(1, sizeof(listen_handler_t));
6 if(!h) goto fail;
7 h->core = c;
8 return h;
9 fail:
10 free_listen_handler(h);
11 return NULL;
14 void free_listen_handler(listen_handler_t *h) {
15 if(!h) return;
16 free(h);