From a2b78a5731a5afb3555ad350ea50e5939dad7f88 Mon Sep 17 00:00:00 2001 From: Jordan Augé Date: Fri, 21 Oct 2022 14:45:43 +0200 Subject: fix(libhicnctrl): hc_face_create does not update face id in parameter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I30090edb7d365befdc838e0b08ae22bdde377ea2 Ticket: HICN-817 Signed-off-by: Jordan Augé --- ctrl/libhicnctrl/src/objects/face.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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) { -- cgit 1.2.3-korg