Microsoft Azure IoTHub client MQTT transport

Dependents:   STM32F746_iothub_client_sample_mqtt FXOS8700CQ_To_Azure_IoT f767zi_mqtt FXOS8700CQ_To_Azure_IoT ... more

Files at this revision

API Documentation at this revision

Comitter:
AzureIoTClient
Date:
Mon Mar 05 17:40:20 2018 -0800
Parent:
35:c56b7cfcb90b
Child:
37:e6a799428f3d
Commit message:
1.2.0

Changed in this revision

iothub_client_retry_control.c Show annotated file Show diff for this revision Revisions of this file
iothubtransport_mqtt_common.c Show annotated file Show diff for this revision Revisions of this file
--- a/iothub_client_retry_control.c	Thu Feb 15 11:34:49 2018 -0800
+++ b/iothub_client_retry_control.c	Mon Mar 05 17:40:20 2018 -0800
@@ -32,44 +32,6 @@
 
 // ========== Helper Functions ========== //
 
-static int evaluate_retry_action_fixed_interval(RETRY_CONTROL_INSTANCE* retry_control, RETRY_ACTION* retry_action)
-{
-	int result;
-
-	time_t current_time;
-
-	if ((current_time = get_time(NULL)) == INDEFINITE_TIME)
-	{
-		LogError("Cannot evaluate if should retry (get_time failed)");
-		result = __FAILURE__;
-	}
-	else
-	{
-		if (retry_control->max_retry_time_in_secs > 0 &&
-			get_difftime(current_time, retry_control->last_retry_time) >= retry_control->max_retry_time_in_secs)
-		{
-			*retry_action = RETRY_ACTION_STOP_RETRYING;
-		}
-		else
-		{
-			if (get_difftime(current_time, retry_control->last_retry_time) >= retry_control->current_wait_time_in_secs)
-			{
-				*retry_action = RETRY_ACTION_RETRY_NOW;
-				retry_control->last_retry_time = current_time;
-			}
-			else
-			{
-				*retry_action = RETRY_ACTION_RETRY_LATER;
-			}
-		}
-
-		result = RESULT_OK;
-	}
-
-	return result;
-}
-
-
 // ---------- Set/Retrieve Options Helpers ----------//
 
 static void* retry_control_clone_option(const char* name, const void* value)
--- a/iothubtransport_mqtt_common.c	Thu Feb 15 11:34:49 2018 -0800
+++ b/iothubtransport_mqtt_common.c	Mon Mar 05 17:40:20 2018 -0800
@@ -62,7 +62,6 @@
 static const char* TOPIC_DEVICE_DEVICE = "devices/%s/messages/events/";
 
 static const char* TOPIC_DEVICE_METHOD_SUBSCRIBE = "$iothub/methods/POST/#";
-static const char* TOPIC_DEVICE_METHOD_RESPONSE = "$iothub/methods/res";
 
 static const char* IOTHUB_API_VERSION = "2016-11-14";
 
@@ -1660,34 +1659,34 @@
     return result;
 }
 
-static int is_key_validate(const IOTHUBTRANSPORT_CONFIG* config)
-{
-    int result;
-    IOTHUB_CREDENTIAL_TYPE cred_type = IoTHubClient_Auth_Get_Credential_Type(config->auth_module_handle);
-    if (cred_type == IOTHUB_CREDENTIAL_TYPE_X509 || cred_type == IOTHUB_CREDENTIAL_TYPE_X509_ECC)
-    {
-        result = 0;
-    }
-    else
-    {
-        if (config->upperConfig->deviceKey == NULL && config->upperConfig->deviceSasToken == NULL)
-        {
-            if (IoTHubClient_Auth_Get_DeviceKey(config->auth_module_handle) == NULL)
-            {
-                result = __FAILURE__;
-            }
-            else
-            {
-                result = 0;
-            }
-        }
-        else
-        {
-            result = 0;
-        }
-    }
-    return result;
-}
+//static int is_key_validate(const IOTHUBTRANSPORT_CONFIG* config)
+//{
+//    int result;
+//    IOTHUB_CREDENTIAL_TYPE cred_type = IoTHubClient_Auth_Get_Credential_Type(config->auth_module_handle);
+//    if (cred_type == IOTHUB_CREDENTIAL_TYPE_X509 || cred_type == IOTHUB_CREDENTIAL_TYPE_X509_ECC)
+//    {
+//        result = 0;
+//    }
+//    else
+//    {
+//        if (config->upperConfig->deviceKey == NULL && config->upperConfig->deviceSasToken == NULL)
+//        {
+//            if (IoTHubClient_Auth_Get_DeviceKey(config->auth_module_handle) == NULL)
+//            {
+//                result = __FAILURE__;
+//            }
+//            else
+//            {
+//                result = 0;
+//            }
+//        }
+//        else
+//        {
+//            result = 0;
+//        }
+//    }
+//    return result;
+//}
 
 static int SendMqttConnectMsg(PMQTTTRANSPORT_HANDLE_DATA transport_data)
 {