diff options
| author | Michael Biebl <biebl@debian.org> | 2019-02-26 19:02:28 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2019-02-26 19:02:28 +0100 |
| commit | 439c9d76f576ae28c73571d444c59d9e95e5ad11 (patch) | |
| tree | 7591e0b43641131fc049d6d7a0bd19e9e4964a40 /shared/nm-utils/nm-udev-utils.c | |
| parent | 12aead6b161a3312673ac62686af0350061c0666 (diff) | |
| parent | 964ae8cc391520440cf5aa13e2b9cc34850ea6c2 (diff) | |
Update upstream source from tag 'upstream/1.14.6'
Update to upstream version '1.14.6' with Debian dir ef09251bb8b7a4afa8e2b004d785517d8a2d973d
Diffstat (limited to 'shared/nm-utils/nm-udev-utils.c')
| -rw-r--r-- | shared/nm-utils/nm-udev-utils.c | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/shared/nm-utils/nm-udev-utils.c b/shared/nm-utils/nm-udev-utils.c index 709f7590..5d0919b3 100644 --- a/shared/nm-utils/nm-udev-utils.c +++ b/shared/nm-utils/nm-udev-utils.c @@ -241,26 +241,23 @@ nm_udev_client_new (const char *const*subsystems, if (self->subsystems) { /* install subsystem filters to only wake up for certain events */ for (n = 0; self->subsystems[n]; n++) { - if (self->monitor) { - gs_free char *to_free = NULL; - const char *subsystem; - const char *devtype; - - _subsystem_split (self->subsystems[n], &subsystem, &devtype, &to_free); - udev_monitor_filter_add_match_subsystem_devtype (self->monitor, subsystem, devtype); - } + gs_free char *to_free = NULL; + const char *subsystem; + const char *devtype; + + _subsystem_split (self->subsystems[n], &subsystem, &devtype, &to_free); + udev_monitor_filter_add_match_subsystem_devtype (self->monitor, subsystem, devtype); } /* listen to events, and buffer them */ - if (self->monitor) { - udev_monitor_enable_receiving (self->monitor); - channel = g_io_channel_unix_new (udev_monitor_get_fd (self->monitor)); - self->watch_source = g_io_create_watch (channel, G_IO_IN); - g_io_channel_unref (channel); - g_source_set_callback (self->watch_source, (GSourceFunc)(void (*) (void)) monitor_event, self, NULL); - g_source_attach (self->watch_source, g_main_context_get_thread_default ()); - g_source_unref (self->watch_source); - } + udev_monitor_set_receive_buffer_size (self->monitor, 4*1024*1024); + udev_monitor_enable_receiving (self->monitor); + channel = g_io_channel_unix_new (udev_monitor_get_fd (self->monitor)); + self->watch_source = g_io_create_watch (channel, G_IO_IN); + g_io_channel_unref (channel); + g_source_set_callback (self->watch_source, (GSourceFunc)(void (*) (void)) monitor_event, self, NULL); + g_source_attach (self->watch_source, g_main_context_get_thread_default ()); + g_source_unref (self->watch_source); } } |