Microsoft Azure IoTHub client libraries

Dependents:   sht15_remote_monitoring RobotArmDemo iothub_client_sample_amqp f767zi_mqtt ... more

This library implements the Microsoft Azure IoTHub client library. The code is replicated from https://github.com/Azure/azure-iot-sdks

Revision:
56:fdda9c1244e4
Parent:
55:59b527ab3452
Child:
57:4524910c6445
diff -r 59b527ab3452 -r fdda9c1244e4 iothub_client.c
--- a/iothub_client.c	Sun Jan 08 11:11:58 2017 -0800
+++ b/iothub_client.c	Fri Jan 13 18:40:33 2017 -0800
@@ -67,6 +67,7 @@
     CALLBACK_TYPE_DEVICE_METHOD
 
 DEFINE_ENUM(USER_CALLBACK_TYPE, USER_CALLBACK_TYPE_VALUES)
+DEFINE_ENUM_STRINGS(USER_CALLBACK_TYPE, USER_CALLBACK_TYPE_VALUES)
 
 typedef struct DEVICE_TWIN_CALLBACK_INFO_TAG
 {
@@ -389,7 +390,7 @@
                         }
                         break;
                     case CALLBACK_TYPE_DEVICE_METHOD:
-                        if (iotHubClientInstance->connection_status_callback)
+                        if (iotHubClientInstance->device_method_callback)
                         {
                             (void)Unlock(iotHubClientInstance->LockHandle);
                             const char* method_name = STRING_c_str(queued_cb->iothub_callback.method_cb_info.method_name);
@@ -404,6 +405,9 @@
                             STRING_delete(queued_cb->iothub_callback.method_cb_info.method_name);
                         }
                         break;
+                    default:
+                        LogError("Invalid callback type '%s'", ENUM_TO_STRING(USER_CALLBACK_TYPE, queued_cb->type));
+                        break;
                 }
             }
         }