From 661fc8232cf589159b819cfb63d3550c38f4398b Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Tue, 12 Aug 2008 17:03:17 +0000 Subject: [PATCH] Sat Jul 12 10:11:06 EDT 2008 Pekka Pessi * test_s2.[hc]: added s2_nua_thread git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9266 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- libs/sofia-sip/libsofia-sip-ua/nua/test_s2.c | 7 +++++-- libs/sofia-sip/libsofia-sip-ua/nua/test_s2.h | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/libs/sofia-sip/libsofia-sip-ua/nua/test_s2.c b/libs/sofia-sip/libsofia-sip-ua/nua/test_s2.c index 6f639a7f4b..734477d4b2 100644 --- a/libs/sofia-sip/libsofia-sip-ua/nua/test_s2.c +++ b/libs/sofia-sip/libsofia-sip-ua/nua/test_s2.c @@ -102,6 +102,8 @@ char const s2_auth3_digest_str[] = char const s2_auth3_credentials[] = "Digest:\"s2test3\":abc:abc"; +int s2_nua_thread = 0; + /* -- Delay scenarios --------------------------------------------------- */ static unsigned long time_offset; @@ -863,8 +865,6 @@ void s2_setup_base(char const *hostname) assert(s2->root != NULL); - su_root_threading(s2->root, 0); /* disable multithreading */ - s2->local = sip_from_format(s2->home, "Bob ", hostname ? hostname : "example.net"); @@ -1485,6 +1485,9 @@ nua_t *s2_nua_setup(tag_type_t tag, tag_value_t value, ...) s2_setup_tport(NULL, TPTAG_LOG(0), TAG_END()); assert(s2->contact); + /* enable/disable multithreading */ + su_root_threading(s2->root, s2_nua_thread); + s2_dns_domain("example.org", 1, "s2", 1, s2->udp.contact->m_url, "s2", 1, s2->tcp.contact->m_url, diff --git a/libs/sofia-sip/libsofia-sip-ua/nua/test_s2.h b/libs/sofia-sip/libsofia-sip-ua/nua/test_s2.h index 5104d800e6..cfb02c0362 100644 --- a/libs/sofia-sip/libsofia-sip-ua/nua/test_s2.h +++ b/libs/sofia-sip/libsofia-sip-ua/nua/test_s2.h @@ -115,6 +115,8 @@ extern char const s2_auth2_credentials[]; extern char const s2_auth3_digest_str[]; extern char const s2_auth3_credentials[]; +extern int s2_nua_thread; + void s2_fast_forward(unsigned long seconds); void s2_case(char const *tag,