aboutsummaryrefslogtreecommitdiffstats
path: root/ctrl/libhicnctrl/src/modules/hicn_light.c
diff options
context:
space:
mode:
Diffstat (limited to 'ctrl/libhicnctrl/src/modules/hicn_light.c')
-rw-r--r--ctrl/libhicnctrl/src/modules/hicn_light.c11
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