"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/debug.c" between
redis-6.2.4.tar.gz and redis-6.2.5.tar.gz

About: redis is an advanced key-value store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets and sorted sets.

debug.c  (redis-6.2.4):debug.c  (redis-6.2.5)
skipping to change at line 724 skipping to change at line 724
/* DEBUG PROTOCOL [string|integer|double|bignum|null|array|set|map| /* DEBUG PROTOCOL [string|integer|double|bignum|null|array|set|map|
* attrib|push|verbatim|true|false] */ * attrib|push|verbatim|true|false] */
char *name = c->argv[2]->ptr; char *name = c->argv[2]->ptr;
if (!strcasecmp(name,"string")) { if (!strcasecmp(name,"string")) {
addReplyBulkCString(c,"Hello World"); addReplyBulkCString(c,"Hello World");
} else if (!strcasecmp(name,"integer")) { } else if (!strcasecmp(name,"integer")) {
addReplyLongLong(c,12345); addReplyLongLong(c,12345);
} else if (!strcasecmp(name,"double")) { } else if (!strcasecmp(name,"double")) {
addReplyDouble(c,3.14159265359); addReplyDouble(c,3.14159265359);
} else if (!strcasecmp(name,"bignum")) { } else if (!strcasecmp(name,"bignum")) {
addReplyProto(c,"(1234567999999999999999999999999999999\r\n",40); addReplyBigNum(c,"1234567999999999999999999999999999999",37);
} else if (!strcasecmp(name,"null")) { } else if (!strcasecmp(name,"null")) {
addReplyNull(c); addReplyNull(c);
} else if (!strcasecmp(name,"array")) { } else if (!strcasecmp(name,"array")) {
addReplyArrayLen(c,3); addReplyArrayLen(c,3);
for (int j = 0; j < 3; j++) addReplyLongLong(c,j); for (int j = 0; j < 3; j++) addReplyLongLong(c,j);
} else if (!strcasecmp(name,"set")) { } else if (!strcasecmp(name,"set")) {
addReplySetLen(c,3); addReplySetLen(c,3);
for (int j = 0; j < 3; j++) addReplyLongLong(c,j); for (int j = 0; j < 3; j++) addReplyLongLong(c,j);
} else if (!strcasecmp(name,"map")) { } else if (!strcasecmp(name,"map")) {
addReplyMapLen(c,3); addReplyMapLen(c,3);
for (int j = 0; j < 3; j++) { for (int j = 0; j < 3; j++) {
addReplyLongLong(c,j); addReplyLongLong(c,j);
addReplyBool(c, j == 1); addReplyBool(c, j == 1);
} }
} else if (!strcasecmp(name,"attrib")) { } else if (!strcasecmp(name,"attrib")) {
addReplyAttributeLen(c,1); if (c->resp >= 3) {
addReplyBulkCString(c,"key-popularity"); addReplyAttributeLen(c,1);
addReplyArrayLen(c,2); addReplyBulkCString(c,"key-popularity");
addReplyBulkCString(c,"key:123"); addReplyArrayLen(c,2);
addReplyLongLong(c,90); addReplyBulkCString(c,"key:123");
addReplyLongLong(c,90);
}
/* Attributes are not real replies, so a well formed reply should /* Attributes are not real replies, so a well formed reply should
* also have a normal reply type after the attribute. */ * also have a normal reply type after the attribute. */
addReplyBulkCString(c,"Some real reply following the attribute"); addReplyBulkCString(c,"Some real reply following the attribute");
} else if (!strcasecmp(name,"push")) { } else if (!strcasecmp(name,"push")) {
addReplyPushLen(c,2); addReplyPushLen(c,2);
addReplyBulkCString(c,"server-cpu-usage"); addReplyBulkCString(c,"server-cpu-usage");
addReplyLongLong(c,42); addReplyLongLong(c,42);
/* Push replies are not synchronous replies, so we emit also a /* Push replies are not synchronous replies, so we emit also a
* normal reply in order for blocking clients just discarding the * normal reply in order for blocking clients just discarding the
* push reply, to actually consume the reply and continue. */ * push reply, to actually consume the reply and continue. */
 End of changes. 2 change blocks. 
6 lines changed or deleted 8 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)