From: Andrei Emeltchenko <[email protected]>
---
unit/test-avrcp.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/unit/test-avrcp.c b/unit/test-avrcp.c
index 381e7cb..e9fe7e3 100644
--- a/unit/test-avrcp.c
+++ b/unit/test-avrcp.c
@@ -246,15 +246,7 @@ static void execute_context(struct context *context)
{
g_main_loop_run(context->main_loop);
- if (context->source > 0)
- g_source_remove(context->source);
-
- avrcp_shutdown(context->session);
-
- g_main_loop_unref(context->main_loop);
-
- test_free(context->data);
- g_free(context);
+ destroy_context(context);
}
static void test_server(gconstpointer data)
--
1.8.3.2
Hi Andrei,
On Mon, Feb 24, 2014 at 3:25 PM, Andrei Emeltchenko
<[email protected]> wrote:
> From: Andrei Emeltchenko <[email protected]>
>
> ---
> unit/test-avrcp.c | 10 +---------
> 1 file changed, 1 insertion(+), 9 deletions(-)
>
> diff --git a/unit/test-avrcp.c b/unit/test-avrcp.c
> index 381e7cb..e9fe7e3 100644
> --- a/unit/test-avrcp.c
> +++ b/unit/test-avrcp.c
> @@ -246,15 +246,7 @@ static void execute_context(struct context *context)
> {
> g_main_loop_run(context->main_loop);
>
> - if (context->source > 0)
> - g_source_remove(context->source);
> -
> - avrcp_shutdown(context->session);
> -
> - g_main_loop_unref(context->main_loop);
> -
> - test_free(context->data);
> - g_free(context);
> + destroy_context(context);
> }
>
> static void test_server(gconstpointer data)
> --
> 1.8.3.2
Pushed with some changes to patch 2/3 to actually add a callback to
handle AVC_PLAY.
--
Luiz Augusto von Dentz
From: Andrei Emeltchenko <[email protected]>
Test verifies that the Target reacts to the PASS THROUGH command in
category 1 from the Controller. The command chosen is PLAY (0x44).
---
unit/test-avrcp.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/unit/test-avrcp.c b/unit/test-avrcp.c
index e9fe7e3..9d2e56a 100644
--- a/unit/test-avrcp.c
+++ b/unit/test-avrcp.c
@@ -291,5 +291,11 @@ int main(int argc, char *argv[])
raw_pdu(0x02, 0x11, 0x0e, 0x0c, 0xf8, 0x31,
0x07, 0x48, 0xff, 0xff, 0xff));
+ define_test("/TP/PTT/BV-01-I", test_server,
+ raw_pdu(0x00, 0x11, 0x0e, 0x00, 0x48, 0x7c,
+ 0x44, 0x00),
+ raw_pdu(0x02, 0x11, 0x0e, 0x09, 0x48, 0x7c,
+ 0x44, 0x00));
+
return g_test_run();
}
--
1.8.3.2
From: Andrei Emeltchenko <[email protected]>
When AVCTP session was created uinput was zero which is valid file
descriptor and that was conflicting with socketpair() fds.
---
android/avctp.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/android/avctp.c b/android/avctp.c
index 1e414d1..9bfb191 100644
--- a/android/avctp.c
+++ b/android/avctp.c
@@ -1414,6 +1414,7 @@ struct avctp *avctp_new(int fd, size_t imtu, size_t omtu, uint16_t version)
return NULL;
}
+ session->uinput = -1;
session->control = control;
session->passthrough_id = avctp_register_pdu_handler(session,
AVC_OP_PASSTHROUGH,
--
1.8.3.2