A small memory footprint AMQP implimentation
Dependents: iothub_client_sample_amqp remote_monitoring simplesample_amqp
Diff: link.c
- Revision:
- 3:96522ba2ddf8
- Parent:
- 2:64b4feb67cd3
- Child:
- 5:ae49385aff34
diff -r 64b4feb67cd3 -r 96522ba2ddf8 link.c --- a/link.c Mon May 09 14:37:14 2016 -0700 +++ b/link.c Mon May 23 07:35:43 2016 -0700 @@ -641,9 +641,9 @@ amqpalloc_free(link->name); } - if (link->attach_properties != NULL) + if (link->attach_properties != NULL) { - amqpvalue_destroy(link->attach_properties); + amqpvalue_destroy(link->attach_properties); } amqpalloc_free(link); @@ -987,10 +987,15 @@ { default: case SESSION_SEND_TRANSFER_ERROR: + list_remove(link->pending_deliveries, delivery_instance_list_item); + amqpalloc_free(pending_delivery); result = LINK_TRANSFER_ERROR; break; case SESSION_SEND_TRANSFER_BUSY: + /* Ensure we remove from list again since sender will attempt to transfer again on flow on */ + list_remove(link->pending_deliveries, delivery_instance_list_item); + amqpalloc_free(pending_delivery); result = LINK_TRANSFER_BUSY; break;