]> git.saurik.com Git - redis.git/commitdiff
minor bug fixed in WATCH
authorantirez <antirez@gmail.com>
Tue, 25 May 2010 11:21:23 +0000 (13:21 +0200)
committerantirez <antirez@gmail.com>
Tue, 25 May 2010 11:21:23 +0000 (13:21 +0200)
redis-cli.c
redis.c
staticsymbols.h

index ce8dbde8f863a6462df77a1f8388b2996986bb33..279bf10ca26ee08a33a701817fcc76a989e293fe 100644 (file)
@@ -175,6 +175,8 @@ static struct redisCommand cmdTable[] = {
     {"psubscribe",-2,CMDFLAG_NONE},
     {"punsubscribe",-1,CMDFLAG_NONE},
     {"publish",3,CMDFLAG_NONE},
+    {"watch",-2,CMDFLAG_NONE},
+    {"unwatch",1,CMDFLAG_NONE},
     {NULL,0,CMDFLAG_NONE}
 };
 
diff --git a/redis.c b/redis.c
index b6900d0dacdf0193fb951d51c16d417365afcc04..08fcd978c4ee297a864377de3dd7f8d52554586b 100644 (file)
--- a/redis.c
+++ b/redis.c
@@ -2743,6 +2743,7 @@ static redisClient *createClient(int fd) {
     c->blocking_keys = NULL;
     c->blocking_keys_num = 0;
     c->io_keys = listCreate();
+    c->watched_keys = listCreate();
     listSetFreeMethod(c->io_keys,decrRefCount);
     c->pubsub_channels = dictCreate(&setDictType,NULL);
     c->pubsub_patterns = listCreate();
index 30c4d779abe3c94f6011089acee6bad71740e893..b3ff3db46b06ab81cf41eb7caea736597ecb2c24 100644 (file)
@@ -289,6 +289,7 @@ static struct redisFunctionSym symsTable[] = {
 {"syncReadLine",(unsigned long)syncReadLine},
 {"syncWithMaster",(unsigned long)syncWithMaster},
 {"syncWrite",(unsigned long)syncWrite},
+{"touchWatchedKey",(unsigned long)touchWatchedKey},
 {"tryFreeOneObjectFromFreelist",(unsigned long)tryFreeOneObjectFromFreelist},
 {"tryObjectEncoding",(unsigned long)tryObjectEncoding},
 {"tryResizeHashTables",(unsigned long)tryResizeHashTables},
@@ -297,6 +298,8 @@ static struct redisFunctionSym symsTable[] = {
 {"unblockClientWaitingData",(unsigned long)unblockClientWaitingData},
 {"unlockThreadedIO",(unsigned long)unlockThreadedIO},
 {"unsubscribeCommand",(unsigned long)unsubscribeCommand},
+{"unwatchAllKeys",(unsigned long)unwatchAllKeys},
+{"unwatchCommand",(unsigned long)unwatchCommand},
 {"updateDictResizePolicy",(unsigned long)updateDictResizePolicy},
 {"updateSlavesWaitingBgsave",(unsigned long)updateSlavesWaitingBgsave},
 {"usage",(unsigned long)usage},
@@ -325,6 +328,8 @@ static struct redisFunctionSym symsTable[] = {
 {"waitEmptyIOJobsQueue",(unsigned long)waitEmptyIOJobsQueue},
 {"waitForMultipleSwappedKeys",(unsigned long)waitForMultipleSwappedKeys},
 {"waitForSwappedKey",(unsigned long)waitForSwappedKey},
+{"watchCommand",(unsigned long)watchCommand},
+{"watchForKey",(unsigned long)watchForKey},
 {"xorDigest",(unsigned long)xorDigest},
 {"xorObjectDigest",(unsigned long)xorObjectDigest},
 {"yesnotoi",(unsigned long)yesnotoi},