Serialize created listeners to disk

The created listeners are now stored to disk like created servers
are. This allows them to be used even after a restart.

Currently, the listeners cannot be deleted and need to be manually
removed.
This commit is contained in:
Markus Makela
2016-11-24 11:53:40 +02:00
parent dd63253261
commit e31afa28e4
7 changed files with 176 additions and 33 deletions

View File

@ -192,9 +192,9 @@ extern SERVICE *service_alloc(const char *, const char *);
extern int service_free(SERVICE *);
extern SERVICE *service_find(const char *);
extern int service_isvalid(SERVICE *);
extern bool serviceAddProtocol(SERVICE *service, const char *name, const char *protocol,
const char *address, unsigned short port, const char *authenticator,
const char *options, SSL_LISTENER *ssl);
extern SERV_LISTENER* serviceCreateListener(SERVICE *service, const char *name, const char *protocol,
const char *address, unsigned short port, const char *authenticator,
const char *options, SSL_LISTENER *ssl);
extern int serviceHasProtocol(SERVICE *service, const char *protocol,
const char* address, unsigned short port);
extern void serviceAddBackend(SERVICE *, SERVER *);
@ -204,7 +204,7 @@ extern void serviceAddRouterOption(SERVICE *, char *);
extern void serviceClearRouterOptions(SERVICE *);
extern int serviceStart(SERVICE *);
extern int serviceStartAll();
extern bool serviceListen(SERVICE *service, unsigned short port);
extern bool serviceListen(SERVICE *service, SERV_LISTENER *port);
extern int serviceStop(SERVICE *);
extern int serviceRestart(SERVICE *);
extern int serviceSetUser(SERVICE *, char *, char *);