diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2007-08-30 09:13:51 +0000 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2007-08-30 09:13:51 +0000 |
commit | 67d1e1774b3ff2d7a09fcf49484515bd85c02d14 (patch) | |
tree | 17d427ab6b451ec834c9983d018016b2ca57cbb1 /audio | |
parent | 921c1a63009394047b963930cfd49fea60017599 (diff) |
Fix stream setup error handling
Diffstat (limited to 'audio')
-rw-r--r-- | audio/a2dp.c | 7 | ||||
-rw-r--r-- | audio/sink.c | 1 |
2 files changed, 4 insertions, 4 deletions
diff --git a/audio/a2dp.c b/audio/a2dp.c index aea7224a..45a1bfe0 100644 --- a/audio/a2dp.c +++ b/audio/a2dp.c @@ -315,11 +315,7 @@ static void discovery_complete(struct avdtp *session, GSList *seps, int err, if (err < 0) { error("avdtp_set_configuration: %s", strerror(-err)); finalize_stream_setup(setup); - return; } - - /* Notify sink.c of the new stream */ - sink_new_stream(setup->dev, session, setup->stream); } static gboolean setconf_ind(struct avdtp *session, @@ -434,6 +430,9 @@ static void setconf_cfm(struct avdtp *session, struct avdtp_local_sep *sep, if (!setup) return; + /* Notify sink.c of the new stream */ + sink_new_stream(setup->dev, session, setup->stream); + ret = avdtp_open(session, stream); if (ret < 0) { error("Error on avdtp_open %s (%d)", strerror(-ret), diff --git a/audio/sink.c b/audio/sink.c index 599fdaaf..67c53ccd 100644 --- a/audio/sink.c +++ b/audio/sink.c @@ -144,6 +144,7 @@ static void stream_setup_complete(struct avdtp *session, struct device *dev, pending = sink->connect; sink->connect = NULL; + sink->cb_id = 0; if (stream) { DBusMessage *reply; |