Skip to content

Instantly share code, notes, and snippets.

@oschaaf
Created May 29, 2018 10:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oschaaf/3664892e9ee7deee8bf5b51e0787332c to your computer and use it in GitHub Desktop.
Save oschaaf/3664892e9ee7deee8bf5b51e0787332c to your computer and use it in GitHub Desktop.
atsmemcache patch
diff --git a/plugins/experimental/memcache/tsmemcache.cc b/plugins/experimental/memcache/tsmemcache.cc
index 1f8465c40..6b2b53546 100644
--- a/plugins/experimental/memcache/tsmemcache.cc
+++ b/plugins/experimental/memcache/tsmemcache.cc
@@ -679,6 +679,9 @@ MC::ascii_response(const char *s, int len)
wvio->reenable();
MCDebugBuf("tsmemcache_ascii_response", s, len);
}
+ if (len > 3 && s[0] == 'C' && s[1] == 'L') {
+ raise(SIGTRAP);
+ }
if (end_of_cmd > 0) {
reader->consume(end_of_cmd);
return read_from_client();
@@ -1197,6 +1200,9 @@ MC::ascii_delete(char *s, char *e)
}
SKIP_SPACE;
}
+ if (*s == '0') {
+ s++;
+ }
if (*s == '\r') {
s++;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment