Changeset 1908 for pjproject/trunk


Ignore:
Timestamp:
Apr 4, 2008 10:50:21 AM (17 years ago)
Author:
bennylp
Message:

Ticket #522: Enable keep-alive for UDP transport even when STUN is not configured

Location:
pjproject/trunk/pjsip
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h

    r1898 r1908  
    20462046     * after successful registration. 
    20472047     * 
    2048      * Even if this setting is enabled, keep-alive transmission is only done 
    2049      * when STUN is enabled in the global #pjsua_config, and the transport 
    2050      * used for registration is UDP. For TCP and TLS transports, keep-alive 
    2051      * is done by the transport themselves. 
    2052      * 
    20532048     * Default: 15 (seconds) 
    20542049     */ 
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_acc.c

    r1889 r1908  
    778778 
    779779        /* Only do keep-alive if: 
    780          *  - STUN is enabled in global config, and 
    781780         *  - ka_interval is not zero in the account, and 
    782781         *  - transport is UDP. 
     782         * 
     783         * Previously we only enabled keep-alive when STUN is enabled, since 
     784         * we thought that keep-alive is only needed in Internet situation. 
     785         * But it has been discovered that Windows Firewall on WinXP also 
     786         * needs to be kept-alive, otherwise incoming packets will be dropped. 
     787         * So because of this, now keep-alive is always enabled for UDP, 
     788         * regardless of whether STUN is enabled or not. 
     789         * 
     790         * Note that this applies only for UDP. For TCP/TLS, the keep-alive 
     791         * is done by the transport layer. 
    783792         */ 
    784         if (pjsua_var.stun_srv.ipv4.sin_family == 0 || 
     793        if (/*pjsua_var.stun_srv.ipv4.sin_family == 0 ||*/ 
    785794            acc->cfg.ka_interval == 0 || 
    786795            param->rdata->tp_info.transport->key.type != PJSIP_TRANSPORT_UDP) 
Note: See TracChangeset for help on using the changeset viewer.