aboutsummaryrefslogtreecommitdiffstats
path: root/ctrl/facemgr/examples/updownsrv/updownsrv.c
diff options
context:
space:
mode:
authorJordan Augé <jordan.auge+fdio@cisco.com>2019-10-23 17:55:00 +0200
committerJordan Augé <jordan.auge+fdio@cisco.com>2019-10-24 00:21:47 +0200
commit8e12c8e42cc9ea9d12e55a3a0d8fbcb211504c04 (patch)
tree1556919c967bd1b6ea664c1f80d6d43efb805f59 /ctrl/facemgr/examples/updownsrv/updownsrv.c
parentcf3d6ef0cbda50c9917421213a77097250f3d67b (diff)
[HICN-352] facemgr event loop enhancement; timer support & async hicn-light interface
Change-Id: I920a0eb091d826e1eb0d1f786fb0b437487f7ff7 Signed-off-by: Jordan Augé <jordan.auge+fdio@cisco.com>
Diffstat (limited to 'ctrl/facemgr/examples/updownsrv/updownsrv.c')
-rw-r--r--ctrl/facemgr/examples/updownsrv/updownsrv.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/ctrl/facemgr/examples/updownsrv/updownsrv.c b/ctrl/facemgr/examples/updownsrv/updownsrv.c
index e10247860..5d624583b 100644
--- a/ctrl/facemgr/examples/updownsrv/updownsrv.c
+++ b/ctrl/facemgr/examples/updownsrv/updownsrv.c
@@ -112,6 +112,12 @@ int main() {
fd = create_unix_server(UNIX_PATH);
if (fd < 0)
exit(EXIT_FAILURE);
+
+ if (fcntl(fd, F_SETFL, O_NONBLOCK) < 0) {
+ perror("fcntl");
+ exit(EXIT_FAILURE);
+ }
+
FD_SET (fd, &active_fd_set);
/* Create timer */
@@ -121,7 +127,7 @@ int main() {
exit(EXIT_FAILURE);
}
- if (fcntl(fd, F_SETFL, O_NONBLOCK) < 0) {
+ if (fcntl(tfd, F_SETFL, O_NONBLOCK) < 0) {
perror("fcntl");
exit(EXIT_FAILURE);
}