diff options
author | Christian Grothoff <christian@grothoff.org> | 2007-06-14 00:09:32 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2007-06-14 00:09:32 +0000 |
commit | b7054096a4e58009d7eddbda083762883213f937 (patch) | |
tree | c6ee744359d5c13e9c0de3238c0acc1a823f782d /src/daemon/daemon.c | |
parent | 6e12c7fae2b6350a65f1b2eeedafd6f05510726b (diff) | |
download | libmicrohttpd-b7054096a4e58009d7eddbda083762883213f937.tar.gz libmicrohttpd-b7054096a4e58009d7eddbda083762883213f937.zip |
extended API, setting content length automatically if needed
Diffstat (limited to 'src/daemon/daemon.c')
-rw-r--r-- | src/daemon/daemon.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/daemon/daemon.c b/src/daemon/daemon.c index 24229793..657afb23 100644 --- a/src/daemon/daemon.c +++ b/src/daemon/daemon.c | |||
@@ -467,6 +467,7 @@ MHD_start_daemon(unsigned int options, | |||
467 | strerror(errno)); | 467 | strerror(errno)); |
468 | return NULL; | 468 | return NULL; |
469 | } | 469 | } |
470 | /* FIXME: setsockopt: SO_REUSEADDR? */ | ||
470 | memset(&servaddr, | 471 | memset(&servaddr, |
471 | 0, | 472 | 0, |
472 | sizeof(struct sockaddr_in)); | 473 | sizeof(struct sockaddr_in)); |
@@ -541,7 +542,8 @@ MHD_stop_daemon(struct MHD_Daemon * daemon) { | |||
541 | close(daemon->connections->socket_fd); | 542 | close(daemon->connections->socket_fd); |
542 | daemon->connections->socket_fd = -1; | 543 | daemon->connections->socket_fd = -1; |
543 | } | 544 | } |
544 | pthread_join(daemon->connections->pid, &unused); | 545 | if (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) |
546 | pthread_join(daemon->connections->pid, &unused); | ||
545 | 547 | ||
546 | MHD_cleanup_sessions(daemon); | 548 | MHD_cleanup_sessions(daemon); |
547 | } | 549 | } |