Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
B
brpc
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
brpc
Commits
da3939ca
Commit
da3939ca
authored
Dec 13, 2019
by
zhujiashun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
redis_server_protocol: refine code
parent
b8c35d85
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
redis_protocol.cpp
src/brpc/policy/redis_protocol.cpp
+1
-1
redis.cpp
src/brpc/redis.cpp
+2
-2
No files found.
src/brpc/policy/redis_protocol.cpp
View file @
da3939ca
...
...
@@ -69,7 +69,7 @@ public:
SocketId
socket_id
;
RedisService
*
redis_service
;
// If user starts a transaction, handler_continue indicates the
// handler pointer that runs the transaction
handler
.
// handler pointer that runs the transaction
command
.
std
::
unique_ptr
<
RedisCommandHandler
>
handler_continue
;
RedisCommandParser
parser
;
...
...
src/brpc/redis.cpp
View file @
da3939ca
...
...
@@ -325,7 +325,7 @@ void RedisResponse::MergeFrom(const RedisResponse& from) {
RedisReply
*
new_others
=
(
RedisReply
*
)
_arena
.
allocate
(
sizeof
(
RedisReply
)
*
(
new_nreply
-
1
));
for
(
int
i
=
0
;
i
<
new_nreply
-
1
;
++
i
)
{
new
(
new_others
+
i
)
RedisReply
(
NULL
)
;
new
(
new_others
+
i
)
RedisReply
;
}
int
new_other_index
=
0
;
for
(
int
i
=
1
;
i
<
_nreply
;
++
i
)
{
...
...
@@ -401,7 +401,7 @@ ParseError RedisResponse::ConsumePartialIOBuf(butil::IOBuf& buf, int reply_count
return
PARSE_ERROR_ABSOLUTELY_WRONG
;
}
for
(
int
i
=
0
;
i
<
reply_count
-
1
;
++
i
)
{
new
(
&
_other_replies
[
i
])
RedisReply
(
NULL
)
;
new
(
&
_other_replies
[
i
])
RedisReply
;
}
}
for
(
int
i
=
reply_size
();
i
<
reply_count
;
++
i
)
{
...
...
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