aboutsummaryrefslogtreecommitdiffstats
path: root/ctrl/libhicnctrl/includes
diff options
context:
space:
mode:
authorJordan Augé <jordan.auge+fdio@cisco.com>2019-11-12 00:03:08 +0100
committerJordan Augé <jordan.auge+fdio@cisco.com>2019-11-14 17:16:56 +0100
commitfdb523a02680f5aa0727b862f0616ba5f8cb24cf (patch)
tree01fdf30eafde2a6f74edba52890715f55fdd6554 /ctrl/libhicnctrl/includes
parent4f57ca72e8131e5cfb023b26417b924e774d5e73 (diff)
[HICN-386] Improve API error management in libhicnctrl
Change-Id: I332e74ebcd89798c93de50ae7a20f7af8f59f54c Signed-off-by: Jordan Augé <jordan.auge+fdio@cisco.com>
Diffstat (limited to 'ctrl/libhicnctrl/includes')
-rw-r--r--ctrl/libhicnctrl/includes/hicn/ctrl/api.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/ctrl/libhicnctrl/includes/hicn/ctrl/api.h b/ctrl/libhicnctrl/includes/hicn/ctrl/api.h
index f522010cd..b3032d0f3 100644
--- a/ctrl/libhicnctrl/includes/hicn/ctrl/api.h
+++ b/ctrl/libhicnctrl/includes/hicn/ctrl/api.h
@@ -74,6 +74,8 @@
#define HICN_DEFAULT_PORT 9695
+#define HOTFIXMARGIN 0
+
/* Helper for avoiding warnings about type-punning */
#define UNION_CAST(x, destType) \
(((union {__typeof__(x) a; destType b;})x).b)
@@ -124,6 +126,7 @@ typedef struct hc_data_s {
/* Callbacks */
data_callback_t complete_cb; // XXX int (*complete_cb)(struct hc_data_s * data);
void * complete_cb_data;
+ int ret;
} hc_data_t;
/**
@@ -412,7 +415,7 @@ foreach_connection_type
} hc_connection_type_t;
#define MAXSZ_HC_CONNECTION_TYPE_ 9
-#define MAXSZ_HC_CONNECTION_TYPE MAXSZ_HC_CONNECTION_TYPE_ + NULLTERM
+#define MAXSZ_HC_CONNECTION_TYPE MAXSZ_HC_CONNECTION_TYPE_ + NULLTERM + HOTFIXMARGIN
extern const char * connection_type_str[];
@@ -574,7 +577,7 @@ int hc_face_list_async(hc_sock_t * s); //, hc_data_t ** pdata);
#define MAXSZ_FACE_NAME_ SYMBOLIC_NAME_LEN
#define MAXSZ_FACE_NAME MAXSZ_FACE_NAME_ + NULLTERM
-#define MAXSZ_HC_FACE_ MAXSZ_FACE_ID_ + MAXSZ_FACE_NAME_ + MAXSZ_FACE_ + 5
+#define MAXSZ_HC_FACE_ MAXSZ_FACE_ID_ + MAXSZ_FACE_NAME_ + MAXSZ_FACE_ + 5 + HOTFIXMARGIN
#define MAXSZ_HC_FACE MAXSZ_HC_FACE_ + NULLTERM
int hc_face_snprintf(char * s, size_t size, hc_face_t * face);