Ignore:
Timestamp:
May 15, 2007 10:42:56 AM (17 years ago)
Author:
bennylp
Message:

Fixed several STUN bugs: USERNAME, REALM etc are not allowed in the response, retransmission timer calculation bug, etc.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjnath/src/pjnath/ice_session.c

    r1239 r1275  
    18701870    /* Reject any requests except Binding request */ 
    18711871    if (msg->hdr.type != PJ_STUN_BINDING_REQUEST) { 
    1872         status = pj_stun_session_create_response(sess, msg,  
    1873                                                 PJ_STUN_SC_BAD_REQUEST, 
    1874                                                 NULL, &tdata); 
     1872        status = pj_stun_session_create_res(sess, msg,  
     1873                                            PJ_STUN_SC_BAD_REQUEST, 
     1874                                            NULL, &tdata); 
    18751875        if (status != PJ_SUCCESS) 
    18761876            return status; 
     
    19281928        } else { 
    19291929            /* Generate 487 response */ 
    1930             status = pj_stun_session_create_response(sess, msg,  
    1931                                                      PJ_STUN_SC_ROLE_CONFLICT, 
    1932                                                      NULL, &tdata); 
     1930            status = pj_stun_session_create_res(sess, msg,  
     1931                                                PJ_STUN_SC_ROLE_CONFLICT, 
     1932                                                NULL, &tdata); 
    19331933            if (status == PJ_SUCCESS) { 
    19341934                pj_stun_session_send_msg(sess, PJ_TRUE,  
     
    19441944        if (pj_cmp_timestamp(&ice->tie_breaker, &role_attr->value) < 0) { 
    19451945            /* Generate 487 response */ 
    1946             status = pj_stun_session_create_response(sess, msg,  
    1947                                                      PJ_STUN_SC_ROLE_CONFLICT, 
    1948                                                      NULL, &tdata); 
     1946            status = pj_stun_session_create_res(sess, msg,  
     1947                                                PJ_STUN_SC_ROLE_CONFLICT, 
     1948                                                NULL, &tdata); 
    19491949            if (status == PJ_SUCCESS) { 
    19501950                pj_stun_session_send_msg(sess, PJ_TRUE,  
     
    19771977     * First send response to this request  
    19781978     */ 
    1979     status = pj_stun_session_create_response(sess, msg, 0, NULL, &tdata); 
     1979    status = pj_stun_session_create_res(sess, msg, 0, NULL, &tdata); 
    19801980    if (status != PJ_SUCCESS) { 
    19811981        pj_mutex_unlock(ice->mutex); 
Note: See TracChangeset for help on using the changeset viewer.