Changeset 5282


Ignore:
Timestamp:
May 9, 2016 3:29:28 AM (4 years ago)
Author:
ming
Message:

Fixed #1913: Add callback for address change notification from STUN keep alive

Location:
pjproject/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjnath/include/pjnath/ice_strans.h

    r4606 r5282  
    126126    PJ_ICE_STRANS_OP_NEGOTIATION, 
    127127 
    128     /** This operatino is used to report failure in keep-alive operation. 
     128    /** This operation is used to report failure in keep-alive operation. 
    129129     *  Currently it is only used to report TURN Refresh failure. 
    130130     */ 
    131     PJ_ICE_STRANS_OP_KEEP_ALIVE 
     131    PJ_ICE_STRANS_OP_KEEP_ALIVE, 
     132 
     133    /** IP address change notification from STUN keep-alive operation. 
     134     */ 
     135    PJ_ICE_STRANS_OP_ADDR_CHANGE 
    132136 
    133137} pj_ice_strans_op; 
  • pjproject/trunk/pjnath/src/pjnath/ice_strans.c

    r5215 r5282  
    16411641 
    16421642                sess_init_update(ice_st); 
     1643                 
     1644                if (op == PJ_STUN_SOCK_MAPPED_ADDR_CHANGE && 
     1645                    ice_st->cb.on_ice_complete) 
     1646                { 
     1647                    (*ice_st->cb.on_ice_complete)(ice_st,  
     1648                                                  PJ_ICE_STRANS_OP_ADDR_CHANGE, 
     1649                                                  status); 
     1650                } 
    16431651            } 
    16441652        } 
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c

    r5217 r5282  
    680680        break; 
    681681    case PJ_ICE_STRANS_OP_KEEP_ALIVE: 
     682    case PJ_ICE_STRANS_OP_ADDR_CHANGE: 
    682683        if (result != PJ_SUCCESS) { 
    683684            PJ_PERROR(4,(THIS_FILE, result, 
     
    696697                call->index, &info); 
    697698        } 
    698         if (pjsua_var.ua_cfg.cb.on_ice_transport_error) { 
     699        if (pjsua_var.ua_cfg.cb.on_ice_transport_error && 
     700            op == PJ_ICE_STRANS_OP_KEEP_ALIVE) 
     701        { 
    699702            pjsua_call_id id = call->index; 
    700703            (*pjsua_var.ua_cfg.cb.on_ice_transport_error)(id, op, result, 
Note: See TracChangeset for help on using the changeset viewer.