diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2009-09-02 19:30:02 +0300 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2009-09-02 19:30:02 +0300 |
commit | 8d839631b3492a27ba9a2c223cc37fc66d6a0c27 (patch) | |
tree | 9d87068d6818141847a06322cd84cb127b2e84d7 /test | |
parent | 93b269a185455b4189248d7f6072d38783e0eff3 (diff) |
Add avtest support for responding to AVDTP_SUSPEND
Diffstat (limited to 'test')
-rw-r--r-- | test/avtest.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/avtest.c b/test/avtest.c index 55fd27f1f..50c89952e 100644 --- a/test/avtest.c +++ b/test/avtest.c @@ -276,6 +276,19 @@ static void process_sigchan(int srv_sk, int sk, unsigned char reject) } break; + case AVDTP_SUSPEND: + if (reject == AVDTP_SUSPEND) { + hdr->message_type = AVDTP_MSG_TYPE_REJECT; + buf[3] = 0x31; /* Bad State */ + printf("Rejecting suspend command\n"); + len = write(sk, buf, 4); + } else { + hdr->message_type = AVDTP_MSG_TYPE_ACCEPT; + printf("Accepting suspend command\n"); + len = write(sk, buf, 2); + } + break; + default: buf[1] = 0x00; printf("Unknown command\n"); |