src/server/daemon/httplistener.c

changeset 579
e10457d74fe1
parent 577
4f5ccaea4a92
equal deleted inserted replaced
578:eb48f716b31c 579:e10457d74fe1
85 int http_listener_global_init(void) { 85 int http_listener_global_init(void) {
86 listener_socket_map = cxHashMapCreate(cxDefaultAllocator, CX_STORE_POINTERS, 4); 86 listener_socket_map = cxHashMapCreate(cxDefaultAllocator, CX_STORE_POINTERS, 4);
87 if(!listener_socket_map) { 87 if(!listener_socket_map) {
88 return 1; 88 return 1;
89 } 89 }
90 listener_socket_map->simple_destructor = (cx_destructor_func)wssocket_free; 90 listener_socket_map->collection.simple_destructor = (cx_destructor_func)wssocket_free;
91 91
92 return 0; 92 return 0;
93 } 93 }
94 94
95 void http_listener_global_shutdown(void) { 95 void http_listener_global_shutdown(void) {
96 cxMapDestroy(listener_socket_map); 96 cxMapFree(listener_socket_map);
97 } 97 }
98 98
99 int start_all_listener() { 99 int start_all_listener() {
100 ServerConfiguration *conf = cfgmgr_get_server_config(); 100 ServerConfiguration *conf = cfgmgr_get_server_config();
101 CxList *ls = conf->listeners; 101 CxList *ls = conf->listeners;

mercurial