Module: kamailio
Branch: master
Commit: 37076691941b5e4c3461eb24108f737ff2fd2d64
URL:
https://github.com/kamailio/kamailio/commit/37076691941b5e4c3461eb24108f737…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-04-24T21:07:26+02:00
ndb_redis: fixed comparing unix socket buffer variable in error cases
---
Modified: src/modules/ndb_redis/redis_client.c
---
Diff:
https://github.com/kamailio/kamailio/commit/37076691941b5e4c3461eb24108f737…
Patch:
https://github.com/kamailio/kamailio/commit/37076691941b5e4c3461eb24108f737…
---
diff --git a/src/modules/ndb_redis/redis_client.c b/src/modules/ndb_redis/redis_client.c
index c4fee91..4b90c5f 100644
--- a/src/modules/ndb_redis/redis_client.c
+++ b/src/modules/ndb_redis/redis_client.c
@@ -164,7 +164,7 @@ int redisc_init(void)
return -1;
err:
- if (unix_sock_path != NULL) {
+ if (sock != 0) {
LM_ERR("failed to connect to redis server [%.*s] (unix:%s db:%d)\n",
rsrv->sname->len, rsrv->sname->s, unix_sock_path, db);
} else {
@@ -367,7 +367,7 @@ int redisc_reconnect_server(redisc_server_t *rsrv)
return 0;
err2:
- if (unix_sock_path != NULL) {
+ if (sock != 0) {
LM_ERR("error communicating with redis server [%.*s]"
" (unix:%s db:%d): %s\n",
rsrv->sname->len, rsrv->sname->s, unix_sock_path, db,
@@ -378,7 +378,7 @@ int redisc_reconnect_server(redisc_server_t *rsrv)
rsrv->ctxRedis->errstr);
}
err:
- if (unix_sock_path != NULL) {
+ if (sock != 0) {
LM_ERR("failed to connect to redis server [%.*s] (unix:%s db:%d)\n",
rsrv->sname->len, rsrv->sname->s, unix_sock_path, db);
} else {