Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH 1/22] Move find_session in adapter.c
@ 2011-02-28 11:28 Dmitriy Paliy
  2011-02-28 11:28 ` [PATCH 2/2] Fix response on adapter RequestSession method Dmitriy Paliy
  0 siblings, 1 reply; 2+ messages in thread
From: Dmitriy Paliy @ 2011-02-28 11:28 UTC (permalink / raw)
  To: linux-bluetooth, luiz.dentz; +Cc: Dmitriy Paliy

find_session is moved to be before set_mode, to avoid declaration
of prototype. It is used in the subsequent patch.
---
 src/adapter.c |   28 ++++++++++++++--------------
 1 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/src/adapter.c b/src/adapter.c
index 2e11832..49a23ec 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -452,6 +452,20 @@ static int adapter_set_mode(struct btd_adapter *adapter, uint8_t mode)
 	return 0;
 }
 
+static struct session_req *find_session(GSList *list, const char *sender)
+{
+	GSList *l;
+
+	for (l = list; l; l = l->next) {
+		struct session_req *req = l->data;
+
+		if (g_str_equal(req->owner, sender))
+			return req;
+	}
+
+	return NULL;
+}
+
 static int set_mode(struct btd_adapter *adapter, uint8_t new_mode,
 			DBusMessage *msg)
 {
@@ -620,20 +634,6 @@ static void adapter_set_pairable_timeout(struct btd_adapter *adapter,
 						adapter);
 }
 
-static struct session_req *find_session(GSList *list, const char *sender)
-{
-	GSList *l;
-
-	for (l = list; l; l = l->next) {
-		struct session_req *req = l->data;
-
-		if (g_str_equal(req->owner, sender))
-			return req;
-	}
-
-	return NULL;
-}
-
 static uint8_t get_needed_mode(struct btd_adapter *adapter, uint8_t mode)
 {
 	GSList *l;
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-02-28 11:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-28 11:28 [PATCH 1/22] Move find_session in adapter.c Dmitriy Paliy
2011-02-28 11:28 ` [PATCH 2/2] Fix response on adapter RequestSession method Dmitriy Paliy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox