From ef7569dfa4f15516fc7b949da542caf0d5a6bb1d Mon Sep 17 00:00:00 2001 From: Michael Graeb Date: Fri, 9 Feb 2024 15:41:08 -0800 Subject: [PATCH 1/2] Fix a bunch of places we forget to aws_raise_error() --- source/client_channel_handler.c | 2 +- source/mqtt.c | 2 +- source/v5/mqtt5_client.c | 2 +- source/v5/mqtt5_topic_alias.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/client_channel_handler.c b/source/client_channel_handler.c index 543f0950..b6fdb570 100644 --- a/source/client_channel_handler.c +++ b/source/client_channel_handler.c @@ -602,7 +602,7 @@ static int s_process_read_message( struct aws_mqtt_client_connection_311_impl *connection = handler->impl; if (message->message_type != AWS_IO_MESSAGE_APPLICATION_DATA || message->message_data.len < 1) { - return AWS_OP_ERR; + return aws_raise_error(AWS_ERROR_INVALID_STATE); } AWS_LOGF_TRACE( diff --git a/source/mqtt.c b/source/mqtt.c index c87ec0cc..c1069b69 100644 --- a/source/mqtt.c +++ b/source/mqtt.c @@ -320,7 +320,7 @@ static int aws_mqtt_utf8_decoder(uint32_t codepoint, void *user_data) { return aws_raise_error(AWS_ERROR_MQTT5_INVALID_UTF8_STRING); } - return AWS_ERROR_SUCCESS; + return AWS_OP_SUCCESS; } static struct aws_utf8_decoder_options s_aws_mqtt_utf8_decoder_options = { diff --git a/source/v5/mqtt5_client.c b/source/v5/mqtt5_client.c index 8f9ca3dc..f84b91e9 100644 --- a/source/v5/mqtt5_client.c +++ b/source/v5/mqtt5_client.c @@ -1591,7 +1591,7 @@ static int s_process_read_message( if (message->message_type != AWS_IO_MESSAGE_APPLICATION_DATA) { AWS_LOGF_ERROR(AWS_LS_MQTT5_CLIENT, "id=%p: unexpected io message data", (void *)client); - return AWS_OP_ERR; + return aws_raise_error(AWS_ERROR_INVALID_STATE); } AWS_LOGF_TRACE( diff --git a/source/v5/mqtt5_topic_alias.c b/source/v5/mqtt5_topic_alias.c index 0b72f86a..4d0185ef 100644 --- a/source/v5/mqtt5_topic_alias.c +++ b/source/v5/mqtt5_topic_alias.c @@ -167,7 +167,7 @@ int aws_mqtt5_outbound_topic_alias_resolver_reset( uint16_t topic_alias_maximum) { if (resolver == NULL) { - return AWS_OP_ERR; + return aws_raise_error(AWS_ERROR_INVALID_ARGUMENT); } return (*resolver->vtable->reset_fn)(resolver, topic_alias_maximum); From efdfc17b79aeaf110348fe0b7574445911495b98 Mon Sep 17 00:00:00 2001 From: Michael Graeb Date: Fri, 9 Feb 2024 16:39:40 -0800 Subject: [PATCH 2/2] BUILDER_VERSION: v0.9.55 --- .github/workflows/ci.yml | 2 +- .github/workflows/codecov.yml | 2 +- codebuild/mqtt-canary-test.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aaf876f4..0be31bba 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,7 +6,7 @@ on: - 'main' env: - BUILDER_VERSION: v0.9.43 + BUILDER_VERSION: v0.9.55 BUILDER_SOURCE: releases BUILDER_HOST: https://d19elf31gohf1l.cloudfront.net PACKAGE_NAME: aws-c-mqtt diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 09e4c184..4dd5dfec 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -4,7 +4,7 @@ on: push: env: - BUILDER_VERSION: v0.9.29 + BUILDER_VERSION: v0.9.55 BUILDER_SOURCE: releases BUILDER_HOST: https://d19elf31gohf1l.cloudfront.net PACKAGE_NAME: aws-c-mqtt diff --git a/codebuild/mqtt-canary-test.yml b/codebuild/mqtt-canary-test.yml index 25e4cc6e..8e29e347 100644 --- a/codebuild/mqtt-canary-test.yml +++ b/codebuild/mqtt-canary-test.yml @@ -8,7 +8,7 @@ env: CANARY_CLIENT_COUNT: 10 CANARY_LOG_FILE: 'canary_log.txt' CANARY_LOG_LEVEL: 'ERROR' - BUILDER_VERSION: v0.9.40 + BUILDER_VERSION: v0.9.55 BUILDER_SOURCE: releases BUILDER_HOST: https://d19elf31gohf1l.cloudfront.net PACKAGE_NAME: 'aws-c-mqtt'