Changeset 2724 for pjproject/trunk/pjnath/src/pjnath/stun_session.c
- Timestamp:
- May 29, 2009 1:04:03 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjnath/src/pjnath/stun_session.c
r2589 r2724 220 220 /* If the agent is sending a request, it SHOULD add a SOFTWARE attribute 221 221 * to the request. The server SHOULD include a SOFTWARE attribute in all 222 * responses 222 * responses. 223 * 224 * If magic value is not PJ_STUN_MAGIC, only apply the attribute for 225 * responses. 223 226 */ 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) 227 if (sess->srv_name.slen && 228 pj_stun_msg_find_attr(msg, PJ_STUN_ATTR_SOFTWARE, 0)==NULL && 229 (PJ_STUN_IS_RESPONSE(msg->hdr.type) || 230 PJ_STUN_IS_REQUEST(msg->hdr.type) && msg->hdr.magic==PJ_STUN_MAGIC)) 226 231 { 227 232 pj_stun_msg_add_string_attr(pool, msg, PJ_STUN_ATTR_SOFTWARE, … … 629 634 PJ_ASSERT_ON_FAIL(sess, return); 630 635 sess->log_flag = flags; 636 } 637 638 PJ_DEF(pj_bool_t) pj_stun_session_use_fingerprint(pj_stun_session *sess, 639 pj_bool_t use) 640 { 641 pj_bool_t old_use; 642 643 PJ_ASSERT_RETURN(sess, PJ_FALSE); 644 645 old_use = sess->use_fingerprint; 646 sess->use_fingerprint = use; 647 return old_use; 631 648 } 632 649
Note: See TracChangeset
for help on using the changeset viewer.