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:
authorNicolas Favre-Felix <n.favrefelix@gmail.com>2011-12-29 18:16:47 +0400
committerNicolas Favre-Felix <n.favrefelix@gmail.com>2011-12-29 18:16:47 +0400
commit87dfaf4212f522a142e51eb2f923c23e70212d27 (patch)
tree216c2b334c392e0c0824fcdc38b296e300f8d38c /library.c
parentc6672f0a967b3340fd85f8225847a19d91d8dd46 (diff)
Properly parse new-style info blocks.
Diffstat (limited to 'library.c')
-rw-r--r--library.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/library.c b/library.c
index 506407b5..a1f7cebf 100644
--- a/library.c
+++ b/library.c
@@ -421,6 +421,15 @@ PHPAPI void redis_info_response(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_s
cur = response;
while(1) {
+
+ /* skip comments and empty lines */
+ if(*cur == '#' || *cur == '\r') {
+ if(!(cur = strchr(cur, '\n')))
+ break;
+ cur++;
+ continue;
+ }
+
/* key */
pos = strchr(cur, ':');
if(pos == NULL) {