src/server/daemon/httplistener.c

changeset 111
c93be34fde76
parent 106
b122f34ddc80
child 115
51d9a15eac98
equal deleted inserted replaced
109:8a0a7754f123 111:c93be34fde76
77 HttpListener *fl = ucx_map_sstr_get(listener_map, conf->name); 77 HttpListener *fl = ucx_map_sstr_get(listener_map, conf->name);
78 if(fl == NULL) { 78 if(fl == NULL) {
79 return http_listener_new(conf); 79 return http_listener_new(conf);
80 } 80 }
81 81
82 HttpListener* newls = malloc(sizeof(HttpListener)); 82 HttpListener* newls = calloc(1, sizeof(HttpListener));
83 if(newls == NULL) { 83 if(newls == NULL) {
84 // TODO: error 84 // TODO: error
85 } 85 }
86 86
87 newls->name = conf->name; 87 newls->name = conf->name;
327 conn->read = connection_ssl_read; 327 conn->read = connection_ssl_read;
328 conn->write = connection_ssl_write; 328 conn->write = connection_ssl_write;
329 conn->close = connection_ssl_close; 329 conn->close = connection_ssl_close;
330 } 330 }
331 } else { 331 } else {
332 conn->ssl = NULL;
332 conn->read = connection_read; 333 conn->read = connection_read;
333 conn->write = connection_write; 334 conn->write = connection_write;
334 conn->close = connection_close; 335 conn->close = connection_close;
335 } 336 }
336 337

mercurial