A small memory footprint AMQP implimentation
Dependents: iothub_client_sample_amqp remote_monitoring simplesample_amqp
Diff: session.c
- Revision:
- 12:b30dacf113f2
- Parent:
- 7:9e9ab3b0efef
- Child:
- 13:9abd748f4e78
diff -r b9de84324501 -r b30dacf113f2 session.c --- a/session.c Thu Sep 22 18:16:30 2016 -0700 +++ b/session.c Thu Oct 20 17:07:44 2016 -0700 @@ -581,7 +581,7 @@ session_instance->remote_outgoing_window--; session_instance->incoming_window--; - LINK_ENDPOINT_INSTANCE* link_endpoint = find_link_endpoint_by_output_handle(session_instance, remote_handle); + LINK_ENDPOINT_INSTANCE* link_endpoint = find_link_endpoint_by_input_handle(session_instance, remote_handle); if (link_endpoint == NULL) { end_session_with_error(session_instance, "amqp:session:unattached-handle", ""); @@ -1076,8 +1076,8 @@ { LINK_ENDPOINT_INSTANCE** new_endpoints; - if (i < (session_instance->link_endpoint_count - 1)) - { + if (i < (session_instance->link_endpoint_count - 1)) + { (void)memmove(&session_instance->link_endpoints[i], &session_instance->link_endpoints[i + 1], (session_instance->link_endpoint_count - (uint32_t)i - 1) * sizeof(LINK_ENDPOINT_INSTANCE*)); } @@ -1187,8 +1187,9 @@ if (result == 0) { - if ((flow_set_incoming_window(flow, session_instance->incoming_window) != 0) || - (flow_set_next_outgoing_id(flow, session_instance->next_outgoing_id) != 0) || + if ((flow_set_next_incoming_id(flow, session_instance->next_incoming_id) != 0) || + (flow_set_incoming_window(flow, session_instance->incoming_window) != 0) || + (flow_set_next_outgoing_id(flow, session_instance->next_outgoing_id) != 0) || (flow_set_outgoing_window(flow, session_instance->outgoing_window) != 0) || (flow_set_handle(flow, link_endpoint_instance->output_handle) != 0)) {