Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Grpc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tci-gateway-module
Grpc
Commits
7fa7d681
Commit
7fa7d681
authored
8 years ago
by
Craig Tiller
Browse files
Options
Downloads
Patches
Plain Diff
Fix core banned functions
parent
0cf6a71b
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/grpc/slice_buffer.h
+2
-1
2 additions, 1 deletion
include/grpc/slice_buffer.h
src/core/lib/slice/slice_buffer.c
+4
-3
4 additions, 3 deletions
src/core/lib/slice/slice_buffer.c
with
6 additions
and
4 deletions
include/grpc/slice_buffer.h
+
2
−
1
View file @
7fa7d681
...
...
@@ -78,7 +78,8 @@ GPRAPI void grpc_slice_buffer_trim_end(grpc_slice_buffer *src, size_t n,
GPRAPI
void
grpc_slice_buffer_move_first
(
grpc_slice_buffer
*
src
,
size_t
n
,
grpc_slice_buffer
*
dst
);
/* move the first n bytes of src into dst (copying them) */
GPRAPI
void
grpc_slice_buffer_move_first_into_buffer
(
grpc_slice_buffer
*
src
,
GPRAPI
void
grpc_slice_buffer_move_first_into_buffer
(
grpc_exec_ctx
*
exec_ctx
,
grpc_slice_buffer
*
src
,
size_t
n
,
void
*
dst
);
/* take the first slice in the slice buffer */
GPRAPI
grpc_slice
grpc_slice_buffer_take_first
(
grpc_slice_buffer
*
src
);
...
...
This diff is collapsed.
Click to expand it.
src/core/lib/slice/slice_buffer.c
+
4
−
3
View file @
7fa7d681
...
...
@@ -282,7 +282,8 @@ void grpc_slice_buffer_move_first(grpc_slice_buffer *src, size_t n,
GPR_ASSERT
(
src
->
count
>
0
);
}
void
grpc_slice_buffer_move_first_into_buffer
(
grpc_slice_buffer
*
src
,
size_t
n
,
void
grpc_slice_buffer_move_first_into_buffer
(
grpc_exec_ctx
*
exec_ctx
,
grpc_slice_buffer
*
src
,
size_t
n
,
void
*
dst
)
{
char
*
dstp
=
dst
;
GPR_ASSERT
(
src
->
length
>=
n
);
...
...
@@ -297,13 +298,13 @@ void grpc_slice_buffer_move_first_into_buffer(grpc_slice_buffer *src, size_t n,
n
=
0
;
}
else
if
(
slice_len
==
n
)
{
memcpy
(
dstp
,
GRPC_SLICE_START_PTR
(
slice
),
n
);
grpc_slice_unref
(
slice
);
grpc_slice_unref
_internal
(
exec_ctx
,
slice
);
n
=
0
;
}
else
{
memcpy
(
dstp
,
GRPC_SLICE_START_PTR
(
slice
),
slice_len
);
dstp
+=
slice_len
;
n
-=
slice_len
;
grpc_slice_unref
(
slice
);
grpc_slice_unref
_internal
(
exec_ctx
,
slice
);
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment