diff options
author | Ladar Levison <ladar@lavabit.com> | 2019-01-29 23:15:37 +0300 |
---|---|---|
committer | Ladar Levison <ladar@lavabit.com> | 2019-01-29 23:15:37 +0300 |
commit | 98a695e9781c78273dde453d6d690f7f540bdfb7 (patch) | |
tree | ea3a1cefe41fadef88cf2be70757734ef91ab1be /lib | |
parent | 8cc0ad34123282b8255fe88783a9d8dab0d17691 (diff) |
Shortcut the dump logic till we handle lru_crawler responses properly.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/patches/memcached/1.0.18_fix_dump_function.patch | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/patches/memcached/1.0.18_fix_dump_function.patch b/lib/patches/memcached/1.0.18_fix_dump_function.patch index cd34d3ed..1286f809 100644 --- a/lib/patches/memcached/1.0.18_fix_dump_function.patch +++ b/lib/patches/memcached/1.0.18_fix_dump_function.patch @@ -36,13 +36,13 @@ index 8ddb2ee..ce09190 100644 + + /* The lru_metacrawler metadump doesn't arrive until version 1.4.33. */ + if ((instance->major_version == 1 && instance->minor_version == 4 && instance->micro_version < 33) || -+ (instance->major_version <= 1 && instance->minor_version < 4)) { ++ (instance->major_version <= 1 && instance->minor_version < 4) || (instance->major_version <= 99)) { + + uint32_t slabs= 64; + int buffer_length; + char buffer[MEMCACHED_DEFAULT_COMMAND_SIZE]; + -+ /* The number of slabs descreased from 200 to 64 with version 1.4.23. Dumping versions with 256 slabs is unsupported. */ ++ /* The number of slabs decreased from 200 to 64 with version 1.4.23. Dumping versions with 256 slabs is unsupported. */ + if (instance->major_version == 1 && instance->minor_version == 4 && instance->micro_version < 23) + slabs= 200; + @@ -163,7 +163,7 @@ index 8ddb2ee..ce09190 100644 + while ((response_rc = memcached_response(instance, buffer, MEMCACHED_DEFAULT_COMMAND_SIZE, NULL)) != MEMCACHED_END) { - string_ptr= buffer; -- string_ptr+= 5; /* Move past ITEM */ +- string_ptr+= 4; /* Move past key= */ + if (response_rc == MEMCACHED_ITEM) + { + char *string_ptr, *end_ptr; |