summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2009-02-19 22:41:35 +0200
committerJohan Hedberg <johan.hedberg@nokia.com>2009-02-19 22:41:35 +0200
commit9b0acaa2621f6a5db077644d2a5a816017eae4b5 (patch)
tree5ec25aafaca6b1e819e337699973f4a530e4eb96
parentaff6a6e5e5661b523e3cf03bd93911b72d5e36d9 (diff)
Fix connection authorization when the device is trusted
-rw-r--r--audio/avdtp.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/audio/avdtp.c b/audio/avdtp.c
index 3d383dfc..8b926a46 100644
--- a/audio/avdtp.c
+++ b/audio/avdtp.c
@@ -1980,6 +1980,9 @@ static void avdtp_confirm_cb(GIOChannel *chan, gpointer data)
goto drop;
}
+ session->io = g_io_channel_ref(chan);
+ session->state = AVDTP_SESSION_STATE_CONNECTING;
+
session->io_id = g_io_add_watch(chan, G_IO_ERR | G_IO_HUP | G_IO_NVAL,
(GIOFunc) session_cb, session);
perr = btd_request_authorization(&src, &dst, ADVANCED_AUDIO_UUID,
@@ -1989,10 +1992,6 @@ static void avdtp_confirm_cb(GIOChannel *chan, gpointer data)
goto drop;
}
- session->io = g_io_channel_ref(chan);
-
- session->state = AVDTP_SESSION_STATE_CONNECTING;
-
return;
drop: