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
ebf94bf5
Commit
ebf94bf5
authored
10 years ago
by
Craig Tiller
Browse files
Options
Downloads
Patches
Plain Diff
Fix segfault
parent
37bbead4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/core/surface/call.c
+9
-7
9 additions, 7 deletions
src/core/surface/call.c
with
9 additions
and
7 deletions
src/core/surface/call.c
+
9
−
7
View file @
ebf94bf5
...
...
@@ -146,10 +146,10 @@ struct grpc_call {
/* Active ioreqs.
request_set and request_data contain one element per active ioreq
operation.
request_set[op] is an integer specifying a set of operations to which
the request belongs:
- if it is < GRPC_IOREQ_OP_COUNT, then this operation is pending
- if it is < GRPC_IOREQ_OP_COUNT, then this operation is pending
completion, and the integer represents to which group of operations
the ioreq belongs. Each group is represented by one master, and the
integer in request_set is an index into masters to find the master
...
...
@@ -158,7 +158,7 @@ struct grpc_call {
started
- finally, if request_set[op] is REQSET_DONE, then the operation is
complete and unavailable to be started again
request_data[op] is the request data as supplied by the initiator of
a request, and is valid iff request_set[op] <= GRPC_IOREQ_OP_COUNT.
The set fields are as per the request type specified by op.
...
...
@@ -200,12 +200,12 @@ struct grpc_call {
/* Call refcount - to keep the call alive during asynchronous operations */
gpr_refcount
internal_refcount
;
/* Data that the legacy api needs to track. To be deleted at some point
/* Data that the legacy api needs to track. To be deleted at some point
soon */
legacy_state
*
legacy_state
;
};
#define CALL_STACK_FROM_CALL(call) ((grpc_call_stack *)((call)
+
1))
#define CALL_STACK_FROM_CALL(call) ((grpc_call_stack *)((call)
+
1))
#define CALL_FROM_CALL_STACK(call_stack) (((grpc_call *)(call_stack)) - 1)
#define CALL_ELEM_FROM_CALL(call, idx) \
grpc_call_stack_element(CALL_STACK_FROM_CALL(call), idx)
...
...
@@ -335,7 +335,9 @@ static void unlock(grpc_call *call) {
completed_request
completed_requests
[
GRPC_IOREQ_OP_COUNT
];
int
num_completed_requests
=
call
->
num_completed_requests
;
int
need_more_data
=
call
->
need_more_data
&&
!
is_op_live
(
call
,
GRPC_IOREQ_SEND_INITIAL_METADATA
);
call
->
need_more_data
&&
!
is_op_live
(
call
,
GRPC_IOREQ_SEND_INITIAL_METADATA
)
&&
call
->
request_set
[
GRPC_IOREQ_SEND_INITIAL_METADATA
]
!=
REQSET_EMPTY
;
int
i
;
if
(
need_more_data
)
{
...
...
@@ -854,7 +856,7 @@ static gpr_uint32 decode_status(grpc_mdelem *md) {
gpr_uint32
status
;
void
*
user_data
=
grpc_mdelem_get_user_data
(
md
,
destroy_status
);
if
(
user_data
)
{
status
=
((
gpr_uint32
)(
gpr_intptr
)
user_data
)
-
STATUS_OFFSET
;
status
=
((
gpr_uint32
)(
gpr_intptr
)
user_data
)
-
STATUS_OFFSET
;
}
else
{
if
(
!
gpr_parse_bytes_to_uint32
(
grpc_mdstr_as_c_string
(
md
->
value
),
GPR_SLICE_LENGTH
(
md
->
value
->
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