src/server/daemon/httplistener.c

changeset 490
d218607f5a7e
parent 454
e03d4a00427a
child 492
07452a54a22b
equal deleted inserted replaced
489:921f83a8943f 490:d218607f5a7e
75 75
76 static pthread_mutex_t listener_mutex = PTHREAD_MUTEX_INITIALIZER; 76 static pthread_mutex_t listener_mutex = PTHREAD_MUTEX_INITIALIZER;
77 77
78 78
79 int http_listener_global_init(void) { 79 int http_listener_global_init(void) {
80 listener_socket_map = cxHashMapCreate(cxDefaultAllocator, 4); 80 listener_socket_map = cxHashMapCreate(cxDefaultAllocator, CX_STORE_POINTERS, 4);
81 if(!listener_socket_map) { 81 if(!listener_socket_map) {
82 return 1; 82 return 1;
83 } 83 }
84 84
85 return 0; 85 return 0;
86 } 86 }
87 87
88 int start_all_listener() { 88 int start_all_listener() {
89 ServerConfiguration *conf = cfgmgr_get_server_config(); 89 ServerConfiguration *conf = cfgmgr_get_server_config();
90 CxList *ls = conf->listeners; 90 CxList *ls = conf->listeners;
91 CxIterator iter = cxListIterator(ls, 0); 91 CxIterator iter = cxListIterator(ls);
92 cx_foreach(HttpListener *, listener, iter) { 92 cx_foreach(HttpListener *, listener, iter) {
93 http_listener_start(listener); 93 http_listener_start(listener);
94 } 94 }
95 95
96 return 0; 96 return 0;

mercurial