diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-04-15 06:19:54 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-04-15 06:20:00 +0200 |
commit | 4f2d528d3bb25cebf8d3ebe83d8193ab4016cb90 (patch) | |
tree | 96336ea5c252c903ab4666d49714ececf949dfdf /device.c | |
parent | 9e2f7c11fb6ba35ffec2274da3e2d08b10d23965 (diff) |
socket: optionally call accept() for incoming connections and spawn one service instance per connection
Diffstat (limited to 'device.c')
-rw-r--r-- | device.c | 24 |
1 files changed, 12 insertions, 12 deletions
@@ -415,21 +415,21 @@ static int device_enumerate(Manager *m) { if (epoll_ctl(m->epoll_fd, EPOLL_CTL_ADD, m->udev_watch.fd, &ev) < 0) return -errno; - /* if (!(e = udev_enumerate_new(m->udev))) { */ - /* r = -ENOMEM; */ - /* goto fail; */ - /* } */ + if (!(e = udev_enumerate_new(m->udev))) { + r = -ENOMEM; + goto fail; + } - /* if (udev_enumerate_scan_devices(e) < 0) { */ - /* r = -EIO; */ - /* goto fail; */ - /* } */ + if (udev_enumerate_scan_devices(e) < 0) { + r = -EIO; + goto fail; + } - /* first = udev_enumerate_get_list_entry(e); */ - /* udev_list_entry_foreach(item, first) */ - /* device_process_path(m, udev_list_entry_get_name(item), false); */ + first = udev_enumerate_get_list_entry(e); + udev_list_entry_foreach(item, first) + device_process_path(m, udev_list_entry_get_name(item), false); - /* udev_enumerate_unref(e); */ + udev_enumerate_unref(e); return 0; fail: |