Ignore:
Timestamp:
Feb 19, 2014 4:11:43 AM (9 years ago)
Author:
bennylp
Message:

Fixed #1738: Infinite loop when re-INVITE is received while adding new media

File:
1 edited

Legend:

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

    r4749 r4750  
    13031303 
    13041304    return status; 
     1305} 
     1306 
     1307/* Determine if call's media is being changed, for example when video is being 
     1308 * added. Then we can reject incoming re-INVITE, for example. This is the 
     1309 * solution for https://trac.pjsip.org/repos/ticket/1738 
     1310 */ 
     1311pj_bool_t  pjsua_call_media_is_changing(pjsua_call *call) 
     1312{ 
     1313    /* The problem in #1738 occurs because we do handle_events() loop while 
     1314     * adding media, which could cause incoming re-INVITE to be processed and 
     1315     * cause havoc. Since the handle_events() loop only happens while adding 
     1316     * media, it is sufficient to only check if "prov > cnt" for now. 
     1317     */ 
     1318    return call->med_prov_cnt > call->med_cnt; 
    13051319} 
    13061320 
Note: See TracChangeset for help on using the changeset viewer.