linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/1] GN Master role fails to accept connections
@ 2016-10-13 13:24 Maxime Chevallier
  2016-10-13 13:24 ` [PATCH 1/1] profiles/network: look for GN servers to accept incoming connections Maxime Chevallier
  0 siblings, 1 reply; 2+ messages in thread
From: Maxime Chevallier @ 2016-10-13 13:24 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: luiz.dentz, Maxime Chevallier

Hi everyone,

The following patch fixes an issue where a GN server would not accept any
incoming connection. The confirm_event function in profiles/network/server.c
would only look for NAP servers when trying to get the server from a 
network adapter.

This patch has the function look for GN servers if no NAP server was found.

I am not quite sure that this patch won't break something else, so please tell
me if this is the wrong way to fix the issue.

Regards,

Maxime

Maxime Chevallier (1):
  profiles/network: look for GN servers to accept incoming connections

 profiles/network/server.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

-- 
2.1.4


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

* [PATCH 1/1] profiles/network: look for GN servers to accept incoming connections
  2016-10-13 13:24 [PATCH 0/1] GN Master role fails to accept connections Maxime Chevallier
@ 2016-10-13 13:24 ` Maxime Chevallier
  0 siblings, 0 replies; 2+ messages in thread
From: Maxime Chevallier @ 2016-10-13 13:24 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: luiz.dentz, Maxime Chevallier

When asking confirmation to accept an incoming connection, we must
try to get both NAP and GN servers from the adapter.

This fixes the PAN GN Master role, allowing devices to connect to it.
---
 profiles/network/server.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/profiles/network/server.c b/profiles/network/server.c
index 1bff9f8..843472f 100644
--- a/profiles/network/server.c
+++ b/profiles/network/server.c
@@ -455,8 +455,13 @@ static void confirm_event(GIOChannel *chan, gpointer user_data)
 	}
 
 	ns = find_server(na->servers, BNEP_SVC_NAP);
-	if (!ns || !ns->record_id || !ns->bridge)
-		goto drop;
+	if (!ns || !ns->record_id || !ns->bridge) {
+
+		ns = find_server(na->servers, BNEP_SVC_GN);
+		if (!ns || !ns->record_id || !ns->bridge)
+			goto drop;
+
+	}
 
 	na->setup = g_new0(struct network_session, 1);
 	bacpy(&na->setup->dst, &dst);
-- 
2.1.4


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

end of thread, other threads:[~2016-10-13 13:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-13 13:24 [PATCH 0/1] GN Master role fails to accept connections Maxime Chevallier
2016-10-13 13:24 ` [PATCH 1/1] profiles/network: look for GN servers to accept incoming connections Maxime Chevallier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).