summaryrefslogtreecommitdiffstats
path: root/ctrl/libhicnctrl/src/objects
diff options
context:
space:
mode:
authorJordan Augé <jordan.auge+fdio@cisco.com>2022-10-21 14:45:43 +0200
committerJordan Augé <jordan.auge+fdio@cisco.com>2022-10-21 14:45:43 +0200
commita2b78a5731a5afb3555ad350ea50e5939dad7f88 (patch)
tree8270336d70ce4773cedcce73da9290906aa4225f /ctrl/libhicnctrl/src/objects
parent7b3426fb129f41ca05353b5e1dd66264a3a96d0f (diff)
fix(libhicnctrl): hc_face_create does not update face id in parameter
Change-Id: I30090edb7d365befdc838e0b08ae22bdde377ea2 Ticket: HICN-817 Signed-off-by: Jordan Augé <jordan.auge+fdio@cisco.com>
Diffstat (limited to 'ctrl/libhicnctrl/src/objects')
-rw-r--r--ctrl/libhicnctrl/src/objects/face.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ctrl/libhicnctrl/src/objects/face.c b/ctrl/libhicnctrl/src/objects/face.c
index b0dbcd7a5..5dbe1c8dc 100644
--- a/ctrl/libhicnctrl/src/objects/face.c
+++ b/ctrl/libhicnctrl/src/objects/face.c
@@ -141,10 +141,13 @@ int _hc_face_snprintf(char *s, size_t size, const hc_object_t *object) {
}
int hc_face_create(hc_sock_t *s, hc_face_t *face) {
+ int rc;
hc_object_t object;
memset(&object, 0, sizeof(hc_object_t));
object.face = *face;
- return hc_execute(s, ACTION_CREATE, OBJECT_TYPE_FACE, &object, NULL);
+ rc = hc_execute(s, ACTION_CREATE, OBJECT_TYPE_FACE, &object, NULL);
+ face->id = object.face.id;
+ return rc;
}
int hc_face_get(hc_sock_t *s, hc_face_t *face, hc_data_t **pdata) {