mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-12-16 23:45:37 +08:00
network: Fix warning when removing connection timeout handler
The source should only be removed once as it can cause the following warning: GLib-CRITICAL **: g_source_remove: assertion `tag > 0' failed
This commit is contained in:
parent
889b97e685
commit
b809cae236
@ -207,8 +207,10 @@ static gboolean bnep_setup_cb(GIOChannel *chan, GIOCondition cond,
|
||||
if (cond & G_IO_NVAL)
|
||||
return FALSE;
|
||||
|
||||
g_source_remove(nc->timeout_source);
|
||||
nc->timeout_source = 0;
|
||||
if (nc->timeout_source > 0) {
|
||||
g_source_remove(nc->timeout_source);
|
||||
nc->timeout_source = 0;
|
||||
}
|
||||
|
||||
if (cond & (G_IO_HUP | G_IO_ERR)) {
|
||||
error("Hangup or error on l2cap server socket");
|
||||
|
Loading…
Reference in New Issue
Block a user