]> git.saurik.com Git - redis.git/commitdiff
a few more fixes, still broken
authorantirez <antirez@gmail.com>
Tue, 29 Dec 2009 20:50:08 +0000 (15:50 -0500)
committerantirez <antirez@gmail.com>
Tue, 29 Dec 2009 20:50:08 +0000 (15:50 -0500)
redis.c

diff --git a/redis.c b/redis.c
index 71f1594f057fb586244985d2698cf45f482f4c2d..43a86ca97c51679fce8cae189050f394ca426ca9 100644 (file)
--- a/redis.c
+++ b/redis.c
@@ -5479,6 +5479,7 @@ static void blockForKey(redisClient *c, robj *key, time_t timeout) {
     dictEntry *de;
     list *l;
 
     dictEntry *de;
     list *l;
 
+    printf("blockForKey %p %s\n", c, key->ptr);
     c->blockingkey = key;
     incrRefCount(key);
     c->blockingto = timeout;
     c->blockingkey = key;
     incrRefCount(key);
     c->blockingto = timeout;
@@ -5488,6 +5489,7 @@ static void blockForKey(redisClient *c, robj *key, time_t timeout) {
 
         l = listCreate();
         retval = dictAdd(c->db->blockingkeys,key,l);
 
         l = listCreate();
         retval = dictAdd(c->db->blockingkeys,key,l);
+        incrRefCount(key);
         assert(retval == DICT_OK);
     } else {
         l = dictGetEntryVal(de);
         assert(retval == DICT_OK);
     } else {
         l = dictGetEntryVal(de);
@@ -5502,6 +5504,7 @@ static void unblockClient(redisClient *c) {
     dictEntry *de;
     list *l;
 
     dictEntry *de;
     list *l;
 
+    printf("unblockClient %p %s\n", c, c->blockingkey->ptr);
     /* Remove this client from the list of clients waiting for this key. */
     assert(c->blockingkey != NULL);
     de = dictFind(c->db->blockingkeys,c->blockingkey);
     /* Remove this client from the list of clients waiting for this key. */
     assert(c->blockingkey != NULL);
     de = dictFind(c->db->blockingkeys,c->blockingkey);