sd-device: do not call device_monitor_enable_receiving() for passed fd from pid1
Before c4b69e990f
, if the socket fd is
passed from pid1, `udev_monitor_enable_receiving()` (now it is a wrapper
of `device_monitor_enable_receiving`) was not called.
Let's preserve the original logic.
Fixes #10754.
This commit is contained in:
parent
f1d7b7874e
commit
916707cca5
|
@ -210,9 +210,11 @@ _public_ int sd_device_monitor_start(sd_device_monitor *m, sd_device_monitor_han
|
|||
return r;
|
||||
}
|
||||
|
||||
r = device_monitor_enable_receiving(m);
|
||||
if (r < 0)
|
||||
return r;
|
||||
if (!m->bound) {
|
||||
r = device_monitor_enable_receiving(m);
|
||||
if (r < 0)
|
||||
return r;
|
||||
}
|
||||
|
||||
m->callback = callback;
|
||||
m->userdata = userdata;
|
||||
|
|
Loading…
Reference in New Issue