summaryrefslogtreecommitdiff
path: root/test/call.c
diff options
context:
space:
mode:
authorAlfred E. Heggestad <aeh@db.org>2015-10-29 20:12:41 +0100
committerAlfred E. Heggestad <aeh@db.org>2015-10-29 20:12:41 +0100
commit136f8543e65e29fea1538fa7cd9a4dbdd533a6eb (patch)
treece8156399160eb04da2fac020d2ae2ae23afaacc /test/call.c
parentf828b6600d2c21c5b4948e945e0c68523e136039 (diff)
call: check address-family of incoming SDP offer
this fixes #79
Diffstat (limited to 'test/call.c')
-rw-r--r--test/call.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/test/call.c b/test/call.c
index cad90a6..7c96100 100644
--- a/test/call.c
+++ b/test/call.c
@@ -234,3 +234,38 @@ int test_call_reject(void)
return err;
}
+
+
+int test_call_af_mismatch(void)
+{
+ struct fixture fix, *f = &fix;
+ int err = 0;
+
+ fixture_init(f);
+
+ ua_set_media_af(f->a.ua, AF_INET6);
+ ua_set_media_af(f->b.ua, AF_INET);
+
+ /* Make a call from A to B */
+ err = ua_connect(f->a.ua, 0, NULL, f->buri, NULL, VIDMODE_OFF);
+ TEST_ERR(err);
+
+ /* run main-loop with timeout, wait for events */
+ err = re_main_timeout(5);
+ TEST_ERR(err);
+ TEST_ERR(fix.err);
+
+ ASSERT_EQ(0, fix.a.n_incoming);
+ ASSERT_EQ(0, fix.a.n_established);
+ ASSERT_EQ(1, fix.a.n_closed);
+ ASSERT_EQ(488, fix.a.close_scode);
+
+ ASSERT_EQ(0, fix.b.n_incoming);
+ ASSERT_EQ(0, fix.b.n_established);
+ ASSERT_EQ(1, fix.b.n_closed);
+
+ out:
+ fixture_close(f);
+
+ return err;
+}