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
b4c943f8
Commit
b4c943f8
authored
May 22, 2019
by
zhujiashun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change StringBuffer to MemoryBuffer in discovery sdk
parent
d7116ea3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
discovery_naming_service.cpp
src/brpc/policy/discovery_naming_service.cpp
+4
-4
No files found.
src/brpc/policy/discovery_naming_service.cpp
View file @
b4c943f8
...
...
@@ -16,7 +16,7 @@
#include <gflags/gflags.h>
#include "butil/third_party/rapidjson/document.h"
#include "butil/third_party/rapidjson/
string
buffer.h"
#include "butil/third_party/rapidjson/
memory
buffer.h"
#include "butil/third_party/rapidjson/writer.h"
#include "butil/string_printf.h"
#include "butil/fast_rand.h"
...
...
@@ -169,10 +169,10 @@ int ParseFetchsResult(const butil::IOBuf& buf,
// convert metadata in object to string
auto
itr_metadata
=
instances
[
i
].
FindMember
(
"metadata"
);
if
(
itr_metadata
!=
instances
[
i
].
MemberEnd
())
{
BUTIL_RAPIDJSON_NAMESPACE
::
String
Buffer
buffer
;
BUTIL_RAPIDJSON_NAMESPACE
::
Writer
<
BUTIL_RAPIDJSON_NAMESPACE
::
String
Buffer
>
writer
(
buffer
);
BUTIL_RAPIDJSON_NAMESPACE
::
Memory
Buffer
buffer
;
BUTIL_RAPIDJSON_NAMESPACE
::
Writer
<
BUTIL_RAPIDJSON_NAMESPACE
::
Memory
Buffer
>
writer
(
buffer
);
itr_metadata
->
value
.
Accept
(
writer
);
metadata
.
assign
(
buffer
.
Get
String
(),
buffer
.
GetSize
());
metadata
.
assign
(
buffer
.
Get
Buffer
(),
buffer
.
GetSize
());
}
auto
itr
=
instances
[
i
].
FindMember
(
"addrs"
);
...
...
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