A small memory footprint AMQP implimentation
Dependents: iothub_client_sample_amqp remote_monitoring simplesample_amqp
Diff: link.c
- Revision:
- 2:64b4feb67cd3
- Parent:
- 1:eab586236bfe
- Child:
- 3:96522ba2ddf8
--- a/link.c Sun Apr 24 16:40:31 2016 -0700 +++ b/link.c Mon May 09 14:37:14 2016 -0700 @@ -612,7 +612,8 @@ { if (link != NULL) { - link_detach(link); + link->on_link_state_changed = NULL; + link_detach(link); session_destroy_link_endpoint(link->link_endpoint); amqpvalue_destroy(link->source); @@ -907,7 +908,8 @@ } else { - if (link->role != role_sender) + if ((link->role != role_sender) || + (link->link_state != LINK_STATE_ATTACHED)) { result = LINK_TRANSFER_ERROR; }