aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/channel
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/lib/channel')
-rw-r--r--src/core/lib/channel/channel_args.h2
-rw-r--r--src/core/lib/channel/message_size_filter.c13
2 files changed, 6 insertions, 9 deletions
diff --git a/src/core/lib/channel/channel_args.h b/src/core/lib/channel/channel_args.h
index 71fde5ad7e..586a296d1f 100644
--- a/src/core/lib/channel/channel_args.h
+++ b/src/core/lib/channel/channel_args.h
@@ -89,12 +89,12 @@ uint32_t grpc_channel_args_compression_algorithm_get_states(
int grpc_channel_args_compare(const grpc_channel_args *a,
const grpc_channel_args *b);
-/** Returns the value of \a arg, subject to the contraints in \a options. */
typedef struct grpc_integer_options {
int default_value; // Return this if value is outside of expected bounds.
int min_value;
int max_value;
} grpc_integer_options;
+/** Returns the value of \a arg, subject to the contraints in \a options. */
int grpc_channel_arg_get_integer(grpc_arg *arg, grpc_integer_options options);
#endif /* GRPC_CORE_LIB_CHANNEL_CHANNEL_ARGS_H */
diff --git a/src/core/lib/channel/message_size_filter.c b/src/core/lib/channel/message_size_filter.c
index e2d7ff795c..f8bb1134ec 100644
--- a/src/core/lib/channel/message_size_filter.c
+++ b/src/core/lib/channel/message_size_filter.c
@@ -70,17 +70,15 @@ static void recv_message_ready(grpc_exec_ctx* exec_ctx, void* user_data,
(*calld->recv_message)->length > chand->max_recv_size) {
char* message_string;
gpr_asprintf(&message_string,
- "Received message larger than max (%lu vs. %lu)",
- (unsigned long)(*calld->recv_message)->length,
- (unsigned long)chand->max_recv_size);
+ "Received message larger than max (%u vs. %zu)",
+ (*calld->recv_message)->length, chand->max_recv_size);
gpr_slice message = gpr_slice_from_copied_string(message_string);
gpr_free(message_string);
grpc_call_element_send_cancel_with_message(
exec_ctx, elem, GRPC_STATUS_INVALID_ARGUMENT, &message);
}
// Invoke the next callback.
- calld->next_recv_message_ready->cb(
- exec_ctx, calld->next_recv_message_ready->cb_arg, error);
+ grpc_exec_ctx_sched(exec_ctx, calld->next_recv_message_ready, error, NULL);
}
// Start transport op.
@@ -93,9 +91,8 @@ static void start_transport_stream_op(grpc_exec_ctx* exec_ctx,
if (op->send_message != NULL &&
op->send_message->length > chand->max_send_size) {
char* message_string;
- gpr_asprintf(&message_string, "Sent message larger than max (%lu vs. %lu)",
- (unsigned long)op->send_message->length,
- (unsigned long)chand->max_send_size);
+ gpr_asprintf(&message_string, "Sent message larger than max (%u vs. %zu)",
+ op->send_message->length, chand->max_send_size);
gpr_slice message = gpr_slice_from_copied_string(message_string);
gpr_free(message_string);
grpc_call_element_send_cancel_with_message(