merge conflict resolved

This commit is contained in:
antirez
2010-10-28 22:59:47 +02:00
21 changed files with 539 additions and 473 deletions

View File

@ -246,8 +246,11 @@ loaderr:
*----------------------------------------------------------------------------*/
void configSetCommand(redisClient *c) {
robj *o = getDecodedObject(c->argv[3]);
robj *o;
long long ll;
redisAssert(c->argv[2]->encoding == REDIS_ENCODING_RAW);
redisAssert(c->argv[3]->encoding == REDIS_ENCODING_RAW);
o = c->argv[3];
if (!strcasecmp(c->argv[2]->ptr,"dbfilename")) {
zfree(server.dbfilename);
@ -312,7 +315,6 @@ void configSetCommand(redisClient *c) {
if (startAppendOnly() == REDIS_ERR) {
addReplyError(c,
"Unable to turn on AOF. Check server logs.");
decrRefCount(o);
return;
}
}
@ -354,10 +356,8 @@ void configSetCommand(redisClient *c) {
} else {
addReplyErrorFormat(c,"Unsupported CONFIG parameter: %s",
(char*)c->argv[2]->ptr);
decrRefCount(o);
return;
}
decrRefCount(o);
addReply(c,shared.ok);
return;
@ -365,15 +365,15 @@ badfmt: /* Bad format errors */
addReplyErrorFormat(c,"Invalid argument '%s' for CONFIG SET '%s'",
(char*)o->ptr,
(char*)c->argv[2]->ptr);
decrRefCount(o);
}
void configGetCommand(redisClient *c) {
robj *o = getDecodedObject(c->argv[2]);
robj *o = c->argv[2];
void *replylen = addDeferredMultiBulkLength(c);
char *pattern = o->ptr;
char buf[128];
int matches = 0;
redisAssert(o->encoding == REDIS_ENCODING_RAW);
if (stringmatch(pattern,"dbfilename",0)) {
addReplyBulkCString(c,"dbfilename");
@ -462,7 +462,6 @@ void configGetCommand(redisClient *c) {
sdsfree(buf);
matches++;
}
decrRefCount(o);
setDeferredMultiBulkLength(c,replylen,matches*2);
}