Paul Keogh wrote:

I'm using the HTTP server module from gwlib in another application.

I stop and start the server module several times during operations using
http_init() and http_shutdown ().

I've had to make some patches to get this to work.

The function

gwthread_join_every(server_thread);

is invoked from

http_close_all_ports() and server_shutdown().

After this, I think there should be;

server_thread_is_running = 0;

yep, it's required to allow gwlib/http.c:start_server_thread() to get into the if statement.


so that the HTTP server "state machine" is reset completely.

Also the calls to

fdset_destroy(server_fdset) and fdset_destroy(client_fdset)

should be followed with

xxx_fdset = NULL

for the same reason.

yep.

+1 on this, commiting to cvs.

What about 'client_threads_are_running'? also switch this to 0 in gwlib/http.c:client_shutdown() ?

Stipe

mailto:stolj_{at}_wapme.de
-------------------------------------------------------------------
Wapme Systems AG

Vogelsanger Weg 80
40470 D�sseldorf, NRW, Germany

phone: +49.211.74845.0
fax: +49.211.74845.299

mailto:info_{at}_wapme-systems.de
http://www.wapme-systems.de/
-------------------------------------------------------------------



Reply via email to