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
7cefbeaa
Commit
7cefbeaa
authored
Oct 23, 2019
by
antirez
Browse files
Modules hooks: select DB zero by default.
parent
d3266d51
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/module.c
View file @
7cefbeaa
...
@@ -5877,6 +5877,11 @@ void moduleFireServerEvent(uint64_t eid, int subid, void *data) {
...
@@ -5877,6 +5877,11 @@ void moduleFireServerEvent(uint64_t eid, int subid, void *data) {
void
*
moduledata
=
NULL
;
void
*
moduledata
=
NULL
;
RedisModuleClientInfoV1
civ1
;
RedisModuleClientInfoV1
civ1
;
/* Start at DB zero by default when calling the handler. It's
* up to the specific event setup to change it when it makes
* sense. For instance for FLUSHDB events we select the correct
* DB automatically. */
selectDb
(
ctx
.
client
,
0
);
if
(
eid
==
REDISMODULE_EVENT_CLIENT_CHANGE
)
{
if
(
eid
==
REDISMODULE_EVENT_CLIENT_CHANGE
)
{
modulePopulateClientInfoStructure
(
&
civ1
,
data
,
modulePopulateClientInfoStructure
(
&
civ1
,
data
,
el
->
event
.
dataver
);
el
->
event
.
dataver
);
...
...
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