From 59b7663bb329b64103bb0f22d95162087c01037c Mon Sep 17 00:00:00 2001 From: Ewerton Scaboro da Silva Date: Tue, 19 Sep 2023 14:29:41 -0700 Subject: [PATCH] Remove unused structure IOTHUB_REQ_INFO (#2531) * Remove unused structure IOTHUB_REQ_INFO Addresses https://github.com/Azure/azure-iot-sdk-c/issues/2529 * Fix unit tests --- provisioning_client/src/prov_device_ll_client.c | 15 --------------- .../prov_device_client_ll_ut.c | 3 --- 2 files changed, 18 deletions(-) diff --git a/provisioning_client/src/prov_device_ll_client.c b/provisioning_client/src/prov_device_ll_client.c index 3bf70933c4..7c5d332805 100644 --- a/provisioning_client/src/prov_device_ll_client.c +++ b/provisioning_client/src/prov_device_ll_client.c @@ -78,13 +78,6 @@ typedef enum CLIENT_STATE_TAG CLIENT_STATE_ERROR } CLIENT_STATE; -typedef struct IOTHUB_REQ_INFO_TAG -{ - char* iothub_url; - char* iothub_key; - char* device_id; -} IOTHUB_REQ_INFO; - typedef struct PROV_INSTANCE_INFO_TAG { PROV_DEVICE_CLIENT_REGISTER_DEVICE_CALLBACK register_callback; @@ -114,8 +107,6 @@ typedef struct PROV_INSTANCE_INFO_TAG PROV_AUTH_TYPE hsm_type; - IOTHUB_REQ_INFO iothub_info; - CLIENT_STATE prov_state; size_t auth_attempts_made; @@ -709,12 +700,6 @@ static void cleanup_prov_info(PROV_INSTANCE_INFO* prov_info) } free(prov_info->registration_id); prov_info->registration_id = NULL; - free(prov_info->iothub_info.device_id); - prov_info->iothub_info.device_id = NULL; - free(prov_info->iothub_info.iothub_key); - prov_info->iothub_info.iothub_key = NULL; - free(prov_info->iothub_info.iothub_url); - prov_info->iothub_info.iothub_url = NULL; prov_info->auth_attempts_made = 0; } diff --git a/provisioning_client/tests/prov_device_client_ll_ut/prov_device_client_ll_ut.c b/provisioning_client/tests/prov_device_client_ll_ut/prov_device_client_ll_ut.c index a12f1a5fac..48f7deff4a 100644 --- a/provisioning_client/tests/prov_device_client_ll_ut/prov_device_client_ll_ut.c +++ b/provisioning_client/tests/prov_device_client_ll_ut/prov_device_client_ll_ut.c @@ -619,9 +619,6 @@ BEGIN_TEST_SUITE(prov_device_client_ll_ut) static void setup_cleanup_prov_info_mocks(void) { STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); - STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); - STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); - STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); } static void setup_destroy_prov_info_mocks(void)