Fix to bug #662, http://bugs.mariadb.com/show_bug.cgi?id=662
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:
@ -130,6 +130,7 @@ typedef struct service {
|
||||
CONFIG_PARAMETER*
|
||||
svc_config_param; /*< list of config params and values */
|
||||
int svc_config_version; /*< Version number of configuration */
|
||||
bool svc_do_shutdown; /*< tells the service to exit loops etc. */
|
||||
SPINLOCK
|
||||
users_table_spin; /**< The spinlock for users data refresh */
|
||||
SERVICE_REFRESH_RATE
|
||||
@ -186,4 +187,5 @@ extern void dprintService(DCB *, SERVICE *);
|
||||
extern void dListServices(DCB *);
|
||||
extern void dListListeners(DCB *);
|
||||
char* service_get_name(SERVICE* svc);
|
||||
void service_shutdown();
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user