Ignore:
Timestamp:
Nov 3, 2007 10:43:23 PM (16 years ago)
Author:
bennylp
Message:

Removed pjsua requirement to have consecutive RTCP mapped ports, and instead just print log message if mapped RTCP port is not adjacent to mapped RTP port

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c

    r1501 r1545  
    2323#define THIS_FILE               "pjsua_media.c" 
    2424 
    25 #define DEFAULT_RTP_PORT    4000 
     25#define DEFAULT_RTP_PORT                        4000 
     26 
     27#ifndef PJSUA_REQUIRE_CONSECUTIVE_RTCP_PORT 
     28#   define PJSUA_REQUIRE_CONSECUTIVE_RTCP_PORT  0 
     29#endif 
     30 
    2631 
    2732/* Next RTP port to be used */ 
     
    300305            } 
    301306 
     307#if PJSUA_REQUIRE_CONSECUTIVE_RTCP_PORT 
    302308            if (pj_ntohs(mapped_addr[1].sin_port) ==  
    303309                pj_ntohs(mapped_addr[0].sin_port)+1) 
     
    312318            pj_sock_close(sock[1]);  
    313319            sock[1] = PJ_INVALID_SOCKET; 
     320#else 
     321            if (pj_ntohs(mapped_addr[1].sin_port) !=  
     322                pj_ntohs(mapped_addr[0].sin_port)+1) 
     323            { 
     324                PJ_LOG(4,(THIS_FILE,  
     325                          "Note: STUN mapped RTCP port %d is not adjacent" 
     326                          " to RTP port %d", 
     327                          pj_ntohs(mapped_addr[1].sin_port), 
     328                          pj_ntohs(mapped_addr[0].sin_port))); 
     329            } 
     330            /* Success! */ 
     331            break; 
     332#endif 
    314333 
    315334        } else if (cfg->public_addr.slen) { 
Note: See TracChangeset for help on using the changeset viewer.