diff options
author | Jordan Augé <jordan.auge+fdio@cisco.com> | 2022-09-20 13:27:12 +0200 |
---|---|---|
committer | Jordan Augé <jordan.auge+fdio@cisco.com> | 2022-09-22 12:20:58 +0200 |
commit | bd26d18978861b24c5707dbaa24dac76133425e2 (patch) | |
tree | 7ff84df44d440254b48f800c368005eb27d4680d /ctrl/libhicnctrl/src/modules/hicn_light.c | |
parent | 45da502db58f712b78e59c214f05c44aa01ea8d0 (diff) |
fix(libhicnctrl): fix new listener validation during face or connection creation
Change-Id: I5f532320fcb3fc01cd3a027af7ea5fc6425e4097
Ref: HICN-790
Signed-off-by: Jordan Augé <jordan.auge+fdio@cisco.com>
Diffstat (limited to 'ctrl/libhicnctrl/src/modules/hicn_light.c')
-rw-r--r-- | ctrl/libhicnctrl/src/modules/hicn_light.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/ctrl/libhicnctrl/src/modules/hicn_light.c b/ctrl/libhicnctrl/src/modules/hicn_light.c index 658043b7f..8c2009d91 100644 --- a/ctrl/libhicnctrl/src/modules/hicn_light.c +++ b/ctrl/libhicnctrl/src/modules/hicn_light.c @@ -897,7 +897,7 @@ NEXT: /* Check whether listener creation succeeded */ case REQUEST_STATE_CONNECTION_CREATE_LISTENER_CHECK: - if (!data || hc_data_get_result(data)) return -1; + if (!data || !hc_data_get_result(data)) return -1; hc_request_set_state(current_request, REQUEST_STATE_CONNECTION_CREATE); goto NEXT; @@ -1068,8 +1068,13 @@ static ssize_t hicnlight_prepare(hc_sock_t *sock, hc_request_t *request, static hc_object_t object_subscribe; - DEBUG("[hicnlight_prepare] %s %s", action_str(action), - object_type_str(object_type)); + WITH_DEBUG({ + char buf[MAXSZ_HC_OBJECT]; + hc_request_state_t state = hc_request_get_state(current_request); + hc_object_snprintf(buf, sizeof(buf), object_type, object); + DEBUG("[hicnlight_prepare] %s %s [%s] %s", action_str(action), + object_type_str(object_type), hc_request_state_str(state), buf); + }); /* * Here the request is in progress and we just need to iterate through the |