src/server/daemon/httplistener.c

changeset 194
6345f50208d5
parent 193
aa8393527b1e
child 256
19259b6c5cf7
equal deleted inserted replaced
193:aa8393527b1e 194:6345f50208d5
400 /* create Connection object */ 400 /* create Connection object */
401 Connection *conn = malloc(sizeof(Connection)); 401 Connection *conn = malloc(sizeof(Connection));
402 conn->address = ca; 402 conn->address = ca;
403 conn->fd = clientfd; 403 conn->fd = clientfd;
404 conn->listener = ls; 404 conn->listener = ls;
405 conn->ssl_accepted = 0;
405 if(ls->ssl) { 406 if(ls->ssl) {
406 // SSL connections are always non-blocking 407 // SSL connections are always non-blocking
407 // set socket non blocking 408 // set socket non blocking
408 int flags; 409 int flags;
409 if((flags = fcntl(conn->fd, F_GETFL, 0)) == -1) { 410 if((flags = fcntl(conn->fd, F_GETFL, 0)) == -1) {

mercurial