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
7c5dc070
Unverified
Commit
7c5dc070
authored
Mar 23, 2020
by
Salvatore Sanfilippo
Committed by
GitHub
Mar 23, 2020
Browse files
Merge pull request #7003 from guybe7/rm_context_flags_handle_null
Allow RM_GetContextFlags to work with ctx==NULL
parents
b9e5be5f
f16eaadd
Changes
1
Show whitespace changes
Inline
Side-by-side
src/module.c
View file @
7c5dc070
...
@@ -1848,6 +1848,7 @@ int RM_GetContextFlags(RedisModuleCtx *ctx) {
...
@@ -1848,6 +1848,7 @@ int RM_GetContextFlags(RedisModuleCtx *ctx) {
int
flags
=
0
;
int
flags
=
0
;
/* Client specific flags */
/* Client specific flags */
if
(
ctx
)
{
if
(
ctx
->
client
)
{
if
(
ctx
->
client
)
{
if
(
ctx
->
client
->
flags
&
CLIENT_LUA
)
if
(
ctx
->
client
->
flags
&
CLIENT_LUA
)
flags
|=
REDISMODULE_CTX_FLAGS_LUA
;
flags
|=
REDISMODULE_CTX_FLAGS_LUA
;
...
@@ -1863,6 +1864,7 @@ int RM_GetContextFlags(RedisModuleCtx *ctx) {
...
@@ -1863,6 +1864,7 @@ int RM_GetContextFlags(RedisModuleCtx *ctx) {
if
(
c
&&
(
c
->
flags
&
(
CLIENT_DIRTY_CAS
|
CLIENT_DIRTY_EXEC
)))
{
if
(
c
&&
(
c
->
flags
&
(
CLIENT_DIRTY_CAS
|
CLIENT_DIRTY_EXEC
)))
{
flags
|=
REDISMODULE_CTX_FLAGS_MULTI_DIRTY
;
flags
|=
REDISMODULE_CTX_FLAGS_MULTI_DIRTY
;
}
}
}
if
(
server
.
cluster_enabled
)
if
(
server
.
cluster_enabled
)
flags
|=
REDISMODULE_CTX_FLAGS_CLUSTER
;
flags
|=
REDISMODULE_CTX_FLAGS_CLUSTER
;
...
...
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