From b8c8567c3dd604e7d0830d25d723ca70bda12db2 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Tue, 15 May 2012 19:16:45 +0300 Subject: [PATCH] obexd: Fix not setting port to 0 when listen fails With some only kernels auto assigning psm seem to fail, leaving the psm with wrong value: obexd[2930]: plugins/bluetooth.c:start() listening on channel 9 obexd[2930]: bluetooth: unable to listen in psm 65535 obexd[2930]: plugins/bluetooth.c:start() listening on channel 10 obexd[2930]: bluetooth: unable to listen in psm 65535 --- obexd/plugins/bluetooth.c | 1 + 1 file changed, 1 insertion(+) diff --git a/obexd/plugins/bluetooth.c b/obexd/plugins/bluetooth.c index aab50fd78..79de9a2ab 100644 --- a/obexd/plugins/bluetooth.c +++ b/obexd/plugins/bluetooth.c @@ -607,6 +607,7 @@ static GSList *start(struct obex_server *server, error("bluetooth: unable to listen in psm %d: %s", service->port, err->message); g_error_free(err); + service->port = 0; } else { l = g_slist_prepend(l, io); bt_io_get(io, BT_IO_L2CAP, &err, BT_IO_OPT_PSM, &service->port, -- 2.47.3