Ignore:
Timestamp:
Dec 29, 2009 3:33:13 PM (15 years ago)
Author:
bennylp
Message:

Misc PocketPJ fixes (#1006):

  • always intantiate TCP to support TCP auto-switching
  • bug fix in retrieving DNS server field from GetNetworkParams?() return value
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip-apps/src/pocketpj/PocketPJDlg.cpp

    r2678 r3036  
    132132    { 
    133133        FIXED_INFO fi; 
     134        PIP_ADDR_STRING pDNS = NULL; 
    134135        ULONG len = sizeof(fi); 
    135136        CString err; 
     
    138139        if (GetNetworkParams(&fi, &len) != ERROR_SUCCESS) { 
    139140            err = _T("Info: Error querying network parameters. You must configure DNS server."); 
    140         } else if (fi.CurrentDnsServer == NULL) { 
     141        } else if (fi.CurrentDnsServer) { 
     142            pDNS = fi.CurrentDnsServer; 
     143        } else if (fi.DnsServerList.IpAddress.String[0] != 0) { 
     144            pDNS = &fi.DnsServerList; 
     145        } else { 
    141146            err = _T("Info: DNS server not configured. You must configure DNS server."); 
    142147        }  
     
    155160            } 
    156161        } else { 
    157             strcpy(nameserver, fi.CurrentDnsServer->IpAddress.String); 
     162            strcpy(nameserver, pDNS->IpAddress.String); 
    158163            cfg.nameserver_count = 1; 
    159164            cfg.nameserver[0] = pj_str(nameserver); 
     
    169174 
    170175    pjsua_logging_config_default(&log_cfg); 
     176    log_cfg.msg_logging = PJ_TRUE; 
    171177    log_cfg.log_filename = pj_str("\\PocketPJ.TXT"); 
    172178 
     
    214220    } 
    215221 
    216     if (m_Cfg.m_TCP) { 
     222    // Always instantiate TCP to support auto-switching to TCP when 
     223    // packet is larger than 1300 bytes. If TCP is disabled when 
     224    // no auto-switching will occur 
     225    if (1) { 
    217226        // Create one TCP transport 
    218227        PopUp_Modify(POPUP_REGISTRATION, POPUP_EL_TITLE3, "Adding TCP transport.."); 
Note: See TracChangeset for help on using the changeset viewer.