Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpredis/phpredis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavlo Yatsukhnenko <yatsukhnenko@gmail.com>2019-09-25 10:26:32 +0300
committerPavlo Yatsukhnenko <yatsukhnenko@gmail.com>2019-09-25 10:26:32 +0300
commit3d8b85259c47bc9fac69a6a0a20dc1d5a35c4a3a (patch)
tree7d138f813607a2bfaf33a96ab98c840eacce26c8 /library.c
parent92b3f5d7824ddf31c06cd3a785e24b466ea7dc0b (diff)
Use negative port number to indicate unix socket
Diffstat (limited to 'library.c')
-rw-r--r--library.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/library.c b/library.c
index 6bf42a94..0ef3e658 100644
--- a/library.c
+++ b/library.c
@@ -1807,7 +1807,7 @@ PHP_REDIS_API int redis_sock_connect(RedisSock *redis_sock)
schema = estrndup(address, pos - address);
address = pos + sizeof("://") - 1;
}
- if (redis_sock->port < 1) {
+ if (redis_sock->port < 0) {
host_len = snprintf(host, sizeof(host), "unix://%s", address);
usocket = 1;
} else {