Thread (17 messages) flat view 17 messages, 2 authors, 2011-08-29

Re: [PATCH v3 5/8] Set state to "connecting" on connection requested

From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Date: 2011-08-29 08:34:49

Hi Frédéric,

2011/8/26 Frédéric Dalleau [off-list ref]:
quoted hunk ↗ jump to hunk
This change will become necessary when
integrating the Audio interface which rely on
state change to confirm that connection
has started successfully.
---
 audio/gateway.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/audio/gateway.c b/audio/gateway.c
index 7bab77c..353473b 100644
--- a/audio/gateway.c
+++ b/audio/gateway.c
@@ -503,8 +503,6 @@ static void get_record_cb(sdp_list_t *recs, int err, gpointer user_data)
       }

       g_io_channel_unref(io);
-
-       change_state(dev, GATEWAY_STATE_CONNECTING);
       return;

 fail:
@@ -530,6 +528,7 @@ static int get_records(struct audio_device *device)
 {
       uuid_t uuid;

+       change_state(device, GATEWAY_STATE_CONNECTING);
       sdp_uuid16_create(&uuid, HANDSFREE_AGW_SVCLASS_ID);
       return bt_search_service(&device->src, &device->dst, &uuid,
                               get_record_cb, device, NULL);
--
1.7.1
How about incoming connections? If you take a look at headset,
audio/manage.c set HEADSET_STATE_CONNECTING, I guess we should have
something similar to gateway, right?

-- 
Luiz Augusto von Dentz
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help