Commit 6ec3a730 authored by spiiroin's avatar spiiroin

[udev] Fix udev iowatch issues

The io watch source id is not cleared when it is going to be implicitly
removed - which can lead to unsuccessful removal attempt when/if
hwal_cleanup() function is called later on.

Clear watch_id when return value from the callback function is going
to cause it to be implicitly removed.
Signed-off-by: spiiroin's avatarSimo Piiroinen <simo.piiroinen@jollamobile.com>
parent 7bc44985
......@@ -264,8 +264,9 @@ static gboolean monitor_udev(GIOChannel *iochannel G_GNUC_UNUSED, GIOCondition c
release_wakelock(USB_MODED_WAKELOCK_PROCESS_INPUT);
if (!continue_watching)
if (!continue_watching && watch_id )
{
watch_id = 0;
log_crit("udev io watch disabled");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment