diff options
author | Mauro Sardara <msardara@cisco.com> | 2022-09-22 13:47:55 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@fd.io> | 2022-09-22 13:47:55 +0000 |
commit | b498b1d3fe2684e0233986551fa581a07148e22b (patch) | |
tree | 0cc5203e8be42408d9910166f479256d48523436 /ctrl/libhicnctrl/src/modules/hicn_light.c | |
parent | 356530fa42140a9f0ad43269125fd96ad1ced594 (diff) | |
parent | bd26d18978861b24c5707dbaa24dac76133425e2 (diff) |
Merge "fix(libhicnctrl): fix new listener validation during face or connection creation"
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 2716eefd5..729d98f89 100644 --- a/ctrl/libhicnctrl/src/modules/hicn_light.c +++ b/ctrl/libhicnctrl/src/modules/hicn_light.c @@ -956,7 +956,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; @@ -1212,8 +1212,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 |