aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/ext/transport/chttp2/transport/frame_data.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/ext/transport/chttp2/transport/frame_data.cc')
-rw-r--r--src/core/ext/transport/chttp2/transport/frame_data.cc48
1 files changed, 24 insertions, 24 deletions
diff --git a/src/core/ext/transport/chttp2/transport/frame_data.cc b/src/core/ext/transport/chttp2/transport/frame_data.cc
index 73aaab1802..7d2c7f5ab9 100644
--- a/src/core/ext/transport/chttp2/transport/frame_data.cc
+++ b/src/core/ext/transport/chttp2/transport/frame_data.cc
@@ -30,14 +30,14 @@
#include "src/core/lib/support/string.h"
#include "src/core/lib/transport/transport.h"
-grpc_error *grpc_chttp2_data_parser_init(grpc_chttp2_data_parser *parser) {
+grpc_error* grpc_chttp2_data_parser_init(grpc_chttp2_data_parser* parser) {
parser->state = GRPC_CHTTP2_DATA_FH_0;
parser->parsing_frame = NULL;
return GRPC_ERROR_NONE;
}
-void grpc_chttp2_data_parser_destroy(grpc_exec_ctx *exec_ctx,
- grpc_chttp2_data_parser *parser) {
+void grpc_chttp2_data_parser_destroy(grpc_exec_ctx* exec_ctx,
+ grpc_chttp2_data_parser* parser) {
if (parser->parsing_frame != NULL) {
GRPC_ERROR_UNREF(grpc_chttp2_incoming_byte_stream_finished(
exec_ctx, parser->parsing_frame,
@@ -46,14 +46,14 @@ void grpc_chttp2_data_parser_destroy(grpc_exec_ctx *exec_ctx,
GRPC_ERROR_UNREF(parser->error);
}
-grpc_error *grpc_chttp2_data_parser_begin_frame(grpc_chttp2_data_parser *parser,
+grpc_error* grpc_chttp2_data_parser_begin_frame(grpc_chttp2_data_parser* parser,
uint8_t flags,
uint32_t stream_id,
- grpc_chttp2_stream *s) {
+ grpc_chttp2_stream* s) {
if (flags & ~GRPC_CHTTP2_DATA_FLAG_END_STREAM) {
- char *msg;
+ char* msg;
gpr_asprintf(&msg, "unsupported data flags: 0x%02x", flags);
- grpc_error *err =
+ grpc_error* err =
grpc_error_set_int(GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg),
GRPC_ERROR_INT_STREAM_ID, (intptr_t)stream_id);
gpr_free(msg);
@@ -69,12 +69,12 @@ grpc_error *grpc_chttp2_data_parser_begin_frame(grpc_chttp2_data_parser *parser,
return GRPC_ERROR_NONE;
}
-void grpc_chttp2_encode_data(uint32_t id, grpc_slice_buffer *inbuf,
+void grpc_chttp2_encode_data(uint32_t id, grpc_slice_buffer* inbuf,
uint32_t write_bytes, int is_eof,
- grpc_transport_one_way_stats *stats,
- grpc_slice_buffer *outbuf) {
+ grpc_transport_one_way_stats* stats,
+ grpc_slice_buffer* outbuf) {
grpc_slice hdr;
- uint8_t *p;
+ uint8_t* p;
static const size_t header_size = 9;
hdr = GRPC_SLICE_MALLOC(header_size);
@@ -97,17 +97,17 @@ void grpc_chttp2_encode_data(uint32_t id, grpc_slice_buffer *inbuf,
stats->data_bytes += write_bytes;
}
-grpc_error *grpc_deframe_unprocessed_incoming_frames(
- grpc_exec_ctx *exec_ctx, grpc_chttp2_data_parser *p, grpc_chttp2_stream *s,
- grpc_slice_buffer *slices, grpc_slice *slice_out,
- grpc_byte_stream **stream_out) {
- grpc_error *error = GRPC_ERROR_NONE;
- grpc_chttp2_transport *t = s->t;
+grpc_error* grpc_deframe_unprocessed_incoming_frames(
+ grpc_exec_ctx* exec_ctx, grpc_chttp2_data_parser* p, grpc_chttp2_stream* s,
+ grpc_slice_buffer* slices, grpc_slice* slice_out,
+ grpc_byte_stream** stream_out) {
+ grpc_error* error = GRPC_ERROR_NONE;
+ grpc_chttp2_transport* t = s->t;
while (slices->count > 0) {
- uint8_t *beg = NULL;
- uint8_t *end = NULL;
- uint8_t *cur = NULL;
+ uint8_t* beg = NULL;
+ uint8_t* end = NULL;
+ uint8_t* cur = NULL;
grpc_slice slice = grpc_slice_buffer_take_first(slices);
@@ -115,7 +115,7 @@ grpc_error *grpc_deframe_unprocessed_incoming_frames(
end = GRPC_SLICE_END_PTR(slice);
cur = beg;
uint32_t message_flags;
- char *msg;
+ char* msg;
if (cur == end) {
grpc_slice_unref_internal(exec_ctx, slice);
@@ -289,9 +289,9 @@ grpc_error *grpc_deframe_unprocessed_incoming_frames(
return GRPC_ERROR_NONE;
}
-grpc_error *grpc_chttp2_data_parser_parse(grpc_exec_ctx *exec_ctx, void *parser,
- grpc_chttp2_transport *t,
- grpc_chttp2_stream *s,
+grpc_error* grpc_chttp2_data_parser_parse(grpc_exec_ctx* exec_ctx, void* parser,
+ grpc_chttp2_transport* t,
+ grpc_chttp2_stream* s,
grpc_slice slice, int is_last) {
if (!s->pending_byte_stream) {
grpc_slice_ref_internal(slice);