summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2009-09-02 19:31:08 +0300
committerJohan Hedberg <johan.hedberg@nokia.com>2009-09-02 19:31:08 +0300
commitdd65e5a614dbbe14e141d6ef6632317aecdb4bcb (patch)
tree8766ff1e7ef7ea7a55ebc18118574f6be27e7884 /test
parent8d839631b3492a27ba9a2c223cc37fc66d6a0c27 (diff)
Fix closing media transport after receiving CLOSE
Diffstat (limited to 'test')
-rw-r--r--test/avtest.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/avtest.c b/test/avtest.c
index 50c89952e..76fb55723 100644
--- a/test/avtest.c
+++ b/test/avtest.c
@@ -273,6 +273,10 @@ static void process_sigchan(int srv_sk, int sk, unsigned char reject)
hdr->message_type = AVDTP_MSG_TYPE_ACCEPT;
printf("Accepting close command\n");
len = write(sk, buf, 2);
+ if (media_sock >= 0) {
+ close(media_sock);
+ media_sock = -1;
+ }
}
break;