aboutsummaryrefslogtreecommitdiffstats
path: root/ctrl/libhicnctrl/src/hicn_plugin_api.c
diff options
context:
space:
mode:
authorAlberto Compagno <acompagn+fdio@cisco.com>2019-12-11 14:53:54 +0000
committerAlberto Compagno <acompagn+fdio@cisco.com>2019-12-12 09:18:38 +0000
commit5025893d25112d52760d5fa311e9592d66122e54 (patch)
treeeb57666fc0c9abc09391d8838def95239365bf9b /ctrl/libhicnctrl/src/hicn_plugin_api.c
parent7631d5c804f61e618deb9e48ecb2458c77d36577 (diff)
[HICN-448] Returning face id when creating a face through libctrl in hicn-plugin
Signed-off-by: Alberto Compagno <acompagn+fdio@cisco.com> Change-Id: I0b9420d9e5335a1062ba31b0885ee4414e4991bf
Diffstat (limited to 'ctrl/libhicnctrl/src/hicn_plugin_api.c')
-rw-r--r--ctrl/libhicnctrl/src/hicn_plugin_api.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/ctrl/libhicnctrl/src/hicn_plugin_api.c b/ctrl/libhicnctrl/src/hicn_plugin_api.c
index 233abb0f8..b2de6cc2f 100644
--- a/ctrl/libhicnctrl/src/hicn_plugin_api.c
+++ b/ctrl/libhicnctrl/src/hicn_plugin_api.c
@@ -1337,8 +1337,14 @@ int hc_face_create(hc_sock_t *s, hc_face_t *face) {
.parse = (HC_PARSE)parse_face_create,
};
- return hc_execute_command(s, (hc_msg_t *)&msg, sizeof(msg), &params, NULL,
- false);
+ hc_data_t *data;
+
+ int ret = hc_execute_command(s, (hc_msg_t *)&msg, sizeof(msg), &params, &data,
+ false);
+ if (ret == 0)
+ face->id = ((hc_face_t *)data->buffer)->id;
+
+ return ret;
}
/* FACE DELETE */