Ignore:
Timestamp:
Apr 13, 2009 8:54:10 AM (12 years ago)
Author:
bennylp
Message:

Ticket #780: Update TURN from draft 09 to draft 13:

  • new rules for permissions:
    • permission must be created and refreshed explicitly with CreatePermission?
    • transmitting data does not refresh permission
  • attributes changed/added: XOR-PEER-ADDRESS, XOR-RELAYED-ADDRESS, EVEN-PORT, DONT-FRAGMENT
  • attribute(s) removed: REQUESTED-PROPS
  • new status codes: 401 (Forbidden), 507 (Insufficient Capacity)
  • removed status codes: 443 (Invalid IP address), 444 (Invalid Port), 508 (Insufficient Port Capacity)
File:
1 edited

Legend:

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

    r2394 r2589  
    218218    pj_str_t realm, username, nonce, auth_key; 
    219219 
    220     /* The server SHOULD include a SOFTWARE attribute in all responses */ 
    221     if (sess->srv_name.slen && PJ_STUN_IS_RESPONSE(msg->hdr.type)) { 
     220    /* If the agent is sending a request, it SHOULD add a SOFTWARE attribute 
     221     * to the request. The server SHOULD include a SOFTWARE attribute in all  
     222     * responses  
     223     */ 
     224    if (sess->srv_name.slen && !PJ_STUN_IS_INDICATION(msg->hdr.type) && 
     225        pj_stun_msg_find_attr(msg, PJ_STUN_ATTR_SOFTWARE, 0)==NULL)  
     226    { 
    222227        pj_stun_msg_add_string_attr(pool, msg, PJ_STUN_ATTR_SOFTWARE, 
    223228                                    &sess->srv_name); 
     
    487492    sess->srv_name.ptr = (char*) pj_pool_alloc(pool, 32); 
    488493    sess->srv_name.slen = pj_ansi_snprintf(sess->srv_name.ptr, 32, 
    489                                            "pj_stun-%s", pj_get_version()); 
     494                                           "pjnath-%s", pj_get_version()); 
    490495 
    491496    sess->rx_pool = pj_pool_create(sess->cfg->pf, name,  
     
    591596} 
    592597 
    593 PJ_DEF(pj_status_t) pj_stun_session_set_server_name(pj_stun_session *sess, 
    594                                                     const pj_str_t *srv_name) 
     598PJ_DEF(pj_status_t) pj_stun_session_set_software_name(pj_stun_session *sess, 
     599                                                      const pj_str_t *sw) 
    595600{ 
    596601    PJ_ASSERT_RETURN(sess, PJ_EINVAL); 
    597     if (srv_name) 
    598         pj_strdup(sess->pool, &sess->srv_name, srv_name); 
     602    if (sw && sw->slen) 
     603        pj_strdup(sess->pool, &sess->srv_name, sw); 
    599604    else 
    600605        sess->srv_name.slen = 0; 
Note: See TracChangeset for help on using the changeset viewer.