Diff between c7641eea84bf8bd2879514031f7f40c992431273 and ee4f8a14fd1d50684f586e6c242374f223d2da47

Changed Files

File Additions Deletions Status
unit/test-avdtp.c +32 -0 modified

Full Patch

diff --git a/unit/test-avdtp.c b/unit/test-avdtp.c
index 0ff023b..d366550 100644
--- a/unit/test-avdtp.c
+++ b/unit/test-avdtp.c
@@ -342,12 +342,29 @@ static gboolean sep_close_ind(struct avdtp *session,
 	return TRUE;
 }
 
+static gboolean sep_suspend_ind(struct avdtp *session,
+						struct avdtp_local_sep *sep,
+						struct avdtp_stream *stream,
+						uint8_t *err,
+						void *user_data)
+{
+	struct context *context = user_data;
+
+	if (g_str_equal(context->data->test_name, "/TP/SIG/SMG/BI-27-C")) {
+		*err = 0xc0;
+		return FALSE;
+	}
+
+	return TRUE;
+}
+
 static struct avdtp_sep_ind sep_ind = {
 	.get_capability		= sep_getcap_ind,
 	.set_configuration	= sep_setconf_ind,
 	.open			= sep_open_ind,
 	.close			= sep_close_ind,
 	.start			= sep_start_ind,
+	.suspend		= sep_suspend_ind,
 };
 
 static void sep_setconf_cfm(struct avdtp *session, struct avdtp_local_sep *sep,
@@ -1010,6 +1027,21 @@ int main(int argc, char *argv[])
 			raw_pdu(0x32, 0x06),
 			raw_pdu(0x40, 0x09, 0x04),
 			raw_pdu(0x43, 0x09, 0x04, 0x31));
+	define_test("/TP/SIG/SMG/BI-27-C", test_server,
+			raw_pdu(0x00, 0x01),
+			raw_pdu(0x02, 0x01, 0x04, 0x00),
+			raw_pdu(0x10, 0x02, 0x04),
+			raw_pdu(0x12, 0x02, 0x01, 0x00, 0x07, 0x06, 0x00, 0x00,
+				0xff, 0xff, 0x02, 0x40),
+			raw_pdu(0x20, 0x03, 0x04, 0x04, 0x01, 0x00, 0x07, 0x06,
+				0x00, 0x00, 0x21, 0x02, 0x02, 0x20),
+			raw_pdu(0x22, 0x03),
+			raw_pdu(0x30, 0x06, 0x04),
+			raw_pdu(0x32, 0x06),
+			raw_pdu(0x40, 0x07, 0x04),
+			raw_pdu(0x42, 0x07),
+			raw_pdu(0x50, 0x09, 0x04),
+			raw_pdu(0x53, 0x09, 0x04, 0xc0));
 
 	return g_test_run();
 }