Changeset 496
- Timestamp:
- 04/12/07 14:38:05 (2 years ago)
- Files:
-
- trunk/server/ChangeLog (modified) (1 diff)
- trunk/server/assoc.c (modified) (1 diff)
- trunk/server/doc/protocol.txt (modified) (1 diff)
- trunk/server/items.c (modified) (1 diff)
- trunk/server/memcached.c (modified) (2 diffs)
- trunk/server/memcached.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/server/ChangeLog
r492 r496 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 trunk/server/assoc.c
r492 r496 246 246 a+=k[0]+(((uint32_t)k[1])<<16); 247 247 break; 248 case 11: c+=((uint32_t)k8[10])<<16; /* fallthrough */249 case 10: c+=k[4]; 248 case 11: c+=((uint32_t)k8[10])<<16; /* @fallthrough */ 249 case 10: c+=k[4]; /* @fallthrough@ */ 250 250 b+=k[2]+(((uint32_t)k[3])<<16); 251 251 a+=k[0]+(((uint32_t)k[1])<<16); 252 252 break; 253 case 9 : c+=k8[8]; /* fallthrough */253 case 9 : c+=k8[8]; /* @fallthrough */ 254 254 case 8 : b+=k[2]+(((uint32_t)k[3])<<16); 255 255 a+=k[0]+(((uint32_t)k[1])<<16); 256 256 break; 257 case 7 : b+=((uint32_t)k8[6])<<16; /* fallthrough */257 case 7 : b+=((uint32_t)k8[6])<<16; /* @fallthrough */ 258 258 case 6 : b+=k[2]; 259 259 a+=k[0]+(((uint32_t)k[1])<<16); 260 260 break; 261 case 5 : b+=k8[4]; /* fallthrough */261 case 5 : b+=k8[4]; /* @fallthrough */ 262 262 case 4 : a+=k[0]+(((uint32_t)k[1])<<16); 263 263 break; 264 case 3 : a+=((uint32_t)k8[2])<<16; /* fallthrough */264 case 3 : a+=((uint32_t)k8[2])<<16; /* @fallthrough */ 265 265 case 2 : a+=k[0]; 266 266 break; trunk/server/doc/protocol.txt
r484 r496 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: trunk/server/items.c
r492 r496 97 97 if (tails[id] == 0) return NULL; 98 98 99 for (search = tails[id]; tries > 0 && search ; tries--, search=search->prev) {99 for (search = tails[id]; tries > 0 && search != NULL; tries--, search=search->prev) { 100 100 if (search->refcount == 0) { 101 101 if (search->exptime > current_time) trunk/server/memcached.c
r492 r496 1323 1323 } 1324 1324 1325 static void process_verbosity_command(conn *c, token_t *tokens, const size_t ntokens) { 1326 unsigned int level; 1327 1328 assert(c != NULL); 1329 1330 level = strtoul(tokens[1].value, NULL, 10); 1331 settings.verbose = level > MAX_VERBOSITY_LEVEL ? MAX_VERBOSITY_LEVEL : level; 1332 out_string(c, "DONE"); 1333 return; 1334 } 1335 1325 1336 static void process_command(conn *c, char *command) { 1326 1337 … … 1499 1510 out_string(c, "CLIENT_ERROR Slab reassignment not supported"); 1500 1511 #endif 1501 1512 } else if (ntokens == 3 && (strcmp(tokens[COMMAND_TOKEN].value, "verbosity") == 0)) { 1513 process_verbosity_command(c, tokens, ntokens); 1502 1514 } else { 1503 1515 out_string(c, "ERROR"); trunk/server/memcached.h
r476 r496 54 54 unsigned long long bytes_written; 55 55 }; 56 57 #define MAX_VERBOSITY_LEVEL 2 56 58 57 59 struct settings {
