diff options
Diffstat (limited to 'src/daemon/daemontest.c')
-rw-r--r-- | src/daemon/daemontest.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/daemon/daemontest.c b/src/daemon/daemontest.c index 9e86e389..10e7229d 100644 --- a/src/daemon/daemontest.c +++ b/src/daemon/daemontest.c | |||
@@ -35,7 +35,7 @@ static int testStartError() { | |||
35 | struct MHD_Daemon * d; | 35 | struct MHD_Daemon * d; |
36 | 36 | ||
37 | d = MHD_start_daemon(MHD_USE_DEBUG, 0, NULL, NULL, NULL, NULL); | 37 | d = MHD_start_daemon(MHD_USE_DEBUG, 0, NULL, NULL, NULL, NULL); |
38 | if (d != NULL) | 38 | if (d != NULL) |
39 | return 1; | 39 | return 1; |
40 | return 0; | 40 | return 0; |
41 | } | 41 | } |
@@ -70,8 +70,8 @@ static int testStartStop() { | |||
70 | NULL, | 70 | NULL, |
71 | &ahc_nothing, | 71 | &ahc_nothing, |
72 | NULL); | 72 | NULL); |
73 | if (d == NULL) | 73 | if (d == NULL) |
74 | return 2; | 74 | return 2; |
75 | MHD_stop_daemon(d); | 75 | MHD_stop_daemon(d); |
76 | return 0; | 76 | return 0; |
77 | } | 77 | } |
@@ -89,8 +89,8 @@ static int testExternalRun() { | |||
89 | &ahc_nothing, | 89 | &ahc_nothing, |
90 | NULL); | 90 | NULL); |
91 | 91 | ||
92 | if (d == NULL) | 92 | if (d == NULL) |
93 | return 4; | 93 | return 4; |
94 | i = 0; | 94 | i = 0; |
95 | while(i < 15) { | 95 | while(i < 15) { |
96 | maxfd = 0; | 96 | maxfd = 0; |
@@ -115,9 +115,9 @@ static int testThread() { | |||
115 | &ahc_nothing, | 115 | &ahc_nothing, |
116 | NULL); | 116 | NULL); |
117 | 117 | ||
118 | if (d == NULL) | 118 | if (d == NULL) |
119 | return 16; | 119 | return 16; |
120 | if (MHD_run(d) != MHD_NO) | 120 | if (MHD_run(d) != MHD_NO) |
121 | return 32; | 121 | return 32; |
122 | MHD_stop_daemon(d); | 122 | MHD_stop_daemon(d); |
123 | return 0; | 123 | return 0; |
@@ -132,11 +132,11 @@ static int testMultithread() { | |||
132 | &ahc_nothing, | 132 | &ahc_nothing, |
133 | NULL); | 133 | NULL); |
134 | 134 | ||
135 | if (d == NULL) | 135 | if (d == NULL) |
136 | return 64; | 136 | return 64; |
137 | if (MHD_run(d) != MHD_NO) | 137 | if (MHD_run(d) != MHD_NO) |
138 | return 128; | 138 | return 128; |
139 | MHD_stop_daemon(d); | 139 | MHD_stop_daemon(d); |
140 | return 0; | 140 | return 0; |
141 | } | 141 | } |
142 | 142 | ||
@@ -149,8 +149,8 @@ int main(int argc, | |||
149 | errorCount += testThread(); | 149 | errorCount += testThread(); |
150 | errorCount += testMultithread(); | 150 | errorCount += testMultithread(); |
151 | if (errorCount != 0) | 151 | if (errorCount != 0) |
152 | fprintf(stderr, | 152 | fprintf(stderr, |
153 | "Error (code: %u)\n", | 153 | "Error (code: %u)\n", |
154 | errorCount); | 154 | errorCount); |
155 | return errorCount != 0; /* 0 == pass */ | 155 | return errorCount != 0; /* 0 == pass */ |
156 | } | 156 | } |