summaryrefslogtreecommitdiff
path: root/test/avtest.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2009-09-02 19:26:07 +0300
committerJohan Hedberg <johan.hedberg@nokia.com>2009-09-02 19:26:07 +0300
commit93b269a185455b4189248d7f6072d38783e0eff3 (patch)
tree8d3d789a3292981cba4c872ff83de82ed55159cf /test/avtest.c
parent9ec30f5ec34dc010560c028fabd7d919afecdcb1 (diff)
Add avtest support for responding to AVDTP_CLOSE
Diffstat (limited to 'test/avtest.c')
-rw-r--r--test/avtest.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/avtest.c b/test/avtest.c
index 90310b424..55fd27f1f 100644
--- a/test/avtest.c
+++ b/test/avtest.c
@@ -263,6 +263,19 @@ static void process_sigchan(int srv_sk, int sk, unsigned char reject)
}
break;
+ case AVDTP_CLOSE:
+ if (reject == AVDTP_CLOSE) {
+ hdr->message_type = AVDTP_MSG_TYPE_REJECT;
+ buf[2] = 0x31; /* Bad State */
+ printf("Rejecting close command\n");
+ len = write(sk, buf, 3);
+ } else {
+ hdr->message_type = AVDTP_MSG_TYPE_ACCEPT;
+ printf("Accepting close command\n");
+ len = write(sk, buf, 2);
+ }
+ break;
+
default:
buf[1] = 0x00;
printf("Unknown command\n");