src/server/daemon/httplistener.c

changeset 453
4586d534f9b5
parent 449
a28a5ccc894b
child 454
e03d4a00427a
equal deleted inserted replaced
452:ce359a2b51fe 453:4586d534f9b5
71 * protocol: ipv4 | ipv6 71 * protocol: ipv4 | ipv6
72 * port: short 72 * port: short
73 */ 73 */
74 static CxMap *listener_socket_map; 74 static CxMap *listener_socket_map;
75 75
76 static pthread_mutex_t listener_mutex; 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, 4);
81 if(!listener_socket_map) { 81 if(!listener_socket_map) {
82 return 1; 82 return 1;
83 } 83 }
84
85 listener_mutex = PTHREAD_MUTEX_INITIALIZER;
86 84
87 return 0; 85 return 0;
88 } 86 }
89 87
90 int start_all_listener() { 88 int start_all_listener() {

mercurial