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

Error cleanup #106

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
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
1 change: 1 addition & 0 deletions include/aws/iotdevice/iotdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ enum aws_iotdevice_error {
AWS_ERROR_IOTDEVICE_SECURE_TUNNELING_DATA_NO_ACTIVE_CONNECTION,
AWS_ERROR_IOTDEVICE_SECURE_TUNNELING_DATA_PROTOCOL_VERSION_MISMATCH,
AWS_ERROR_IOTDEVICE_SECURE_TUNNELING_INACTIVE_SERVICE_ID,
AWS_ERROR_IOTDEVICE_SECURE_TUNNELING_ENCODE_FAILURE,

AWS_ERROR_END_IOTDEVICE_RANGE = AWS_ERROR_ENUM_END_RANGE(AWS_C_IOTDEVICE_PACKAGE_ID),
};
Expand Down
6 changes: 5 additions & 1 deletion source/iotdevice.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ static struct aws_error_info s_errors[] = {
"Secure Tunnel terminated by user request."),
AWS_DEFINE_ERROR_INFO_IOTDEVICE(
AWS_ERROR_IOTDEVICE_SECURE_TUNNELING_DECODE_FAILURE,
"Error occured while decoding an incoming message." ),
"Error occurred while decoding an incoming message." ),
AWS_DEFINE_ERROR_INFO_IOTDEVICE(
AWS_ERROR_IOTDEVICE_SECURE_TUNNELING_DATA_NO_ACTIVE_CONNECTION,
"DATA message processing failed due to no active connection found." ),
Expand All @@ -102,6 +102,10 @@ static struct aws_error_info s_errors[] = {
AWS_DEFINE_ERROR_INFO_IOTDEVICE(
AWS_ERROR_IOTDEVICE_SECURE_TUNNELING_INACTIVE_SERVICE_ID,
"Secure Tunnel operation failed due to using inactive service id." ),
AWS_DEFINE_ERROR_INFO_IOTDEVICE(
AWS_ERROR_IOTDEVICE_SECURE_TUNNELING_ENCODE_FAILURE,
"Error occurred while encoding an outbound message." ),

};
/* clang-format on */
#undef AWS_DEFINE_ERROR_INFO_IOTDEVICE
Expand Down
6 changes: 5 additions & 1 deletion source/linux/network.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@ int s_hashfn_foreach_total_iface_transfer_metrics(void *context, struct aws_hash
return AWS_COMMON_HASH_TABLE_ITER_CONTINUE;
}

enum linux_network_connection_state { LINUX_NCS_UNKNOWN = 0, LINUX_NCS_ESTABLISHED = 1, LINUX_NCS_LISTEN = 10 };
enum linux_network_connection_state {
LINUX_NCS_UNKNOWN = 0,
LINUX_NCS_ESTABLISHED = 1,
LINUX_NCS_LISTEN = 10,
};

static uint16_t map_network_state(uint16_t linux_state) {
switch (linux_state) {
Expand Down
Loading