aboutsummaryrefslogtreecommitdiffstats
path: root/ctrl/facemgr/src/interfaces/bonjour/bonjour.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/src/interfaces/bonjour/bonjour.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/src/interfaces/bonjour/bonjour.c')
-rw-r--r--ctrl/facemgr/src/interfaces/bonjour/bonjour.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/ctrl/facemgr/src/interfaces/bonjour/bonjour.c b/ctrl/facemgr/src/interfaces/bonjour/bonjour.c
index d7b27b995..4d09d89bb 100644
--- a/ctrl/facemgr/src/interfaces/bonjour/bonjour.c
+++ b/ctrl/facemgr/src/interfaces/bonjour/bonjour.c
@@ -107,7 +107,9 @@ int bj_initialize(interface_t * interface, void * cfg)
WSAStartup(versionWanted, &wsaData);
#endif
- return data->sock;
+ interface_register_fd(interface, data->sock, NULL);
+
+ return 0;
ERR_BUFFER:
#ifndef __ANDROID__
@@ -268,7 +270,7 @@ callback(const struct sockaddr* from, mdns_entry_type_t entry, uint16_t type,
//facelet_set_remote_port(facelet, ((struct sockaddr_in*)&addr)->sin_port);
facelet_set_event(facelet, FACELET_EVENT_UPDATE);
- facelet_raise_event(facelet, interface);
+ interface_raise_event(interface, facelet);
break;
}
@@ -291,7 +293,7 @@ callback(const struct sockaddr* from, mdns_entry_type_t entry, uint16_t type,
//facelet_set_remote_port(facelet, ((struct sockaddr_in6*)&addr)->sin6_port);
facelet_set_event(facelet, FACELET_EVENT_UPDATE);
- facelet_raise_event(facelet, interface);
+ interface_raise_event(interface, facelet);
break;
}
@@ -317,7 +319,7 @@ callback(const struct sockaddr* from, mdns_entry_type_t entry, uint16_t type,
facelet_set_remote_port(facelet, srv.port);
facelet_set_event(facelet, FACELET_EVENT_UPDATE);
- facelet_raise_event(facelet, interface);
+ interface_raise_event(interface, facelet);
facelet = facelet_create();
facelet_set_netdevice(facelet, bj_data->cfg.netdevice);
@@ -325,7 +327,7 @@ callback(const struct sockaddr* from, mdns_entry_type_t entry, uint16_t type,
facelet_set_remote_port(facelet, srv.port);
facelet_set_event(facelet, FACELET_EVENT_UPDATE);
- facelet_raise_event(facelet, interface);
+ interface_raise_event(interface, facelet);
break;
}
@@ -374,7 +376,7 @@ callback(const struct sockaddr* from, mdns_entry_type_t entry, uint16_t type,
* The fact we use a single fd does not allow us to get user_data associated to
* the query.
*/
-int bj_callback(interface_t * interface)
+int bj_callback(interface_t * interface, int fd, void * unused)
{
bj_data_t * data = (bj_data_t*)interface->data;
DEBUG("Got an mDNS reply");