diff options
author | Luiz Augusto von Dentz <luiz.dentz@openbossa.org> | 2007-12-05 18:56:30 +0000 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.dentz@openbossa.org> | 2007-12-05 18:56:30 +0000 |
commit | 2824d253c5b10f19ae37dca1c36705ee4edf84c0 (patch) | |
tree | 840f8168c8849be3a105aac180b6fbdd2c43f73f /audio/avdtp.c | |
parent | d51c190ddd0c2774509d0284979b24b9b0f3524a (diff) |
Cache discovery process to avoid delays.
Diffstat (limited to 'audio/avdtp.c')
-rw-r--r-- | audio/avdtp.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/audio/avdtp.c b/audio/avdtp.c index 3acd4128..cb2a99e6 100644 --- a/audio/avdtp.c +++ b/audio/avdtp.c @@ -1825,20 +1825,14 @@ static gboolean avdtp_discover_resp(struct avdtp *session, resp->seps[i].media_type, resp->seps[i].inuse); /* Skip SEP's which are in use */ -/* if (resp->seps[i].inuse) continue; -*/ sep = find_remote_sep(session->seps, resp->seps[i].seid); if (!sep) { sep = g_new0(struct avdtp_remote_sep, 1); session->seps = g_slist_append(session->seps, sep); } -/* - else if (sep && sep->stream) - continue; -*/ sep->seid = resp->seps[i].seid; sep->type = resp->seps[i].type; @@ -2369,6 +2363,11 @@ int avdtp_discover(struct avdtp *session, avdtp_discover_cb_t cb, void *user_dat if (session->discov_cb) return -EBUSY; + if (session->seps) { + cb(session, session->seps, NULL, user_data); + return 0; + } + memset(&req, 0, sizeof(req)); init_request(&req.header, AVDTP_DISCOVER); |