code cleaning
This commit is contained in:
parent
9174961875
commit
ff0e692c5b
@ -32,8 +32,6 @@
|
||||
|
||||
#define __HIREDIS_LIBEVENT_H__
|
||||
|
||||
#if !defined(TURN_NO_HIREDIS)
|
||||
|
||||
#include <event2/event.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -48,6 +46,8 @@ typedef void* redis_context_handle;
|
||||
|
||||
//////////////////////////////////////
|
||||
|
||||
#if !defined(TURN_NO_HIREDIS)
|
||||
|
||||
void redis_async_init(void);
|
||||
|
||||
redis_context_handle redisLibeventAttach(struct event_base *base, char *ip, int port, char *pwd, int db);
|
||||
@ -56,12 +56,12 @@ void send_message_to_redis(redis_context_handle rch, const char *command, const
|
||||
|
||||
int is_redis_asyncconn_good(redis_context_handle rch);
|
||||
|
||||
#endif
|
||||
/* TURN_NO_HIREDIS */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
/* TURN_NO_HIREDIS */
|
||||
|
||||
#endif
|
||||
/*__HIREDIS_LIBEVENT_H__*/
|
||||
|
||||
@ -73,9 +73,7 @@ TURN_VERBOSE_NONE,0,0,
|
||||
DEFAULT_STUN_PORT,DEFAULT_STUN_TLS_PORT,0,0,1,
|
||||
0,0,0,0,
|
||||
"",
|
||||
#if !defined(TURN_NO_HIREDIS)
|
||||
"",0,
|
||||
#endif
|
||||
{
|
||||
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,NULL,NULL,NULL
|
||||
},
|
||||
@ -86,11 +84,7 @@ NEV_UNKNOWN,
|
||||
LOW_DEFAULT_PORTS_BOUNDARY,HIGH_DEFAULT_PORTS_BOUNDARY,0,0,"",
|
||||
0,NULL,0,NULL,DEFAULT_GENERAL_RELAY_SERVERS_NUMBER,0,
|
||||
////////////// Auth server /////////////////////////////////////
|
||||
{NULL,NULL,NULL,0
|
||||
#if !defined(TURN_NO_HIREDIS)
|
||||
,NULL
|
||||
#endif
|
||||
},
|
||||
{NULL,NULL,NULL,0,NULL},
|
||||
/////////////// AUX SERVERS ////////////////
|
||||
{NULL,0,{0,NULL}},0,
|
||||
/////////////// ALTERNATE SERVERS ////////////////
|
||||
|
||||
@ -83,9 +83,7 @@
|
||||
|
||||
#include "ns_ioalib_impl.h"
|
||||
|
||||
#if !defined(TURN_NO_HIREDIS)
|
||||
#include "hiredis_libevent2.h"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@ -172,9 +170,7 @@ struct auth_server {
|
||||
struct bufferevent *in_buf;
|
||||
struct bufferevent *out_buf;
|
||||
pthread_t thr;
|
||||
#if !defined(TURN_NO_HIREDIS)
|
||||
redis_context_handle rch;
|
||||
#endif
|
||||
};
|
||||
|
||||
/////////// PARAMS //////////////////////////////////
|
||||
@ -240,10 +236,8 @@ typedef struct _turn_params_ {
|
||||
|
||||
char listener_ifname[1025];
|
||||
|
||||
#if !defined(TURN_NO_HIREDIS)
|
||||
char redis_statsdb[1025];
|
||||
int use_redis_statsdb;
|
||||
#endif
|
||||
|
||||
struct listener_server listener;
|
||||
|
||||
|
||||
@ -2893,13 +2893,7 @@ int adminuser(u08bits *user, u08bits *realm, u08bits *pwd, u08bits *secret, u08b
|
||||
|
||||
/////////// PING //////////////
|
||||
|
||||
void auth_ping(
|
||||
#if !defined(TURN_NO_HIREDIS)
|
||||
redis_context_handle rch
|
||||
#else
|
||||
void
|
||||
#endif
|
||||
)
|
||||
void auth_ping(redis_context_handle rch)
|
||||
{
|
||||
donot_print_connection_success = 1;
|
||||
|
||||
|
||||
@ -191,13 +191,7 @@ void release_allocation_quota(u08bits *username, u08bits *realm);
|
||||
/////////// Handle user DB /////////////////
|
||||
|
||||
void read_userdb_file(int to_print);
|
||||
void auth_ping(
|
||||
#if !defined(TURN_NO_HIREDIS)
|
||||
redis_context_handle rch
|
||||
#else
|
||||
void
|
||||
#endif
|
||||
);
|
||||
void auth_ping(redis_context_handle rch);
|
||||
void reread_realms(void);
|
||||
int add_user_account(char *user, int dynamic);
|
||||
int adminuser(u08bits *user, u08bits *realm, u08bits *pwd, u08bits *secret, u08bits *origin, TURNADMIN_COMMAND_TYPE ct, int is_st, perf_options_t* po);
|
||||
@ -207,7 +201,6 @@ int add_ip_list_range(char* range, ip_range_list_t * list);
|
||||
///////////// Redis //////////////////////
|
||||
|
||||
#if !defined(TURN_NO_HIREDIS)
|
||||
#include "hiredis_libevent2.h"
|
||||
redis_context_handle get_redis_async_connection(struct event_base *base, const char* connection_string, int delete_keys);
|
||||
#endif
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user