Mercurial > hgrepos > FreeBSD > ports > net > turnserver
changeset 21:735b41782ed7
Update patches to 4.5.2
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Wed, 01 Sep 2021 21:56:11 +0200 |
| parents | 45f84c2bbf43 |
| children | cc083b998fe4 |
| files | files/patch-examples_etc_turnserver.conf files/patch-src_apps_common_hiredis__libevent2.c files/patch-src_apps_relay_dbdrivers_dbd__redis.c |
| diffstat | 3 files changed, 21 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/files/patch-examples_etc_turnserver.conf Wed Sep 01 20:52:51 2021 +0200 +++ b/files/patch-examples_etc_turnserver.conf Wed Sep 01 21:56:11 2021 +0200 @@ -1,9 +1,9 @@ ---- examples/etc/turnserver.conf.orig +--- examples/etc/turnserver.conf.orig 2021-01-10 19:59:55 UTC +++ examples/etc/turnserver.conf -@@ -322,17 +322,17 @@ +@@ -334,17 +334,17 @@ # as the user database. # This database can be used for long-term credential mechanism - # and it can store the secret value for secret-based timed authentication in TURN REST API. + # and it can store the secret value for secret-based timed authentication in TURN REST API. -# Use the string format below (space separated parameters, all optional): +# Use the string format below (space separated parameters, all optional, "socket" has higher prio then "ip"): # @@ -13,12 +13,12 @@ # Redis status and statistics database connection string, if used (default - empty, no Redis stats DB used). # This database keeps allocations status information, and it can be also used for publishing # and delivering traffic and allocation event notifications. - # The connection string has the same parameters as redis-userdb connection string. + # The connection string has the same parameters as redis-userdb connection string. -# Use the string format below (space separated parameters, all optional): +# Use the string format below (space separated parameters, all optional, "socket" has higher prio than "ip"): # -#redis-statsdb="ip=<ip-address> dbname=<database-number> password=<database-user-password> port=<port> connect_timeout=<seconds>" +#redis-statsdb="ip=<ip-address> socket=<unix-domain-socket-path> dbname=<database-number> password=<database-user-password> port=<port> connect_timeout=<seconds>" - # The default realm to be used for the users when no explicit + # The default realm to be used for the users when no explicit # origin/realm relationship is found in the database, or if the TURN
--- a/files/patch-src_apps_common_hiredis__libevent2.c Wed Sep 01 20:52:51 2021 +0200 +++ b/files/patch-src_apps_common_hiredis__libevent2.c Wed Sep 01 21:56:11 2021 +0200 @@ -1,6 +1,6 @@ ---- src/apps/common/hiredis_libevent2.c.orig +--- src/apps/common/hiredis_libevent2.c.orig 2021-01-10 19:59:55 UTC +++ src/apps/common/hiredis_libevent2.c -@@ -55,6 +55,7 @@ +@@ -55,6 +55,7 @@ struct redisLibeventEvents char *ip; int port; char *pwd; @@ -8,7 +8,7 @@ int db; }; -@@ -223,12 +224,13 @@ +@@ -223,12 +224,13 @@ void send_message_to_redis(redis_context_handle rch, c ///////////////////////// Attach ///////////////////////////////// @@ -23,7 +23,7 @@ char ip[256]; if(ip0 && ip0[0]) STRCPY(ip,ip0); -@@ -239,7 +241,14 @@ +@@ -239,7 +241,14 @@ redis_context_handle redisLibeventAttach(struct event_ if(port0>0) port=port0; @@ -39,7 +39,7 @@ if (!ac) { fprintf(stderr,"Error: %s:%s\n", ac->errstr, ac->c.errstr); return NULL; -@@ -256,6 +265,11 @@ +@@ -256,6 +265,11 @@ redis_context_handle redisLibeventAttach(struct event_ e->port = port; if(pwd) e->pwd = strdup(pwd); @@ -51,7 +51,7 @@ e->db = db; /* Register functions to start/stop listening for events */ -@@ -277,6 +291,12 @@ +@@ -277,6 +291,12 @@ redis_context_handle redisLibeventAttach(struct event_ e); if (e->rev == NULL || e->wev == NULL) { @@ -64,7 +64,7 @@ free(e); return NULL; } -@@ -327,7 +347,11 @@ +@@ -327,7 +347,11 @@ static void redis_reconnect(struct redisLibeventEvents e->context = NULL; }
--- a/files/patch-src_apps_relay_dbdrivers_dbd__redis.c Wed Sep 01 20:52:51 2021 +0200 +++ b/files/patch-src_apps_relay_dbdrivers_dbd__redis.c Wed Sep 01 21:56:11 2021 +0200 @@ -1,6 +1,6 @@ ---- src/apps/relay/dbdrivers/dbd_redis.c.orig +--- src/apps/relay/dbdrivers/dbd_redis.c.orig 2021-01-10 19:59:55 UTC +++ src/apps/relay/dbdrivers/dbd_redis.c -@@ -50,6 +50,7 @@ +@@ -50,6 +50,7 @@ struct _Ryconninfo { char *host; char *dbname; char *password; @@ -8,7 +8,7 @@ unsigned int connect_timeout; unsigned int port; }; -@@ -61,6 +62,7 @@ +@@ -61,6 +62,7 @@ static void RyconninfoFree(Ryconninfo *co) { if(co->host) free(co->host); if(co->dbname) free(co->dbname); if(co->password) free(co->password); @@ -16,7 +16,7 @@ bzero(co,sizeof(Ryconninfo)); } } -@@ -103,6 +105,8 @@ +@@ -103,6 +105,8 @@ static Ryconninfo *RyconninfoParse(const char *userdb, co->host = strdup(seq + 1); else if (!strcmp(s, "hostaddr")) co->host = strdup(seq + 1); @@ -25,7 +25,7 @@ else if (!strcmp(s, "dbname")) co->dbname = strdup(seq + 1); else if (!strcmp(s, "db")) -@@ -185,6 +189,7 @@ +@@ -185,6 +189,7 @@ redis_context_handle get_redis_async_connection(struct redisContext *rc = NULL; char ip[256] = "\0"; @@ -33,7 +33,7 @@ int port = DEFAULT_REDIS_PORT; if (co->host) STRCPY(ip,co->host); -@@ -194,13 +199,24 @@ +@@ -194,13 +199,24 @@ redis_context_handle get_redis_async_connection(struct if (co->port) port = (int) (co->port); @@ -60,7 +60,7 @@ } if (!rc) { -@@ -248,7 +264,7 @@ +@@ -248,7 +264,7 @@ redis_context_handle get_redis_async_connection(struct } } @@ -69,7 +69,7 @@ if (!ret) { TURN_LOG_FUNC(TURN_LOG_LEVEL_ERROR, "Cannot initialize Redis DB connection\n"); -@@ -294,12 +310,16 @@ +@@ -294,12 +310,16 @@ static redisContext *get_redis_connection(void) { RyconninfoFree(co); } else { char ip[256] = "\0"; @@ -86,7 +86,7 @@ if (co->port) port = (int) (co->port); -@@ -307,9 +327,17 @@ +@@ -307,9 +327,17 @@ static redisContext *get_redis_connection(void) { struct timeval tv; tv.tv_usec = 0; tv.tv_sec = (time_t) (co->connect_timeout);
