Skip to content

Commit

Permalink
Fix a bunch of places we forget to aws_raise_error() (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
graebm authored Feb 13, 2024
1 parent 646f9e8 commit e373de0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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-iot
Expand Down
4 changes: 2 additions & 2 deletions source/secure_tunneling.c
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ static int s_aws_secure_tunnel_set_stream(
"id=%p: Incomming stream set request for unsupported service_id: " PRInSTR,
(void *)secure_tunnel,
AWS_BYTE_CURSOR_PRI(*service_id));
return AWS_ERROR_IOTDEVICE_SECURE_TUNNELING_BAD_SERVICE_ID;
return aws_raise_error(AWS_ERROR_IOTDEVICE_SECURE_TUNNELING_BAD_SERVICE_ID);
}

struct aws_service_id_element *replacement_elem =
Expand Down Expand Up @@ -2674,7 +2674,7 @@ int aws_secure_tunnel_stream_start(

if (secure_tunnel->config->local_proxy_mode == AWS_SECURE_TUNNELING_DESTINATION_MODE) {
AWS_LOGF_ERROR(AWS_LS_IOTDEVICE_SECURE_TUNNELING, "Stream Start can only be sent from Source Mode");
return AWS_ERROR_IOTDEVICE_SECURE_TUNNELING_INCORRECT_MODE;
return aws_raise_error(AWS_ERROR_IOTDEVICE_SECURE_TUNNELING_INCORRECT_MODE);
}

struct aws_secure_tunnel_operation_message *message_op = aws_secure_tunnel_operation_message_new(
Expand Down
2 changes: 1 addition & 1 deletion source/serializer.c
Original file line number Diff line number Diff line change
Expand Up @@ -488,5 +488,5 @@ int aws_secure_tunnel_deserialize_message_from_cursor(
return AWS_OP_SUCCESS;

error:
return AWS_ERROR_IOTDEVICE_SECURE_TUNNELING_DECODE_FAILURE;
return aws_raise_error(AWS_ERROR_IOTDEVICE_SECURE_TUNNELING_DECODE_FAILURE);
}
4 changes: 2 additions & 2 deletions tests/secure_tunnel_tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -916,7 +916,7 @@ int secure_tunneling_access_token_check(const struct aws_http_headers *request_h
return aws_raise_error(AWS_ERROR_INVALID_ARGUMENT);
}
ASSERT_CURSOR_VALUE_STRING_EQUALS(access_token_cur, s_access_token);
return AWS_ERROR_SUCCESS;
return AWS_OP_SUCCESS;
}

static int s_secure_tunneling_functionality_connect_test_fn(struct aws_allocator *allocator, void *ctx) {
Expand Down Expand Up @@ -952,7 +952,7 @@ int secure_tunneling_client_token_check(const struct aws_http_headers *request_h
return aws_raise_error(AWS_ERROR_INVALID_ARGUMENT);
}
ASSERT_CURSOR_VALUE_STRING_EQUALS(client_token_cur, s_client_token);
return AWS_ERROR_SUCCESS;
return AWS_OP_SUCCESS;
}

static int s_secure_tunneling_functionality_client_token_test_fn(struct aws_allocator *allocator, void *ctx) {
Expand Down

0 comments on commit e373de0

Please sign in to comment.