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
8042afb2
Commit
8042afb2
authored
Dec 10, 2018
by
antirez
Browse files
RESP3: Fix addReplyBool() RESP2/3 output.
parent
4e2dd54d
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/debug.c
View file @
8042afb2
...
@@ -551,7 +551,10 @@ NULL
...
@@ -551,7 +551,10 @@ NULL
for
(
int
j
=
0
;
j
<
3
;
j
++
)
addReplyLongLong
(
c
,
j
);
for
(
int
j
=
0
;
j
<
3
;
j
++
)
addReplyLongLong
(
c
,
j
);
}
else
if
(
!
strcasecmp
(
name
,
"map"
))
{
}
else
if
(
!
strcasecmp
(
name
,
"map"
))
{
addReplyMapLen
(
c
,
3
);
addReplyMapLen
(
c
,
3
);
for
(
int
j
=
0
;
j
<
3
;
j
++
)
addReplyLongLong
(
c
,
j
);
for
(
int
j
=
0
;
j
<
3
;
j
++
)
{
addReplyLongLong
(
c
,
j
);
addReplyBool
(
c
,
j
==
1
);
}
}
else
if
(
!
strcasecmp
(
name
,
"attrib"
))
{
}
else
if
(
!
strcasecmp
(
name
,
"attrib"
))
{
addReplyAttributeLen
(
c
,
1
);
addReplyAttributeLen
(
c
,
1
);
addReplyBulkCString
(
c
,
"key-popularity"
);
addReplyBulkCString
(
c
,
"key-popularity"
);
...
...
src/networking.c
View file @
8042afb2
...
@@ -612,7 +612,7 @@ void addReplyNull(client *c) {
...
@@ -612,7 +612,7 @@ void addReplyNull(client *c) {
}
}
void
addReplyBool
(
client
*
c
,
int
b
)
{
void
addReplyBool
(
client
*
c
,
int
b
)
{
if
(
c
->
resp
==
3
)
{
if
(
c
->
resp
==
2
)
{
addReply
(
c
,
b
?
shared
.
cone
:
shared
.
czero
);
addReply
(
c
,
b
?
shared
.
cone
:
shared
.
czero
);
}
else
{
}
else
{
addReplyString
(
c
,
b
?
"#t
\r\n
"
:
"#f
\r\n
"
,
4
);
addReplyString
(
c
,
b
?
"#t
\r\n
"
:
"#f
\r\n
"
,
4
);
...
...
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