71 if (pthread_mutex_lock(&hdata.mutex) != 0) { \ 72 ZE_LogSysError("pthread_mutex_lock"); \ 75 #define DATA_UNLOCK() \ 76 if (pthread_mutex_unlock(&hdata.mutex) != 0) { \ 77 ZE_LogSysError("pthread_mutex_unlock"); \ 94 if ((ta == NULL) || (tb == NULL)) {
103 return (strcmp(ta->
ip, tb->
ip));
121 hdata.last = time(NULL);
159 time_t now = time(NULL);
161 #if 0 && defined(OS_FREEBSD) 165 if ((
ip == NULL) || (strlen(
ip) == 0))
168 if (!connopen_init())
174 if (strlen(
name) == 0)
180 memset(&p, 0,
sizeof (p));
209 if ((hdata.last +
DTCLEANUP / 2 < now) &&
222 static time_t tcleanup = (time_t) 0;
225 select_function(vp, arg)
249 time_t now = time(NULL);
251 if (!connopen_init())
258 if ((hdata.last +
DTCLEANUP / 2 < now) &&
269 if (
zeBTree_Cpy(&tmp, &hdata.db_open, select_function, NULL)) {
298 log_rec(
void *data,
void *param)
318 if (!connopen_init())
void * zeBTree_Get(ZEBT_T *, void *)
bool zeBTree_Init(ZEBT_T *, size_t, ZEBT_CMP_F)
bool zeBTree_Add(ZEBT_T *, void *)
#define ZE_LogMsgError(level,...)
bool zeBTree_Destroy(ZEBT_T *)
#define FD_PRINTF(fdp,...)
bool connopen_clean_table()
int zeBTree_Count(ZEBT_T *)
bool zeBTree_Cpy(ZEBT_T *, ZEBT_T *, ZEBT_SEL_F, void *)
#define ZE_MessageInfo(level,...)
int connopen_check_host(char *ip, char *name, int nb)
struct OpenConn_T OpenConn_T
void connopen_print_table(int fd)
bool zeBTree_Cleanup(ZEBT_T *, ZEBT_SEL_F, void *)
int zeBTree_Browse(ZEBT_T *, ZEBT_BROWSE_F, void *)