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
baf5b3f9
Commit
baf5b3f9
authored
Nov 30, 2018
by
antirez
Browse files
RESP3: module.c updated.
parent
920611a4
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/module.c
View file @
baf5b3f9
...
...
@@ -1123,10 +1123,10 @@ int RM_ReplyWithArray(RedisModuleCtx *ctx, long len) {
ctx
->
postponed_arrays
=
zrealloc
(
ctx
->
postponed_arrays
,
sizeof
(
void
*
)
*
(
ctx
->
postponed_arrays_count
+
1
));
ctx
->
postponed_arrays
[
ctx
->
postponed_arrays_count
]
=
addDeferred
MultiBulkLength
(
c
);
add
Reply
Deferred
Len
(
c
);
ctx
->
postponed_arrays_count
++
;
}
else
{
addReply
MultiBulk
Len
(
c
,
len
);
addReply
Array
Len
(
c
,
len
);
}
return
REDISMODULE_OK
;
}
...
...
@@ -1169,7 +1169,7 @@ void RM_ReplySetArrayLength(RedisModuleCtx *ctx, long len) {
return
;
}
ctx
->
postponed_arrays_count
--
;
setDeferred
MultiBulkLength
(
c
,
setDeferred
ArrayLen
(
c
,
ctx
->
postponed_arrays
[
ctx
->
postponed_arrays_count
],
len
);
if
(
ctx
->
postponed_arrays_count
==
0
)
{
...
...
@@ -1205,7 +1205,7 @@ int RM_ReplyWithString(RedisModuleCtx *ctx, RedisModuleString *str) {
int
RM_ReplyWithNull
(
RedisModuleCtx
*
ctx
)
{
client
*
c
=
moduleGetReplyClient
(
ctx
);
if
(
c
==
NULL
)
return
REDISMODULE_OK
;
addReply
(
c
,
shared
.
nullbulk
);
addReply
Null
(
c
);
return
REDISMODULE_OK
;
}
...
...
@@ -4868,11 +4868,11 @@ NULL
dictIterator
*
di
=
dictGetIterator
(
modules
);
dictEntry
*
de
;
addReply
MultiBulk
Len
(
c
,
dictSize
(
modules
));
addReply
Array
Len
(
c
,
dictSize
(
modules
));
while
((
de
=
dictNext
(
di
))
!=
NULL
)
{
sds
name
=
dictGetKey
(
de
);
struct
RedisModule
*
module
=
dictGetVal
(
de
);
addReplyM
ultiBulk
Len
(
c
,
4
);
addReplyM
ap
Len
(
c
,
2
);
addReplyBulkCString
(
c
,
"name"
);
addReplyBulkCBuffer
(
c
,
name
,
sdslen
(
name
));
addReplyBulkCString
(
c
,
"ver"
);
...
...
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