aboutsummaryrefslogtreecommitdiff
path: root/src/daemon/daemontest.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2007-06-13 22:16:26 +0000
committerChristian Grothoff <christian@grothoff.org>2007-06-13 22:16:26 +0000
commitb6a83f00076a84e9322323031734cadf2930e159 (patch)
tree3966d328741bf9d10753186bb229031ccacfca66 /src/daemon/daemontest.c
parent53918b01dc591cc732312088712c54ef86386bbe (diff)
downloadlibmicrohttpd-b6a83f00076a84e9322323031734cadf2930e159.tar.gz
libmicrohttpd-b6a83f00076a84e9322323031734cadf2930e159.zip
fix
Diffstat (limited to 'src/daemon/daemontest.c')
-rw-r--r--src/daemon/daemontest.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/daemon/daemontest.c b/src/daemon/daemontest.c
index 38aadbea..3fccce9d 100644
--- a/src/daemon/daemontest.c
+++ b/src/daemon/daemontest.c
@@ -78,7 +78,7 @@ static int testStartStop() {
78 78
79static int testExternalRun() { 79static int testExternalRun() {
80 struct MHD_Daemon * d; 80 struct MHD_Daemon * d;
81 fd_set read; 81 fd_set rs;
82 int maxfd; 82 int maxfd;
83 int i; 83 int i;
84 84
@@ -93,13 +93,16 @@ static int testExternalRun() {
93 return 4; 93 return 4;
94 i = 0; 94 i = 0;
95 while(i < 15) { 95 while(i < 15) {
96 MHD_get_fdset(d, &read, &read, &read, &maxfd); 96 maxfd = 0;
97 FD_ZERO(&rs);
98 MHD_get_fdset(d, &rs, &rs, &rs, &maxfd);
97 if (MHD_run(d) == MHD_NO) { 99 if (MHD_run(d) == MHD_NO) {
98 MHD_stop_daemon(d); 100 MHD_stop_daemon(d);
99 return 8; 101 return 8;
100 } 102 }
101 i++; 103 i++;
102 } 104 }
105 MHD_stop_daemon(d);
103 return 0; 106 return 0;
104} 107}
105 108
@@ -114,7 +117,7 @@ static int testThread() {
114 117
115 if (d == NULL) 118 if (d == NULL)
116 return 16; 119 return 16;
117 if (MHD_run(d) == MHD_NO) 120 if (MHD_run(d) != MHD_NO)
118 return 32; 121 return 32;
119 MHD_stop_daemon(d); 122 MHD_stop_daemon(d);
120 return 0; 123 return 0;
@@ -131,8 +134,8 @@ static int testMultithread() {
131 134
132 if (d == NULL) 135 if (d == NULL)
133 return 64; 136 return 64;
134 if (MHD_run(d) == MHD_NO) 137 if (MHD_run(d) != MHD_NO)
135 return 128; 138 return 128;
136 MHD_stop_daemon(d); 139 MHD_stop_daemon(d);
137 return 0; 140 return 0;
138} 141}