linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] profiles/network: Check for any server when accepting connections
@ 2016-10-25 14:25 Maxime Chevallier
  2016-10-25 14:37 ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 2+ messages in thread
From: Maxime Chevallier @ 2016-10-25 14:25 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: luiz.dentz, Maxime Chevallier

When asking confirmation to accept an incoming connection,
we now only check for any network_server to be registered to
the adapter.

This fixes GN Master role, that wouldn't accept any connection
before.
---
 profiles/network/server.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

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


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

* Re: [PATCH v2] profiles/network: Check for any server when accepting connections
  2016-10-25 14:25 [PATCH v2] profiles/network: Check for any server when accepting connections Maxime Chevallier
@ 2016-10-25 14:37 ` Luiz Augusto von Dentz
  0 siblings, 0 replies; 2+ messages in thread
From: Luiz Augusto von Dentz @ 2016-10-25 14:37 UTC (permalink / raw)
  To: Maxime Chevallier; +Cc: linux-bluetooth@vger.kernel.org

Hi Maxime,

On Tue, Oct 25, 2016 at 5:25 PM, Maxime Chevallier
<maxime.chevallier@smile.fr> wrote:
> When asking confirmation to accept an incoming connection,
> we now only check for any network_server to be registered to
> the adapter.
>
> This fixes GN Master role, that wouldn't accept any connection
> before.
> ---
>  profiles/network/server.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/profiles/network/server.c b/profiles/network/server.c
> index 1bff9f8..aa7f773 100644
> --- a/profiles/network/server.c
> +++ b/profiles/network/server.c
> @@ -454,8 +454,7 @@ static void confirm_event(GIOChannel *chan, gpointer user_data)
>                 goto drop;
>         }
>
> -       ns = find_server(na->servers, BNEP_SVC_NAP);
> -       if (!ns || !ns->record_id || !ns->bridge)
> +       if (!na->servers)
>                 goto drop;
>
>         na->setup = g_new0(struct network_session, 1);
> --
> 2.1.4

Applied, thanks. Note that I did remove ns variable since it is no longer used.


-- 
Luiz Augusto von Dentz

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

end of thread, other threads:[~2016-10-25 14:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-25 14:25 [PATCH v2] profiles/network: Check for any server when accepting connections Maxime Chevallier
2016-10-25 14:37 ` Luiz Augusto von Dentz

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).