diff options
author | Nicolas Favre-Felix <n.favrefelix@gmail.com> | 2011-12-29 18:16:47 +0400 |
---|---|---|
committer | Nicolas Favre-Felix <n.favrefelix@gmail.com> | 2011-12-29 18:16:47 +0400 |
commit | 87dfaf4212f522a142e51eb2f923c23e70212d27 (patch) | |
tree | 216c2b334c392e0c0824fcdc38b296e300f8d38c /library.c | |
parent | c6672f0a967b3340fd85f8225847a19d91d8dd46 (diff) |
Properly parse new-style info blocks.
Diffstat (limited to 'library.c')
-rw-r--r-- | library.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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) { |