2013-12-17 14:17:33

by Andrei Emeltchenko

[permalink] [raw]
Subject: [PATCH] android/tester: Fix not returning in failure

From: Andrei Emeltchenko <[email protected]>

---
android/android-tester.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/android/android-tester.c b/android/android-tester.c
index 2a8c8d0..c193921 100644
--- a/android/android-tester.c
+++ b/android/android-tester.c
@@ -851,8 +851,10 @@ static void setup_socket_interface(const void *test_data)
setup(data);

sock = data->if_bluetooth->get_profile_interface(BT_PROFILE_SOCKETS_ID);
- if (!sock)
+ if (!sock) {
tester_setup_failed();
+ return;
+ }

data->if_sock = sock;

--
1.8.3.2



2013-12-18 08:42:07

by Johan Hedberg

[permalink] [raw]
Subject: Re: [PATCH] android/tester: Fix not returning in failure

Hi Andrei,

On Tue, Dec 17, 2013, Andrei Emeltchenko wrote:
> ---
> android/android-tester.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/android/android-tester.c b/android/android-tester.c
> index 2a8c8d0..c193921 100644
> --- a/android/android-tester.c
> +++ b/android/android-tester.c
> @@ -851,8 +851,10 @@ static void setup_socket_interface(const void *test_data)
> setup(data);
>
> sock = data->if_bluetooth->get_profile_interface(BT_PROFILE_SOCKETS_ID);
> - if (!sock)
> + if (!sock) {
> tester_setup_failed();
> + return;
> + }
>
> data->if_sock = sock;

Applied. Thanks.

Johan