diff --git a/unit/test-avdtp.c b/unit/test-avdtp.c
index 5458d44..8a5f1f4 100644
--- a/unit/test-avdtp.c
+++ b/unit/test-avdtp.c
if (g_test_verbose())
util_hexdump('<', pdu->data, len, test_debug, "AVDTP: ");
- g_assert(len == (ssize_t) pdu->size);
+ g_assert_cmpint(len, ==, pdu->size);
if (g_str_equal(context->data->test_name, "/TP/SIG/SMG/BI-02-C"))
g_timeout_add_seconds(1, context_quit, context);
+ if (pdu->fragmented)
+ return send_pdu(user_data);
+
return FALSE;
}
g_assert(err == NULL);
g_assert_cmpint(g_slist_length(seps), !=, 0);
+ if (g_str_equal(context->data->test_name, "/TP/SIG/FRA/BV-02-C")) {
+ g_assert(err == NULL);
+ context_quit(context);
+ return;
+ }
+
rsep = avdtp_find_remote_sep(session, context->sep);
g_assert(rsep != NULL);
avdtp_unregister_sep(sep);
}
+static void test_client_frg(gconstpointer data)
+{
+ struct context *context = context_new(0x0100, 48, 48, data);
+ struct avdtp_local_sep *sep;
+
+ sep = avdtp_register_sep(AVDTP_SEP_TYPE_SINK, AVDTP_MEDIA_TYPE_AUDIO,
+ 0x00, TRUE, NULL, &sep_cfm,
+ context);
+ context->sep = sep;
+
+ avdtp_discover(context->session, discover_cb, context);
+
+ execute_context(context);
+
+ avdtp_unregister_sep(sep);
+}
+
int main(int argc, char *argv[])
{
g_test_init(&argc, &argv, NULL);
raw_pdu(0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00));
+ define_test("/TP/SIG/FRA/BV-02-C", test_client_frg,
+ raw_pdu(0xb0, 0x01),
+ raw_pdu(0xb2, 0x01, 0x04, 0x00),
+ raw_pdu(0xc0, 0x02, 0x04),
+ frg_pdu(0xc6, 0x03, 0x02, 0x01, 0x00, 0x07, 0x06, 0x00,
+ 0x00, 0xff, 0xff, 0x02, 0x40, 0x04, 0x60, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00),
+ frg_pdu(0xca, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00),
+ raw_pdu(0xce, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00));
return g_test_run();
}