Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a bunch of places we forget to aws_raise_error() #111

Merged
merged 3 commits into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:


env:
BUILDER_VERSION: v0.9.43
BUILDER_VERSION: v0.9.55
BUILDER_SOURCE: releases
BUILDER_HOST: https://d19elf31gohf1l.cloudfront.net
PACKAGE_NAME: aws-c-event-stream
Expand Down
2 changes: 1 addition & 1 deletion source/event_stream_channel_handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ static int s_process_write_message(
(void)slot;
(void)message;
AWS_FATAL_ASSERT(!"The event-stream-channel-handler is not designed to be a mid-channel handler.");
return AWS_OP_ERR;
return aws_raise_error(AWS_ERROR_UNIMPLEMENTED);
}

static int s_increment_read_window(struct aws_channel_handler *handler, struct aws_channel_slot *slot, size_t size) {
Expand Down
10 changes: 0 additions & 10 deletions source/event_stream_rpc_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -499,16 +499,6 @@ static int s_send_protocol_message(

struct event_stream_connection_send_message_args *args =
aws_mem_calloc(connection->allocator, 1, sizeof(struct event_stream_connection_send_message_args));

if (!message_args) {
AWS_LOGF_ERROR(
AWS_LS_EVENT_STREAM_RPC_CLIENT,
"id=%p: failed to allocate callback arguments %s.",
(void *)connection,
aws_error_debug_str(aws_last_error()));
return AWS_OP_ERR;
}

args->allocator = connection->allocator;
args->user_data = user_data;
args->message_type = message_args->message_type;
Expand Down
10 changes: 0 additions & 10 deletions source/event_stream_rpc_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -570,16 +570,6 @@ static int s_send_protocol_message(

struct event_stream_connection_send_message_args *args =
aws_mem_calloc(connection->allocator, 1, sizeof(struct event_stream_connection_send_message_args));

if (!message_args) {
AWS_LOGF_ERROR(
AWS_LS_EVENT_STREAM_RPC_SERVER,
"id=%p: allocation of callback args failed with error %s",
(void *)connection,
aws_error_debug_str(aws_last_error()));
return AWS_OP_ERR;
}

args->allocator = connection->allocator;
args->user_data = user_data;
args->message_type = message_args->message_type;
Expand Down