Linux bluetooth development
 help / color / mirror / Atom feed
From: Dmitriy Paliy <dmitriy.paliy@nokia.com>
To: linux-bluetooth@vger.kernel.org, luiz.dentz@gmail.com
Cc: Dmitriy Paliy <dmitriy.paliy@nokia.com>
Subject: [PATCH 1/2] Move find_session in adapter.c
Date: Mon, 28 Feb 2011 13:34:24 +0200	[thread overview]
Message-ID: <1298892865-14930-2-git-send-email-dmitriy.paliy@nokia.com> (raw)
In-Reply-To: <1298892865-14930-1-git-send-email-dmitriy.paliy@nokia.com>

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


  reply	other threads:[~2011-02-28 11:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-28 11:34 [PATCH 0/2 v2] Fix response on adapter RequestSession method Dmitriy Paliy
2011-02-28 11:34 ` Dmitriy Paliy [this message]
2011-02-28 11:34 ` [PATCH 2/2] " Dmitriy Paliy
2011-02-28 13:31   ` Luiz Augusto von Dentz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1298892865-14930-2-git-send-email-dmitriy.paliy@nokia.com \
    --to=dmitriy.paliy@nokia.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox