summaryrefslogtreecommitdiff
path: root/pjsip-apps
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2009-06-25 12:26:15 +0000
committerBenny Prijono <bennylp@teluu.com>2009-06-25 12:26:15 +0000
commit8aa394284dcd2ec0d32c917599df1481d3a22706 (patch)
treecc1470aeface24bbea2e7c2989b8c8d105d80713 /pjsip-apps
parentc3ec0081c7a6e5622e9748a48561d064f53e9831 (diff)
Ticket #759: Problem with TCP transport on Symbian
- backported changes in #758 git-svn-id: http://svn.pjsip.org/repos/pjproject/branches/1.0@2804 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip-apps')
-rw-r--r--pjsip-apps/src/symbian_ua/ua.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/pjsip-apps/src/symbian_ua/ua.cpp b/pjsip-apps/src/symbian_ua/ua.cpp
index 11adb154..d48fb15a 100644
--- a/pjsip-apps/src/symbian_ua/ua.cpp
+++ b/pjsip-apps/src/symbian_ua/ua.cpp
@@ -49,6 +49,10 @@
#define SIP_PROXY NULL
//#define SIP_PROXY "<sip:192.168.0.8;lr>"
+//
+// Set to 1 if TCP is desired (experimental)
+//
+#define ENABLE_SIP_TCP 0
//
// Configure nameserver if DNS SRV is to be used with both SIP
@@ -379,11 +383,23 @@ static pj_status_t app_startup()
tcfg.port = SIP_PORT;
status = pjsua_transport_create(PJSIP_TRANSPORT_UDP, &tcfg, &tid);
if (status != PJ_SUCCESS) {
- pjsua_perror(THIS_FILE, "Error creating transport", status);
+ pjsua_perror(THIS_FILE, "Error creating UDP transport", status);
pjsua_destroy();
return status;
}
+ /* Add TCP transport */
+#if ENABLE_SIP_TCP
+ pjsua_transport_config_default(&tcfg);
+ tcfg.port = SIP_PORT;
+ status = pjsua_transport_create(PJSIP_TRANSPORT_TCP, &tcfg, &tid);
+ if (status != PJ_SUCCESS) {
+ pjsua_perror(THIS_FILE, "Error creating TCP transport", status);
+ pjsua_destroy();
+ return status;
+ }
+#endif
+
/* Add account for the transport */
pjsua_acc_add_local(tid, PJ_TRUE, &g_acc_id);