Added session timeouts.

The parameter 'connection_timeout' for services takes a value as seconds.
All sessions that have been idle for longer than this will be disconnected.
This commit is contained in:
Markus Makela
2015-02-20 22:16:43 +02:00
parent 3145ebac43
commit c47d2f3791
14 changed files with 101 additions and 4 deletions

View File

@ -142,6 +142,7 @@ typedef struct service {
rate_limit; /**< The refresh rate limit for users table */
FILTER_DEF **filters; /**< Ordered list of filters */
int n_filters; /**< Number of filters */
int conn_timeout; /*< Session timeout in seconds */
char *weightby;
struct service *next; /**< The next service in the linked list */
} SERVICE;
@ -172,6 +173,7 @@ extern int serviceSetUser(SERVICE *, char *, char *);
extern int serviceGetUser(SERVICE *, char **, char **);
extern void serviceSetFilters(SERVICE *, char *);
extern int serviceEnableRootUser(SERVICE *, int );
extern int serviceSetTimeout(SERVICE *, int );
extern void serviceWeightBy(SERVICE *, char *);
extern char *serviceGetWeightingParameter(SERVICE *);
extern int serviceEnableLocalhostMatchWildcardHost(SERVICE *, int);