117 |
|
|
118 |
if ( (myServerSocket= create_server_socket(port, backlog, bindAddr)) < 0 ) { |
if ( (myServerSocket= create_server_socket(port, backlog, bindAddr)) < 0 ) { |
119 |
|
|
120 |
error("http server: Could not create a server socket at port %d -- %s\n", |
log("http server: Could not create a server socket at port %d -- %s\n", |
121 |
port, STRERROR); |
port, STRERROR); |
122 |
|
|
123 |
error("monit HTTP server not available\n"); |
log("monit HTTP server not available\n"); |
124 |
|
|
125 |
if ( Run.init ) { |
if ( Run.init ) { |
126 |
|
|
140 |
|
|
141 |
if ( mySSLServerConnection == NULL ) { |
if ( mySSLServerConnection == NULL ) { |
142 |
|
|
143 |
error("http server: Could not initilize SSL engine\n"); |
log("http server: Could not initilize SSL engine\n"); |
144 |
|
|
145 |
error("monit HTTP server not available\n"); |
log("monit HTTP server not available\n"); |
146 |
|
|
147 |
return; |
return; |
148 |
} |
} |
165 |
if ( NULL == (W->ssl= |
if ( NULL == (W->ssl= |
166 |
insert_accepted_ssl_socket(mySSLServerConnection) )) { |
insert_accepted_ssl_socket(mySSLServerConnection) )) { |
167 |
|
|
168 |
error("http server: Cannot create SSL connection -- %s\n", |
log("http server: Cannot create SSL connection -- %s\n", |
169 |
STRERROR); |
STRERROR); |
170 |
destroy_wrapper(W); |
destroy_wrapper(W); |
171 |
|
|
175 |
|
|
176 |
if (! embed_accepted_ssl_socket(W->ssl, W->socket)) { |
if (! embed_accepted_ssl_socket(W->ssl, W->socket)) { |
177 |
|
|
178 |
error("http server: Cannot establish SSL connection\n"); |
log("http server: Cannot establish SSL connection\n"); |
179 |
destroy_wrapper(W); |
destroy_wrapper(W); |
180 |
|
|
181 |
continue; |
continue; |
196 |
|
|
197 |
if ( !check_socket(W->socket) ) { |
if ( !check_socket(W->socket) ) { |
198 |
|
|
199 |
error("http server: Client socket not ready -- %s\n", STRERROR); |
log("http server: Client socket not ready -- %s\n", STRERROR); |
200 |
destroy_wrapper(W); |
destroy_wrapper(W); |
201 |
|
|
202 |
continue; |
continue; |
345 |
|
|
346 |
if ( (Impl.doGet == 0) || (Impl.doPost == 0) ) { |
if ( (Impl.doGet == 0) || (Impl.doPost == 0) ) { |
347 |
|
|
348 |
error("http server: Service Methods not implemented\n"); |
log("http server: Service Methods not implemented\n"); |
349 |
_exit(1); |
_exit(1); |
350 |
|
|
351 |
} |
} |
436 |
|
|
437 |
} else { |
} else { |
438 |
|
|
439 |
error("http server: cannot accept connection -- %s\n", STRERROR); |
log("http server: cannot accept connection -- %s\n", STRERROR); |
440 |
|
|
441 |
} |
} |
442 |
|
|