diff --git a/include/aws/mqtt/private/v5/mqtt5_to_mqtt3_adapter_impl.h b/include/aws/mqtt/private/v5/mqtt5_to_mqtt3_adapter_impl.h index f65de837..c424db6a 100644 --- a/include/aws/mqtt/private/v5/mqtt5_to_mqtt3_adapter_impl.h +++ b/include/aws/mqtt/private/v5/mqtt5_to_mqtt3_adapter_impl.h @@ -315,7 +315,7 @@ struct aws_mqtt_client_connection_5_impl { aws_mqtt_client_on_connection_complete_fn *on_connection_complete; void *on_connection_complete_user_data; - aws_mqtt_client_on_termination_fn *on_termination; + aws_mqtt_client_on_connection_termination_fn *on_termination; void *on_termination_user_data; }; diff --git a/source/v5/mqtt5_to_mqtt3_adapter.c b/source/v5/mqtt5_to_mqtt3_adapter.c index 9753c4a3..4be88d05 100644 --- a/source/v5/mqtt5_to_mqtt3_adapter.c +++ b/source/v5/mqtt5_to_mqtt3_adapter.c @@ -1087,7 +1087,7 @@ struct aws_mqtt_set_on_termination_handlers_task { struct aws_allocator *allocator; struct aws_mqtt_client_connection_5_impl *adapter; - aws_mqtt_client_on_termination_fn *on_termination_callback; + aws_mqtt_client_on_connection_termination_fn *on_termination_callback; void *on_termination_ud; }; @@ -1112,7 +1112,7 @@ static void s_set_on_termination_handlers_task_fn(struct aws_task *task, void *a static struct aws_mqtt_set_on_termination_handlers_task *s_aws_mqtt_set_on_termination_handler_task_new( struct aws_allocator *allocator, struct aws_mqtt_client_connection_5_impl *adapter, - aws_mqtt_client_on_termination_fn *on_termination, + aws_mqtt_client_on_connection_termination_fn *on_termination, void *on_termination_user_data) { struct aws_mqtt_set_on_termination_handlers_task *set_task = @@ -1129,7 +1129,7 @@ static struct aws_mqtt_set_on_termination_handlers_task *s_aws_mqtt_set_on_termi static int s_aws_mqtt_client_connection_5_set_termination_handler( void *impl, - aws_mqtt_client_on_termination_fn *on_termination, + aws_mqtt_client_on_connection_termination_fn *on_termination, void *on_termination_ud) { struct aws_mqtt_client_connection_5_impl *adapter = impl; @@ -2953,7 +2953,7 @@ static struct aws_mqtt_client_connection_vtable s_aws_mqtt_client_connection_5_v .set_connection_result_handlers = s_aws_mqtt_client_connection_5_set_connection_result_handlers, .set_connection_interruption_handlers_fn = s_aws_mqtt_client_connection_5_set_interruption_handlers, .set_connection_closed_handler_fn = s_aws_mqtt_client_connection_5_set_on_closed_handler, - .set_termination_handler_fn = s_aws_mqtt_client_connection_5_set_termination_handler, + .set_connection_termination_handler_fn = s_aws_mqtt_client_connection_5_set_termination_handler, .set_on_any_publish_handler_fn = s_aws_mqtt_client_connection_5_set_on_any_publish_handler, .connect_fn = s_aws_mqtt_client_connection_5_connect, .reconnect_fn = s_aws_mqtt_client_connection_5_reconnect, diff --git a/tests/v5/mqtt5_to_mqtt3_adapter_tests.c b/tests/v5/mqtt5_to_mqtt3_adapter_tests.c index bfe6abf4..8c85e884 100644 --- a/tests/v5/mqtt5_to_mqtt3_adapter_tests.c +++ b/tests/v5/mqtt5_to_mqtt3_adapter_tests.c @@ -619,7 +619,7 @@ int aws_mqtt5_to_mqtt3_adapter_test_fixture_init( aws_mutex_init(&fixture->lock); aws_condition_variable_init(&fixture->signal); - aws_mqtt_client_connection_set_termination_handler( + aws_mqtt_client_connection_set_connection_termination_handler( fixture->connection, s_aws_mqtt5_to_mqtt3_adapter_test_fixture_termination_handler, fixture); aws_mqtt_client_connection_set_connection_closed_handler( fixture->connection, s_aws_mqtt5_to_mqtt3_adapter_test_fixture_closed_handler, fixture);