- Timestamp:
- Feb 22, 2007 2:09:23 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib-util/src/pjlib-util/stun_transaction.c
r992 r993 253 253 254 254 255 255 256 /* 256 257 * Notify the STUN transaction about the arrival of STUN response. 257 258 */ 258 259 PJ_DEF(pj_status_t) pj_stun_client_tsx_on_rx_msg(pj_stun_client_tsx *tsx, 259 const void *packet, 260 pj_size_t pkt_size, 261 unsigned *parsed_len) 262 { 263 pj_stun_msg *msg; 260 const pj_stun_msg *msg) 261 { 264 262 pj_stun_error_code_attr *err_attr; 265 263 pj_status_t status; 266 267 PJ_ASSERT_RETURN(tsx && packet && pkt_size, PJ_EINVAL);268 269 /* Try to parse the message */270 status = pj_stun_msg_decode(tsx->pool, (const pj_uint8_t*)packet,271 pkt_size, 0, &msg, parsed_len,272 NULL, NULL, NULL);273 if (status != PJ_SUCCESS) {274 stun_perror(tsx, "STUN msg_decode() error", status);275 return status;276 }277 264 278 265 /* Must be STUN response message */ … … 330 317 331 318 return PJ_SUCCESS; 332 } 333 319 320 } 321 322 323 /* 324 * Notify the STUN transaction about the arrival of STUN response. 325 */ 326 PJ_DEF(pj_status_t) pj_stun_client_tsx_on_rx_pkt(pj_stun_client_tsx *tsx, 327 const void *packet, 328 pj_size_t pkt_size, 329 unsigned *parsed_len) 330 { 331 pj_stun_msg *msg; 332 pj_status_t status; 333 334 PJ_ASSERT_RETURN(tsx && packet && pkt_size, PJ_EINVAL); 335 336 /* Try to parse the message */ 337 status = pj_stun_msg_decode(tsx->pool, (const pj_uint8_t*)packet, 338 pkt_size, 0, &msg, parsed_len, 339 NULL, NULL, NULL); 340 if (status != PJ_SUCCESS) { 341 stun_perror(tsx, "STUN msg_decode() error", status); 342 return status; 343 } 344 345 return pj_stun_client_tsx_on_rx_msg(tsx, msg); 346 } 347
Note: See TracChangeset
for help on using the changeset viewer.