mirror of git://git.sysmocom.de/ofono
Do not automatically remove watches for service names
Services can be owned again so it is perfectly fine to keep the watch.
This commit is contained in:
parent
d486ba8f2a
commit
93d5bd6af8
|
@ -386,18 +386,19 @@ static DBusHandlerResult service_filter(DBusConnection *connection,
|
|||
cb->conn_func(connection, cb->user_data);
|
||||
}
|
||||
|
||||
/* Only auto remove if it is a bus name watch */
|
||||
if (data->argument[0] == ':' &&
|
||||
(!cb->conn_func || !cb->disc_func)) {
|
||||
filter_data_remove_callback(data, cb);
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Check if the watch was removed/freed by the callback
|
||||
* function */
|
||||
if (!g_slist_find(data->callbacks, cb))
|
||||
continue;
|
||||
|
||||
data->callbacks = g_slist_remove(data->callbacks, cb);
|
||||
|
||||
if (!cb->conn_func || !cb->disc_func) {
|
||||
g_free(cb);
|
||||
continue;
|
||||
}
|
||||
|
||||
data->processed = g_slist_append(data->processed, cb);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue