Changeset 2928 for pjproject/trunk/pjnath/src/pjnath/stun_msg.c
- Timestamp:
- Oct 7, 2009 8:38:02 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjnath/src/pjnath/stun_msg.c
r2916 r2928 1236 1236 PUTVAL16H(buf, 0, ca->hdr.type); 1237 1237 1238 /* Set the length to be 4-bytes aligned so that we can 1239 * communicate with RFC 3489 endpoints 1238 /* Special treatment for SOFTWARE attribute: 1239 * This attribute had caused interop problem when talking to 1240 * legacy RFC 3489 STUN servers, due to different "length" 1241 * rules with RFC 5389. 1240 1242 */ 1241 PUTVAL16H(buf, 2, (pj_uint16_t)((ca->value.slen + 3) & (~3))); 1243 if (msghdr->magic != PJ_STUN_MAGIC || 1244 ca->hdr.type == PJ_STUN_ATTR_SOFTWARE) 1245 { 1246 /* Set the length to be 4-bytes aligned so that we can 1247 * communicate with RFC 3489 endpoints 1248 */ 1249 PUTVAL16H(buf, 2, (pj_uint16_t)((ca->value.slen + 3) & (~3))); 1250 } else { 1251 /* Use RFC 5389 rule */ 1252 PUTVAL16H(buf, 2, (pj_uint16_t)ca->value.slen); 1253 } 1242 1254 1243 1255 /* Copy the string */
Note: See TracChangeset
for help on using the changeset viewer.