Addition for shutdown mechanism for the gateway

Addition of stop and restart service

Fix for telnetd in Makefile

Fix for printing the server names in services
This commit is contained in:
Mark Riddoch
2013-06-25 14:00:18 +02:00
parent 72223fd4cf
commit 34fdbdb34d
11 changed files with 167 additions and 16 deletions

View File

@ -31,10 +31,12 @@
* @endverbatim
*/
#define MAX_EVENTS 1000
#define EPOLL_TIMEOUT 1000 /**< The epoll timeout we use (milliseconds) */
extern void poll_init();
extern int poll_add_dcb(DCB *);
extern int poll_remove_dcb(DCB *);
extern void poll_waitevents();
extern void poll_shutdown();
extern void dprintPollStats(DCB *);
#endif

View File

@ -112,6 +112,8 @@ extern int serviceAddProtocol(SERVICE *, char *, unsigned short);
extern void serviceAddBackend(SERVICE *, SERVER *);
extern int serviceStart(SERVICE *);
extern int serviceStartAll();
extern int serviceStop(SERVICE *);
extern int serviceRestart(SERVICE *);
extern int serviceSetUser(SERVICE *, char *, char *);
extern int serviceGetUser(SERVICE *, char **, char **);
extern void printService(SERVICE *);

View File

@ -60,9 +60,10 @@ typedef struct session {
struct session *next; /**< Linked list of all sessions */
} SESSION;
#define SESSION_STATE_ALLOC 0
#define SESSION_STATE_READY 1
#define SESSION_STATE_LISTENER 2
#define SESSION_STATE_ALLOC 0 /**< The session has been allocated */
#define SESSION_STATE_READY 1 /**< The session is ready to route queries */
#define SESSION_STATE_LISTENER 2 /**< The session is a running listener */
#define SESSION_STATE_LISTENER_STOPPED 3 /**< The session listener is stopped */
#define SESSION_PROTOCOL(x, type) DCB_PROTOCOL((x)->client, type)