|
|
@ -338,10 +338,10 @@ static void on_new_call(void *arg, int success) { |
|
|
|
proxy->new_call_details.deadline, NULL); |
|
|
|
proxy->new_call_details.deadline, NULL); |
|
|
|
gpr_ref_init(&pc->refs, 1); |
|
|
|
gpr_ref_init(&pc->refs, 1); |
|
|
|
|
|
|
|
|
|
|
|
op.flags = 0; |
|
|
|
|
|
|
|
op.reserved = NULL; |
|
|
|
op.reserved = NULL; |
|
|
|
|
|
|
|
|
|
|
|
op.op = GRPC_OP_RECV_INITIAL_METADATA; |
|
|
|
op.op = GRPC_OP_RECV_INITIAL_METADATA; |
|
|
|
|
|
|
|
op.flags = 0; |
|
|
|
op.data.recv_initial_metadata = &pc->p2s_initial_metadata; |
|
|
|
op.data.recv_initial_metadata = &pc->p2s_initial_metadata; |
|
|
|
refpc(pc, "on_p2s_recv_initial_metadata"); |
|
|
|
refpc(pc, "on_p2s_recv_initial_metadata"); |
|
|
|
err = grpc_call_start_batch( |
|
|
|
err = grpc_call_start_batch( |
|
|
@ -349,6 +349,7 @@ static void on_new_call(void *arg, int success) { |
|
|
|
GPR_ASSERT(err == GRPC_CALL_OK); |
|
|
|
GPR_ASSERT(err == GRPC_CALL_OK); |
|
|
|
|
|
|
|
|
|
|
|
op.op = GRPC_OP_SEND_INITIAL_METADATA; |
|
|
|
op.op = GRPC_OP_SEND_INITIAL_METADATA; |
|
|
|
|
|
|
|
op.flags = proxy->new_call_details.flags; |
|
|
|
op.data.send_initial_metadata.count = pc->c2p_initial_metadata.count; |
|
|
|
op.data.send_initial_metadata.count = pc->c2p_initial_metadata.count; |
|
|
|
op.data.send_initial_metadata.metadata = pc->c2p_initial_metadata.metadata; |
|
|
|
op.data.send_initial_metadata.metadata = pc->c2p_initial_metadata.metadata; |
|
|
|
refpc(pc, "on_p2s_sent_initial_metadata"); |
|
|
|
refpc(pc, "on_p2s_sent_initial_metadata"); |
|
|
@ -357,6 +358,7 @@ static void on_new_call(void *arg, int success) { |
|
|
|
GPR_ASSERT(err == GRPC_CALL_OK); |
|
|
|
GPR_ASSERT(err == GRPC_CALL_OK); |
|
|
|
|
|
|
|
|
|
|
|
op.op = GRPC_OP_RECV_MESSAGE; |
|
|
|
op.op = GRPC_OP_RECV_MESSAGE; |
|
|
|
|
|
|
|
op.flags = 0; |
|
|
|
op.data.recv_message = &pc->c2p_msg; |
|
|
|
op.data.recv_message = &pc->c2p_msg; |
|
|
|
refpc(pc, "on_c2p_recv_msg"); |
|
|
|
refpc(pc, "on_c2p_recv_msg"); |
|
|
|
err = grpc_call_start_batch(pc->c2p, &op, 1, |
|
|
|
err = grpc_call_start_batch(pc->c2p, &op, 1, |
|
|
@ -364,6 +366,7 @@ static void on_new_call(void *arg, int success) { |
|
|
|
GPR_ASSERT(err == GRPC_CALL_OK); |
|
|
|
GPR_ASSERT(err == GRPC_CALL_OK); |
|
|
|
|
|
|
|
|
|
|
|
op.op = GRPC_OP_RECV_MESSAGE; |
|
|
|
op.op = GRPC_OP_RECV_MESSAGE; |
|
|
|
|
|
|
|
op.flags = 0; |
|
|
|
op.data.recv_message = &pc->p2s_msg; |
|
|
|
op.data.recv_message = &pc->p2s_msg; |
|
|
|
refpc(pc, "on_p2s_recv_msg"); |
|
|
|
refpc(pc, "on_p2s_recv_msg"); |
|
|
|
err = grpc_call_start_batch(pc->p2s, &op, 1, |
|
|
|
err = grpc_call_start_batch(pc->p2s, &op, 1, |
|
|
@ -371,6 +374,7 @@ static void on_new_call(void *arg, int success) { |
|
|
|
GPR_ASSERT(err == GRPC_CALL_OK); |
|
|
|
GPR_ASSERT(err == GRPC_CALL_OK); |
|
|
|
|
|
|
|
|
|
|
|
op.op = GRPC_OP_RECV_STATUS_ON_CLIENT; |
|
|
|
op.op = GRPC_OP_RECV_STATUS_ON_CLIENT; |
|
|
|
|
|
|
|
op.flags = 0; |
|
|
|
op.data.recv_status_on_client.trailing_metadata = |
|
|
|
op.data.recv_status_on_client.trailing_metadata = |
|
|
|
&pc->p2s_trailing_metadata; |
|
|
|
&pc->p2s_trailing_metadata; |
|
|
|
op.data.recv_status_on_client.status = &pc->p2s_status; |
|
|
|
op.data.recv_status_on_client.status = &pc->p2s_status; |
|
|
@ -383,6 +387,7 @@ static void on_new_call(void *arg, int success) { |
|
|
|
GPR_ASSERT(err == GRPC_CALL_OK); |
|
|
|
GPR_ASSERT(err == GRPC_CALL_OK); |
|
|
|
|
|
|
|
|
|
|
|
op.op = GRPC_OP_RECV_CLOSE_ON_SERVER; |
|
|
|
op.op = GRPC_OP_RECV_CLOSE_ON_SERVER; |
|
|
|
|
|
|
|
op.flags = 0; |
|
|
|
op.data.recv_close_on_server.cancelled = &pc->c2p_server_cancelled; |
|
|
|
op.data.recv_close_on_server.cancelled = &pc->c2p_server_cancelled; |
|
|
|
refpc(pc, "on_c2p_closed"); |
|
|
|
refpc(pc, "on_c2p_closed"); |
|
|
|
err = grpc_call_start_batch(pc->c2p, &op, 1, new_closure(on_c2p_closed, pc), |
|
|
|
err = grpc_call_start_batch(pc->c2p, &op, 1, new_closure(on_c2p_closed, pc), |
|
|
|