From cd4fd1eca6b715d0c5e3b0ad525c280b02cb6dcc Mon Sep 17 00:00:00 2001 From: Andrew Pogrebennyk Date: Wed, 28 Sep 2011 13:35:57 +0000 Subject: [PATCH] fix connect arguments parsing (mft) --- modules/ndb_redis/redis_client.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/ndb_redis/redis_client.c b/modules/ndb_redis/redis_client.c index 6a91019d3..9f4ffc4e5 100644 --- a/modules/ndb_redis/redis_client.c +++ b/modules/ndb_redis/redis_client.c @@ -71,10 +71,10 @@ int redisc_init(void) addr = pit->body.s; addr[pit->body.len] = '\0'; } else if(pit->name.len==4 && strncmp(pit->name.s, "port", 4)==0) { - if(!str2int(&pit->body, &port)) + if(str2int(&pit->body, &port) < 0) port = 6379; } else if(pit->name.len==2 && strncmp(pit->name.s, "db", 2)==0) { - if(!str2int(&pit->body, &db)) + if(str2int(&pit->body, &db) < 0) db = 0; } }