Changeset 2484 for pjproject/trunk


Ignore:
Timestamp:
Mar 4, 2009 12:56:32 PM (16 years ago)
Author:
bennylp
Message:

Ticket #742: Change in mapped/STUN IP address does not update ICE srflx candidate (thanks Alexei Kuznetsov for the report)

Location:
pjproject/trunk/pjnath
Files:
3 edited

Legend:

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

    r2394 r2484  
    7474     */ 
    7575    PJ_STUN_SOCK_KEEP_ALIVE_OP, 
     76 
     77    /** 
     78     * IP address change notification from the keep-alive operation. 
     79     */ 
     80    PJ_STUN_SOCK_MAPPED_ADDR_CHANGE 
     81 
    7682 
    7783} pj_stun_sock_op; 
  • pjproject/trunk/pjnath/src/pjnath/ice_strans.c

    r2394 r2484  
    12661266        break; 
    12671267    case PJ_STUN_SOCK_BINDING_OP: 
     1268    case PJ_STUN_SOCK_MAPPED_ADDR_CHANGE: 
    12681269        if (status == PJ_SUCCESS) { 
    12691270            pj_stun_sock_info info; 
     
    12721273            if (status == PJ_SUCCESS) { 
    12731274                char ipaddr[PJ_INET6_ADDRSTRLEN+10]; 
     1275                const char *op_name = (op==PJ_STUN_SOCK_BINDING_OP) ? 
     1276                                    "Binding discovery complete" : 
     1277                                    "srflx address changed"; 
    12741278                pj_bool_t dup = PJ_FALSE; 
    12751279 
     
    13091313 
    13101314                PJ_LOG(4,(comp->ice_st->obj_name,  
    1311                           "Comp %d: Binding discovery complete, " 
     1315                          "Comp %d: %s, " 
    13121316                          "srflx address is %s", 
    1313                           comp->comp_id,  
     1317                          comp->comp_id, op_name,  
    13141318                          pj_sockaddr_print(&info.mapped_addr, ipaddr,  
    13151319                                             sizeof(ipaddr), 3))); 
  • pjproject/trunk/pjnath/src/pjnath/stun_sock.c

    r2394 r2484  
    670670        pj_sockaddr_cp(&stun_sock->mapped_addr, &mapped_attr->sockaddr); 
    671671 
    672         resched = (*stun_sock->cb.on_status)(stun_sock, op, PJ_SUCCESS); 
    673  
    674         goto on_return; 
    675     } 
     672        if (op==PJ_STUN_SOCK_KEEP_ALIVE_OP) 
     673            op = PJ_STUN_SOCK_MAPPED_ADDR_CHANGE; 
     674    } 
     675 
     676    /* Notify user */ 
     677    resched = (*stun_sock->cb.on_status)(stun_sock, op, PJ_SUCCESS); 
    676678 
    677679on_return: 
Note: See TracChangeset for help on using the changeset viewer.