A small memory footprint AMQP implimentation
Dependents: iothub_client_sample_amqp remote_monitoring simplesample_amqp
Diff: session.c
- Revision:
- 29:4a11413cf217
- Parent:
- 28:add19eb7defa
- Child:
- 30:0407b2db334c
diff -r add19eb7defa -r 4a11413cf217 session.c --- a/session.c Fri Jun 30 10:41:22 2017 -0700 +++ b/session.c Fri Jul 14 16:38:03 2017 -0700 @@ -374,13 +374,22 @@ AMQP_VALUE source; AMQP_VALUE target; - if ((attach_get_name(attach_handle, &name) != 0) || - (attach_get_role(attach_handle, &role) != 0) || - (attach_get_source(attach_handle, &source) != 0) || - (attach_get_target(attach_handle, &target) != 0)) + if (attach_get_name(attach_handle, &name) != 0) { end_session_with_error(session_instance, "amqp:decode-error", "Cannot get link name from ATTACH frame"); } + else if (attach_get_role(attach_handle, &role) != 0) + { + end_session_with_error(session_instance, "amqp:decode-error", "Cannot get link role from ATTACH frame"); + } + else if (attach_get_source(attach_handle, &source) != 0) + { + end_session_with_error(session_instance, "amqp:decode-error", "Cannot get link source from ATTACH frame"); + } + else if (attach_get_target(attach_handle, &target) != 0) + { + end_session_with_error(session_instance, "amqp:decode-error", "Cannot get link target from ATTACH frame"); + } else { LINK_ENDPOINT_INSTANCE* link_endpoint = find_link_endpoint_by_name(session_instance, name);