Changeset 2589 for pjproject/trunk/pjnath/src/pjnath/stun_session.c
- Timestamp:
- Apr 13, 2009 8:54:10 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjnath/src/pjnath/stun_session.c
r2394 r2589 218 218 pj_str_t realm, username, nonce, auth_key; 219 219 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 { 222 227 pj_stun_msg_add_string_attr(pool, msg, PJ_STUN_ATTR_SOFTWARE, 223 228 &sess->srv_name); … … 487 492 sess->srv_name.ptr = (char*) pj_pool_alloc(pool, 32); 488 493 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()); 490 495 491 496 sess->rx_pool = pj_pool_create(sess->cfg->pf, name, … … 591 596 } 592 597 593 PJ_DEF(pj_status_t) pj_stun_session_set_s erver_name(pj_stun_session *sess,594 const pj_str_t *srv_name)598 PJ_DEF(pj_status_t) pj_stun_session_set_software_name(pj_stun_session *sess, 599 const pj_str_t *sw) 595 600 { 596 601 PJ_ASSERT_RETURN(sess, PJ_EINVAL); 597 if (s rv_name)598 pj_strdup(sess->pool, &sess->srv_name, s rv_name);602 if (sw && sw->slen) 603 pj_strdup(sess->pool, &sess->srv_name, sw); 599 604 else 600 605 sess->srv_name.slen = 0;
Note: See TracChangeset
for help on using the changeset viewer.