diff options
author | antirez <antirez@gmail.com> | 2013-01-24 16:20:53 +0100 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2013-01-28 13:14:56 +0100 |
commit | da04e6ed44bf80c5e2fe282522f924e8f55921cb (patch) | |
tree | 486d054f77c25e9d331b72c4eb2c6682dce2dc29 /src/t_string.c | |
parent | 8766e81079dd4e26b0f5e1b04b8fc319b8d13eb7 (diff) | |
download | redis-da04e6ed44bf80c5e2fe282522f924e8f55921cb.tar.gz |
Keyspace events added for more commands.
Diffstat (limited to 'src/t_string.c')
-rw-r--r-- | src/t_string.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/t_string.c b/src/t_string.c index a3e58e5b9..ed7840467 100644 --- a/src/t_string.c +++ b/src/t_string.c @@ -110,6 +110,7 @@ void getsetCommand(redisClient *c) { if (getGenericCommand(c) == REDIS_ERR) return; c->argv[2] = tryObjectEncoding(c->argv[2]); setKey(c->db,c->argv[1],c->argv[2]); + notifyKeyspaceEvent("set",c->argv[1],c->db->id); server.dirty++; } @@ -171,6 +172,7 @@ void setrangeCommand(redisClient *c) { o->ptr = sdsgrowzero(o->ptr,offset+sdslen(value)); memcpy((char*)o->ptr+offset,value,sdslen(value)); signalModifiedKey(c->db,c->argv[1]); + notifyKeyspaceEvent("setrange",c->argv[1],c->db->id); server.dirty++; } addReplyLongLong(c,sdslen(o->ptr)); @@ -255,7 +257,7 @@ void msetGenericCommand(redisClient *c, int nx) { for (j = 1; j < c->argc; j += 2) { c->argv[j+1] = tryObjectEncoding(c->argv[j+1]); setKey(c->db,c->argv[j],c->argv[j+1]); - notifyKeyspaceEvent("set",c->argv[j+1],c->db->id); + notifyKeyspaceEvent("set",c->argv[j],c->db->id); } server.dirty += (c->argc-1)/2; addReply(c, nx ? shared.cone : shared.ok); |