mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-13 23:14:46 +00:00
51041c737c
src/chtbl.c, src/hashpjw.c and src/list.c are distributed under an obscure license. While Aleks and I believe that this license is OK for haproxy, other people think it is not compatible with the GPL. Whether it is or not is not the problem. The fact that it rises a doubt is sufficient for this problem to be addressed. Arnaud Cornet rewrote the unclear parts with clean GPLv2 and LGPL code. The hash algorithm has changed too and the code has been slightly simplified in the process. A lot of care has been taken in order to respect the original API as much as possible, including the LGPL for the exportable parts. The new code has not been thoroughly tested but it looks OK now.
54 lines
1.0 KiB
C
54 lines
1.0 KiB
C
#ifndef _COMMON_APPSESS_H
|
|
#define _COMMON_APPSESS_H
|
|
|
|
/*
|
|
* The time between two calls of appsession_refresh in ms.
|
|
*/
|
|
#define TBLCHKINT 5000
|
|
|
|
#include <sys/time.h>
|
|
|
|
#include <common/config.h>
|
|
#include <common/memory.h>
|
|
|
|
#include <types/task.h>
|
|
|
|
typedef struct appsessions {
|
|
char *sessid;
|
|
char *serverid;
|
|
struct timeval expire; /* next expiration time for this application session */
|
|
unsigned long int request_count;
|
|
struct list hash_list;
|
|
} appsess;
|
|
|
|
extern struct pool_head *pool2_appsess;
|
|
|
|
struct app_pool {
|
|
struct pool_head *sessid;
|
|
struct pool_head *serverid;
|
|
};
|
|
|
|
extern struct app_pool apools;
|
|
extern int have_appsession;
|
|
|
|
|
|
/* Callback for hash_lookup */
|
|
int match_str(const void *key1, const void *key2);
|
|
|
|
/* Callback for destroy */
|
|
void destroy(appsess *data);
|
|
|
|
void appsession_refresh(struct task *t, struct timeval *next);
|
|
int appsession_task_init(void);
|
|
int appsession_init(void);
|
|
void appsession_cleanup(void);
|
|
|
|
#endif /* _COMMON_APPSESS_H */
|
|
|
|
/*
|
|
* Local variables:
|
|
* c-indent-level: 8
|
|
* c-basic-offset: 8
|
|
* End:
|
|
*/
|