* [PATCH] profiles/network: Add remove connection if iface couldn't bring up
@ 2015-03-27 13:46 Grzegorz Kolodziejczyk
2015-04-02 10:56 ` Grzegorz Kolodziejczyk
0 siblings, 1 reply; 2+ messages in thread
From: Grzegorz Kolodziejczyk @ 2015-03-27 13:46 UTC (permalink / raw)
To: linux-bluetooth
Connection should be deleted if bnep interface couldn't bring up.
---
profiles/network/bnep.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/profiles/network/bnep.c b/profiles/network/bnep.c
index e325b72..ab72021 100644
--- a/profiles/network/bnep.c
+++ b/profiles/network/bnep.c
@@ -631,8 +631,10 @@ int bnep_server_add(int sk, char *bridge, char *iface, const bdaddr_t *addr,
}
err = bnep_if_up(iface);
- if (err < 0)
+ if (err < 0) {
+ bnep_conndel(addr);
rsp = BNEP_CONN_NOT_ALLOWED;
+ }
reply:
if (bnep_send_ctrl_rsp(sk, BNEP_SETUP_CONN_RSP, rsp) < 0) {
--
2.1.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] profiles/network: Add remove connection if iface couldn't bring up
2015-03-27 13:46 [PATCH] profiles/network: Add remove connection if iface couldn't bring up Grzegorz Kolodziejczyk
@ 2015-04-02 10:56 ` Grzegorz Kolodziejczyk
0 siblings, 0 replies; 2+ messages in thread
From: Grzegorz Kolodziejczyk @ 2015-04-02 10:56 UTC (permalink / raw)
To: linux-bluetooth
ping.
On 27 March 2015 at 14:46, Grzegorz Kolodziejczyk
<grzegorz.kolodziejczyk@tieto.com> wrote:
> Connection should be deleted if bnep interface couldn't bring up.
> ---
> profiles/network/bnep.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/profiles/network/bnep.c b/profiles/network/bnep.c
> index e325b72..ab72021 100644
> --- a/profiles/network/bnep.c
> +++ b/profiles/network/bnep.c
> @@ -631,8 +631,10 @@ int bnep_server_add(int sk, char *bridge, char *iface, const bdaddr_t *addr,
> }
>
> err = bnep_if_up(iface);
> - if (err < 0)
> + if (err < 0) {
> + bnep_conndel(addr);
> rsp = BNEP_CONN_NOT_ALLOWED;
> + }
>
> reply:
> if (bnep_send_ctrl_rsp(sk, BNEP_SETUP_CONN_RSP, rsp) < 0) {
> --
> 2.1.0
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-04-02 10:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-27 13:46 [PATCH] profiles/network: Add remove connection if iface couldn't bring up Grzegorz Kolodziejczyk
2015-04-02 10:56 ` Grzegorz Kolodziejczyk
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.