Changeset 497
- Timestamp:
- 04/12/07 14:40:18 (2 years ago)
- Files:
-
- branches/multithreaded/server/ChangeLog (modified) (1 diff)
- branches/multithreaded/server/assoc.c (modified) (1 diff)
- branches/multithreaded/server/doc/protocol.txt (modified) (1 diff)
- branches/multithreaded/server/items.c (modified) (1 diff)
- branches/multithreaded/server/memcached.c (modified) (2 diffs)
- branches/multithreaded/server/memcached.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/multithreaded/server/ChangeLog
r490 r497 1 2007-04-12 Paul Lindner <lindner@mirth.inuus.com> 2 3 * Allow changes to the verbosity level of the server with a new 4 "verbosity" command. Patch contributed by Paolo Borelli 5 <paolo.borelli@gmail.com>. 6 1 7 2007-04-08 Paul Lindner <lindner@inuus.com> 2 8 branches/multithreaded/server/assoc.c
r493 r497 241 241 a+=k[0]+(((uint32_t)k[1])<<16); 242 242 break; 243 case 11: c+=((uint32_t)k8[10])<<16; /* fallthrough */244 case 10: c+=k[4]; 243 case 11: c+=((uint32_t)k8[10])<<16; /* @fallthrough */ 244 case 10: c+=k[4]; /* @fallthrough@ */ 245 245 b+=k[2]+(((uint32_t)k[3])<<16); 246 246 a+=k[0]+(((uint32_t)k[1])<<16); 247 247 break; 248 case 9 : c+=k8[8]; /* fallthrough */248 case 9 : c+=k8[8]; /* @fallthrough */ 249 249 case 8 : b+=k[2]+(((uint32_t)k[3])<<16); 250 250 a+=k[0]+(((uint32_t)k[1])<<16); 251 251 break; 252 case 7 : b+=((uint32_t)k8[6])<<16; /* fallthrough */252 case 7 : b+=((uint32_t)k8[6])<<16; /* @fallthrough */ 253 253 case 6 : b+=k[2]; 254 254 a+=k[0]+(((uint32_t)k[1])<<16); 255 255 break; 256 case 5 : b+=k8[4]; /* fallthrough */256 case 5 : b+=k8[4]; /* @fallthrough */ 257 257 case 4 : a+=k[0]+(((uint32_t)k[1])<<16); 258 258 break; 259 case 3 : a+=((uint32_t)k8[2])<<16; /* fallthrough */259 case 3 : a+=((uint32_t)k8[2])<<16; /* @fallthrough */ 260 260 case 2 : a+=k[0]; 261 261 break; branches/multithreaded/server/doc/protocol.txt
r487 r497 400 400 server. 401 401 402 "verbosity" is a command with one argument, the verbosity level: 403 404 verbosity 2\r\n 405 406 In response, the server sends 407 408 "DONE" 409 402 410 403 411 "quit" is a command with no arguments: branches/multithreaded/server/items.c
r493 r497 103 103 if (tails[id] == 0) return NULL; 104 104 105 for (search = tails[id]; tries > 0 && search ; tries--, search=search->prev) {105 for (search = tails[id]; tries > 0 && search != NULL; tries--, search=search->prev) { 106 106 if (search->refcount == 0) { 107 107 if (search->exptime > current_time) { branches/multithreaded/server/memcached.c
r493 r497 1412 1412 } 1413 1413 1414 static void process_verbosity_command(conn *c, token_t *tokens, const size_t ntokens) { 1415 unsigned int level; 1416 1417 assert(c != NULL); 1418 1419 level = strtoul(tokens[1].value, NULL, 10); 1420 settings.verbose = level > MAX_VERBOSITY_LEVEL ? MAX_VERBOSITY_LEVEL : level; 1421 out_string(c, "DONE"); 1422 return; 1423 } 1424 1414 1425 static void process_command(conn *c, char *command) { 1415 1426 … … 1588 1599 out_string(c, "CLIENT_ERROR Slab reassignment not supported"); 1589 1600 #endif 1590 1601 } else if (ntokens == 3 && (strcmp(tokens[COMMAND_TOKEN].value, "verbosity") == 0)) { 1602 process_verbosity_command(c, tokens, ntokens); 1591 1603 } else { 1592 1604 out_string(c, "ERROR"); branches/multithreaded/server/memcached.h
r487 r497 60 60 unsigned long long bytes_written; 61 61 }; 62 63 #define MAX_VERBOSITY_LEVEL 2 62 64 63 65 struct settings {
