Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
89af7e4c
Commit
89af7e4c
authored
Oct 23, 2019
by
antirez
Browse files
Modules hooks: select the right DB for FLUSHDB events.
parent
bc1ef48e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/module.c
View file @
89af7e4c
...
@@ -5872,6 +5872,9 @@ void moduleFireServerEvent(uint64_t eid, int subid, void *data) {
...
@@ -5872,6 +5872,9 @@ void moduleFireServerEvent(uint64_t eid, int subid, void *data) {
moduledata
=
&
civ1
;
moduledata
=
&
civ1
;
}
else
if
(
eid
==
REDISMODULE_EVENT_FLUSHDB
)
{
}
else
if
(
eid
==
REDISMODULE_EVENT_FLUSHDB
)
{
moduledata
=
data
;
moduledata
=
data
;
RedisModuleFlushInfoV1
*
fi
=
data
;
if
(
fi
->
dbnum
!=
-
1
)
selectDb
(
ctx
.
client
,
fi
->
dbnum
);
}
}
el
->
callback
(
&
ctx
,
el
->
event
,
subid
,
moduledata
);
el
->
callback
(
&
ctx
,
el
->
event
,
subid
,
moduledata
);
moduleFreeContext
(
&
ctx
);
moduleFreeContext
(
&
ctx
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment