summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClaudio Takahasi <claudio.takahasi@openbossa.org>2008-05-05 21:17:30 +0000
committerClaudio Takahasi <claudio.takahasi@openbossa.org>2008-05-05 21:17:30 +0000
commitd78c8f2dce3e97c62e71e07a5f78f1289db1dd58 (patch)
tree7a72caa9bf185b01d00791247b9bf645ea23bd1e
parent71c8ceab961dffc52b7dd4c814529083aede9c48 (diff)
serial: check if the owner exited in the RFCOMM connect callback
-rw-r--r--serial/manager.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/serial/manager.c b/serial/manager.c
index 631158c9..2bb1ce84 100644
--- a/serial/manager.c
+++ b/serial/manager.c
@@ -345,6 +345,10 @@ static void rfcomm_connect_cb(GIOChannel *chan, int err_cb, gpointer user_data)
struct rfcomm_dev_req req;
int sk, err, fd;
+ /* Owner exited? */
+ if (!g_slist_find(pending_connects, pc))
+ return;
+
if (pc->canceled) {
error_canceled(pc->conn, pc->msg, "Connection canceled");
goto fail;