dbusers.c: Added function for setting read, write and connection timeout values. Set default timeouts for getUsers. Defaults are listed in service.c
gateway.c:shutdown_server is called whenever MaxScale is to be shut down. Added call for service_shutdown to shutdown_server.
service.c:service_alloc: replaced malloc with calloc and removed unnecessary zero/NULL initialization statements as a consequence.
	serviceStart: Exit serviceStartPort loop if shutdown flag is set for the service.
	serviceStartAll: Exit serviceStart loop if shutdown flag is set for the service.
service.c: Added service_shutdown which sets shutdown flag for each service found in allServices list.
service.h: Added prototype for service_shutdown
This commit is contained in:
VilhoRaatikka
2014-12-29 13:45:24 +02:00
parent 5e3d90b8b0
commit beacd524da
4 changed files with 153 additions and 51 deletions

View File

@ -56,6 +56,7 @@
#include <config.h>
#include <poll.h>
#include <housekeeper.h>
#include <service.h>
#include <memlog.h>
#include <stdlib.h>
@ -1837,7 +1838,8 @@ return_main:
void
shutdown_server()
{
poll_shutdown();
service_shutdown();
poll_shutdown();
hkshutdown();
memlog_flush_all();
log_flush_shutdown();