Skip to content

Commit 31bce8a

Browse files
authored
Fix a bunch of places we forget to aws_raise_error() (#350)
1 parent 171840f commit 31bce8a

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- 'main'
77

88
env:
9-
BUILDER_VERSION: v0.9.43
9+
BUILDER_VERSION: v0.9.55
1010
BUILDER_SOURCE: releases
1111
BUILDER_HOST: https://d19elf31gohf1l.cloudfront.net
1212
PACKAGE_NAME: aws-c-mqtt

.github/workflows/codecov.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
push:
55

66
env:
7-
BUILDER_VERSION: v0.9.29
7+
BUILDER_VERSION: v0.9.55
88
BUILDER_SOURCE: releases
99
BUILDER_HOST: https://d19elf31gohf1l.cloudfront.net
1010
PACKAGE_NAME: aws-c-mqtt

codebuild/mqtt-canary-test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ env:
88
CANARY_CLIENT_COUNT: 10
99
CANARY_LOG_FILE: 'canary_log.txt'
1010
CANARY_LOG_LEVEL: 'ERROR'
11-
BUILDER_VERSION: v0.9.40
11+
BUILDER_VERSION: v0.9.55
1212
BUILDER_SOURCE: releases
1313
BUILDER_HOST: https://d19elf31gohf1l.cloudfront.net
1414
PACKAGE_NAME: 'aws-c-mqtt'

source/client_channel_handler.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ static int s_process_read_message(
602602
struct aws_mqtt_client_connection_311_impl *connection = handler->impl;
603603

604604
if (message->message_type != AWS_IO_MESSAGE_APPLICATION_DATA || message->message_data.len < 1) {
605-
return AWS_OP_ERR;
605+
return aws_raise_error(AWS_ERROR_INVALID_STATE);
606606
}
607607

608608
AWS_LOGF_TRACE(

source/mqtt.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ static int aws_mqtt_utf8_decoder(uint32_t codepoint, void *user_data) {
320320
return aws_raise_error(AWS_ERROR_MQTT5_INVALID_UTF8_STRING);
321321
}
322322

323-
return AWS_ERROR_SUCCESS;
323+
return AWS_OP_SUCCESS;
324324
}
325325

326326
static struct aws_utf8_decoder_options s_aws_mqtt_utf8_decoder_options = {

source/v5/mqtt5_client.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1591,7 +1591,7 @@ static int s_process_read_message(
15911591

15921592
if (message->message_type != AWS_IO_MESSAGE_APPLICATION_DATA) {
15931593
AWS_LOGF_ERROR(AWS_LS_MQTT5_CLIENT, "id=%p: unexpected io message data", (void *)client);
1594-
return AWS_OP_ERR;
1594+
return aws_raise_error(AWS_ERROR_INVALID_STATE);
15951595
}
15961596

15971597
AWS_LOGF_TRACE(

source/v5/mqtt5_topic_alias.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ int aws_mqtt5_outbound_topic_alias_resolver_reset(
167167
uint16_t topic_alias_maximum) {
168168

169169
if (resolver == NULL) {
170-
return AWS_OP_ERR;
170+
return aws_raise_error(AWS_ERROR_INVALID_ARGUMENT);
171171
}
172172

173173
return (*resolver->vtable->reset_fn)(resolver, topic_alias_maximum);

0 commit comments

Comments
 (0)