aboutsummaryrefslogtreecommitdiffstats
path: root/ctrl/facemgr/src/interface.c
diff options
context:
space:
mode:
authorJordan Augé <jordan.auge@cisco.com>2019-10-30 17:56:08 +0100
committerJordan Augé <jordan.auge@cisco.com>2019-10-31 13:41:47 +0100
commit95170bf3a69597b49238bb7ff396d41f6dc94f30 (patch)
tree2f9b565e84514d7ee25cfd874235dd25e9300a0f /ctrl/facemgr/src/interface.c
parentfc6dfe9f7ee02834ae1e6f56e0aaee36ac3e88dd (diff)
[HICN-369] Implement reconciliation state machine in face manager incl. reattempts in case of errors
Change-Id: Ia4ecf621fbd513d9e29313d2aaa487aa65811183 Signed-off-by: Jordan Augé <jordan.auge@cisco.com>
Diffstat (limited to 'ctrl/facemgr/src/interface.c')
-rw-r--r--ctrl/facemgr/src/interface.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/ctrl/facemgr/src/interface.c b/ctrl/facemgr/src/interface.c
index 5cefcb98c..72a78ef56 100644
--- a/ctrl/facemgr/src/interface.c
+++ b/ctrl/facemgr/src/interface.c
@@ -21,9 +21,11 @@
#include <assert.h>
#include <stdlib.h>
#include <string.h>
-#include "facelet.h"
-#include "interface.h"
+
+#include <hicn/facemgr/facelet.h>
#include <hicn/facemgr/loop.h> /* *_callback_data_t */
+
+#include "interface.h"
#include "util/map.h"
TYPEDEF_MAP_H(interface_ops_map, const char *, const interface_ops_t *);
@@ -62,6 +64,8 @@ interface_unregister_all()
}
free(ops_name_array);
}
+ interface_ops_map_free(interface_ops_map);
+ interface_ops_map = NULL;
return ret;
}
@@ -155,8 +159,14 @@ int
interface_unregister_fd(interface_t * interface, int fd)
{
assert(interface->callback);
+ fd_callback_data_t fd_callback = {
+ .fd = fd,
+ .owner = interface,
+ .callback = NULL,
+ .data = NULL,
+ };
return interface->callback(interface->callback_owner,
- INTERFACE_CB_TYPE_UNREGISTER_FD, &fd);
+ INTERFACE_CB_TYPE_UNREGISTER_FD, &fd_callback);
}
typedef int (*interface_fd_callback_t)(interface_t * interface, int fd, void * unused);