A small memory footprint AMQP implimentation

Dependents:   iothub_client_sample_amqp remote_monitoring simplesample_amqp

Revision:
9:c22db038556c
Parent:
7:9e9ab3b0efef
Child:
11:b9de84324501
--- a/connection.c	Fri Aug 12 13:49:27 2016 -0700
+++ b/connection.c	Fri Aug 26 12:59:06 2016 -0700
@@ -182,9 +182,11 @@
     return result;
 }
 
-#ifndef NO_LOGGING
 static void log_incoming_frame(AMQP_VALUE performative)
 {
+#ifdef NO_LOGGING
+    UNUSED(performative);
+#else
     AMQP_VALUE descriptor = amqpvalue_get_inplace_descriptor(performative);
     if (descriptor != NULL)
     {
@@ -197,10 +199,14 @@
             amqpalloc_free(performative_as_string);
         }
     }
+#endif
 }
 
 static void log_outgoing_frame(AMQP_VALUE performative)
 {
+#ifdef NO_LOGGING
+    UNUSED(performative);
+#else
     AMQP_VALUE descriptor = amqpvalue_get_inplace_descriptor(performative);
     if (descriptor != NULL)
     {
@@ -213,8 +219,8 @@
             amqpalloc_free(performative_as_string);
         }
     }
+#endif
 }
-#endif
 
 static void on_bytes_encoded(void* context, const unsigned char* bytes, size_t length, bool encode_complete)
 {