Skip to content

Commit

Permalink
remove unused function
Browse files Browse the repository at this point in the history
  • Loading branch information
sbSteveK committed Jun 14, 2024
1 parent 3f54ffa commit 9d9d835
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 30 deletions.
48 changes: 27 additions & 21 deletions source/secure_tunneling.c
Original file line number Diff line number Diff line change
Expand Up @@ -1808,27 +1808,33 @@ static void s_process_outbound_data_message(
/* If a data message attempts to be sent on an unopen stream, discard it. */
if (s_aws_secure_tunnel_active_stream_check(secure_tunnel, current_operation->message_view)) {
error_code = aws_last_error();
if (current_operation->message_view->service_id && current_operation->message_view->service_id->len > 0) {
AWS_LOGF_DEBUG(
AWS_LS_IOTDEVICE_SECURE_TUNNELING,
"id=%p: failed to send DATA message with service id '" PRInSTR
"' stream id (%d) and connection id (%d) with error %d(%s)",
(void *)secure_tunnel,
AWS_BYTE_CURSOR_PRI(*current_operation->message_view->service_id),
current_operation->message_view->stream_id,
current_operation->message_view->connection_id,
error_code,
aws_error_debug_str(error_code));
} else {
AWS_LOGF_DEBUG(
AWS_LS_IOTDEVICE_SECURE_TUNNELING,
"id=%p: failed to send DATA message with stream id (%d) and connection id (%d) with error %d(%s)",
(void *)secure_tunnel,
current_operation->message_view->stream_id,
current_operation->message_view->connection_id,
error_code,
aws_error_debug_str(error_code));
}
AWS_LOGF_DEBUG(
AWS_LS_IOTDEVICE_SECURE_TUNNELING,
"id=%p: failed to send DATA message with error %d(%s)",
(void *)secure_tunnel,
error_code,
aws_error_debug_str(error_code));
// if (current_operation->message_view->service_id && current_operation->message_view->service_id->len > 0) {
// AWS_LOGF_DEBUG(
// AWS_LS_IOTDEVICE_SECURE_TUNNELING,
// "id=%p: failed to send DATA message with service id '" PRInSTR
// "' stream id (%d) and connection id (%d) with error %d(%s)",
// (void *)secure_tunnel,
// AWS_BYTE_CURSOR_PRI(*current_operation->message_view->service_id),
// current_operation->message_view->stream_id,
// current_operation->message_view->connection_id,
// error_code,
// aws_error_debug_str(error_code));
// } else {
// AWS_LOGF_DEBUG(
// AWS_LS_IOTDEVICE_SECURE_TUNNELING,
// "id=%p: failed to send DATA message with stream id (%d) and connection id (%d) with error %d(%s)",
// (void *)secure_tunnel,
// current_operation->message_view->stream_id,
// current_operation->message_view->connection_id,
// error_code,
// aws_error_debug_str(error_code));
// }
goto done;
}

Expand Down
20 changes: 11 additions & 9 deletions source/secure_tunneling_operations.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,15 +127,17 @@ void aws_secure_tunnel_operation_complete(
(*operation->vtable->aws_secure_tunnel_operation_completion_fn)(operation, error_code, associated_view);
}
}

void aws_secure_tunnel_operation_assign_stream_id(
struct aws_secure_tunnel_operation *operation,
struct aws_secure_tunnel *secure_tunnel) {
AWS_FATAL_ASSERT(operation->vtable != NULL);
if (operation->vtable->aws_secure_tunnel_operation_assign_stream_id_fn != NULL) {
(*operation->vtable->aws_secure_tunnel_operation_assign_stream_id_fn)(operation, secure_tunnel);
}
}
// STEVE TODO aws_secure_tunnel_operation_assign_stream_id_fn returns an int that is not used.
// Look into where and how it should be used and whether we need to error out or do anything beyond the
// warning that is provided within the function itself.
// void aws_secure_tunnel_operation_assign_stream_id(
// struct aws_secure_tunnel_operation *operation,
// struct aws_secure_tunnel *secure_tunnel) {
// AWS_FATAL_ASSERT(operation->vtable != NULL);
// if (operation->vtable->aws_secure_tunnel_operation_assign_stream_id_fn != NULL) {
// (*operation->vtable->aws_secure_tunnel_operation_assign_stream_id_fn)(operation, secure_tunnel);
// }
// }

static struct aws_secure_tunnel_operation_vtable s_empty_operation_vtable = {
.aws_secure_tunnel_operation_completion_fn = NULL,
Expand Down

0 comments on commit 9d9d835

Please sign in to comment.