Ignore:
Timestamp:
Jun 22, 2009 2:06:40 PM (15 years ago)
Author:
nanang
Message:

Ticket #758:

  • fixed transport TCP to call on_connect_complete when connect() returns PJ_SUCCESS.
  • added option to enable transport TCP in symbian_ua.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip-apps/src/symbian_ua/ua.cpp

    r2506 r2781  
    5252//#define SIP_PROXY     "<sip:192.168.0.8;lr>" 
    5353 
     54// 
     55// Set to 1 if TCP is desired (experimental) 
     56// 
     57#define ENABLE_SIP_TCP  0 
    5458 
    5559// 
     
    379383    status = pjsua_transport_create(PJSIP_TRANSPORT_UDP, &tcfg, &tid); 
    380384    if (status != PJ_SUCCESS) { 
    381             pjsua_perror(THIS_FILE, "Error creating transport", status); 
     385            pjsua_perror(THIS_FILE, "Error creating UDP transport", status); 
    382386            pjsua_destroy(); 
    383387            return status; 
    384388    } 
    385389 
     390    /* Add TCP transport */ 
     391#if ENABLE_SIP_TCP 
     392    pjsua_transport_config_default(&tcfg); 
     393    tcfg.port = SIP_PORT; 
     394    status = pjsua_transport_create(PJSIP_TRANSPORT_TCP, &tcfg, &tid); 
     395    if (status != PJ_SUCCESS) { 
     396            pjsua_perror(THIS_FILE, "Error creating TCP transport", status); 
     397            pjsua_destroy(); 
     398            return status; 
     399    } 
     400#endif 
     401     
    386402    /* Add account for the transport */ 
    387403    pjsua_acc_add_local(tid, PJ_TRUE, &g_acc_id); 
Note: See TracChangeset for help on using the changeset viewer.