- sd_event *event_loop;
- sd_event_source *source;
- int rc;
-
- if (CanBus_handler.socket < 0)
- {
- return CanBus_handler.socket;
- }
-
- event_loop = afb_daemon_get_event_loop(interface->daemon);
- rc = sd_event_add_io(event_loop, &source, CanBus_handler.socket, EPOLLIN, on_event, NULL);
- if (rc < 0)
- {
- CanBus_handler.close();
- ERROR(interface, "Can't connect CAN bus %s to the event loop", CanBus_handler.device);
- } else
+ s[sig_name] = afb_daemon_make_event(binder_interface->daemon, sig_name.c_str());
+ if (!afb_event_is_valid(s[sig_name]))