diff options
author | Nanang Izzuddin <nanang@teluu.com> | 2009-06-22 14:06:40 +0000 |
---|---|---|
committer | Nanang Izzuddin <nanang@teluu.com> | 2009-06-22 14:06:40 +0000 |
commit | 5949095a757f1ee521cd158d917b51f5d758e94e (patch) | |
tree | 41f93b034c4dc60d4dc9331ded932a268cd3ebd9 /pjsip-apps/src | |
parent | a274aa80702d4523cc5d60fbcaa85b9b96439e68 (diff) |
Ticket #758:
- fixed transport TCP to call on_connect_complete when connect() returns PJ_SUCCESS.
- added option to enable transport TCP in symbian_ua.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2781 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip-apps/src')
-rw-r--r-- | pjsip-apps/src/symbian_ua/ua.cpp | 18 |
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 033a2f2a..2b36b709 100644 --- a/pjsip-apps/src/symbian_ua/ua.cpp +++ b/pjsip-apps/src/symbian_ua/ua.cpp @@ -51,6 +51,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 @@ -378,11 +382,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); |