From: Andrei Emeltchenko <[email protected]>
---
unit/test-avctp.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/unit/test-avctp.c b/unit/test-avctp.c
index 581f88c..9d94ae0 100644
--- a/unit/test-avctp.c
+++ b/unit/test-avctp.c
@@ -277,8 +277,8 @@ static void test_client(gconstpointer data)
{
struct context *context = create_context(0x0100, data);
- avctp_send_vendordep_req(context->session, 0, 0, NULL, 0,
- handler_response, context);
+ avctp_send_vendordep_req(context->session, AVC_CTYPE_CONTROL, 0, NULL,
+ 0, handler_response, context);
execute_context(context);
}
@@ -290,8 +290,8 @@ static void test_server(gconstpointer data)
if (g_str_equal(context->data->test_name, "/TP/NFR/BV-03-C")) {
int ret;
- ret = avctp_register_pdu_handler(context->session, 0x00,
- handler, NULL);
+ ret = avctp_register_pdu_handler(context->session,
+ AVC_OP_VENDORDEP, handler, NULL);
DBG("ret %d", ret);
g_assert_cmpint(ret, !=, 0);
}
--
1.8.3.2
Hi Andrei,
On Tue, Feb 11, 2014 at 1:12 PM, Andrei Emeltchenko
<[email protected]> wrote:
> ping
>
> On Wed, Feb 05, 2014 at 05:28:21PM +0200, Andrei Emeltchenko wrote:
>> From: Andrei Emeltchenko <[email protected]>
>>
>> ---
>> unit/test-avctp.c | 8 ++++----
>> 1 file changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/unit/test-avctp.c b/unit/test-avctp.c
>> index 581f88c..9d94ae0 100644
>> --- a/unit/test-avctp.c
>> +++ b/unit/test-avctp.c
>> @@ -277,8 +277,8 @@ static void test_client(gconstpointer data)
>> {
>> struct context *context = create_context(0x0100, data);
>>
>> - avctp_send_vendordep_req(context->session, 0, 0, NULL, 0,
>> - handler_response, context);
>> + avctp_send_vendordep_req(context->session, AVC_CTYPE_CONTROL, 0, NULL,
>> + 0, handler_response, context);
>>
>> execute_context(context);
>> }
>> @@ -290,8 +290,8 @@ static void test_server(gconstpointer data)
>> if (g_str_equal(context->data->test_name, "/TP/NFR/BV-03-C")) {
>> int ret;
>>
>> - ret = avctp_register_pdu_handler(context->session, 0x00,
>> - handler, NULL);
>> + ret = avctp_register_pdu_handler(context->session,
>> + AVC_OP_VENDORDEP, handler, NULL);
>> DBG("ret %d", ret);
>> g_assert_cmpint(ret, !=, 0);
>> }
>> --
>> 1.8.3.2
Applied, thanks.
--
Luiz Augusto von Dentz
ping
On Wed, Feb 05, 2014 at 05:28:21PM +0200, Andrei Emeltchenko wrote:
> From: Andrei Emeltchenko <[email protected]>
>
> ---
> unit/test-avctp.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/unit/test-avctp.c b/unit/test-avctp.c
> index 581f88c..9d94ae0 100644
> --- a/unit/test-avctp.c
> +++ b/unit/test-avctp.c
> @@ -277,8 +277,8 @@ static void test_client(gconstpointer data)
> {
> struct context *context = create_context(0x0100, data);
>
> - avctp_send_vendordep_req(context->session, 0, 0, NULL, 0,
> - handler_response, context);
> + avctp_send_vendordep_req(context->session, AVC_CTYPE_CONTROL, 0, NULL,
> + 0, handler_response, context);
>
> execute_context(context);
> }
> @@ -290,8 +290,8 @@ static void test_server(gconstpointer data)
> if (g_str_equal(context->data->test_name, "/TP/NFR/BV-03-C")) {
> int ret;
>
> - ret = avctp_register_pdu_handler(context->session, 0x00,
> - handler, NULL);
> + ret = avctp_register_pdu_handler(context->session,
> + AVC_OP_VENDORDEP, handler, NULL);
> DBG("ret %d", ret);
> g_assert_cmpint(ret, !=, 0);
> }
> --
> 1.8.3.2
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Andrei Emeltchenko <[email protected]>
---
unit/test-avctp.c | 15 +--------------
1 file changed, 1 insertion(+), 14 deletions(-)
diff --git a/unit/test-avctp.c b/unit/test-avctp.c
index 9d94ae0..be1dfd7 100644
--- a/unit/test-avctp.c
+++ b/unit/test-avctp.c
@@ -42,7 +42,6 @@
struct test_pdu {
bool valid;
- bool fragmented;
const uint8_t *data;
size_t size;
};
@@ -71,14 +70,6 @@ struct context {
.size = sizeof(data(args)), \
}
-#define frg_pdu(args...) \
- { \
- .valid = true, \
- .fragmented = true, \
- .data = data(args), \
- .size = sizeof(data(args)), \
- }
-
#define define_test(name, function, args...) \
do { \
const struct test_pdu pdus[] = { \
@@ -133,9 +124,6 @@ static gboolean send_pdu(gpointer user_data)
g_assert_cmpint(len, ==, pdu->size);
- if (pdu->fragmented)
- return send_pdu(user_data);
-
context->process = 0;
return FALSE;
}
@@ -180,8 +168,7 @@ static gboolean test_handler(GIOChannel *channel, GIOCondition cond,
g_assert(memcmp(buf, pdu->data, pdu->size) == 0);
- if (!pdu->fragmented)
- context_process(context);
+ context_process(context);
return TRUE;
}
--
1.8.3.2