Esempio n. 1
0
void delete_Platform(Platform *self)
{
      for(int i = 0; i < kPlatformInfoSize; ++i)
            SFREE(self->platform_info[i]);

      for(int i = 0; i < self->num_devices; ++i)
            delete_Device(self->devices[i]);

      SFREE(self);
}
void IoTHubAccount_deinit(IOTHUB_ACCOUNT_INFO_HANDLE acctHandle)
{
    if (acctHandle != NULL)
    {
        IOTHUB_ACCOUNT_INFO* acctInfo = (IOTHUB_ACCOUNT_INFO*)acctHandle;
        (void)delete_Device(acctInfo);

        free(acctInfo->hostname);
        free(acctInfo->iothubName);
        free(acctInfo->iothubSuffix);
        free(acctInfo->sharedAccessKey);
        free(acctInfo->sharedAccessToken);
        free(acctInfo->keyName);
        free(acctInfo->eventhubAccessKey);
        free(acctInfo);
    }
}