Changeset 780 for pjproject/trunk/pjsip/src/pjsip/sip_parser.c
- Timestamp:
- Oct 18, 2006 5:16:34 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsip/sip_parser.c
r735 r780 1472 1472 } 1473 1473 1474 1475 /* 1476 * Public API to parse SIP status line. 1477 */ 1478 PJ_DEF(pj_status_t) pjsip_parse_status_line( char *buf, pj_size_t size, 1479 pjsip_status_line *status_line) 1480 { 1481 pj_scanner scanner; 1482 PJ_USE_EXCEPTION; 1483 1484 pj_bzero(status_line, sizeof(*status_line)); 1485 pj_scan_init(&scanner, buf, size, 0, &on_syntax_error); 1486 1487 PJ_TRY { 1488 int_parse_status_line(&scanner, status_line); 1489 } 1490 PJ_CATCH_ANY { 1491 /* Tolerate the error if it is caused only by missing newline */ 1492 if (status_line->code == 0 && status_line->reason.slen == 0) { 1493 pj_scan_fini(&scanner); 1494 return PJSIP_EINVALIDMSG; 1495 } 1496 } 1497 PJ_END; 1498 1499 pj_scan_fini(&scanner); 1500 return PJ_SUCCESS; 1501 } 1502 1503 1474 1504 /* Parse ending of header. */ 1475 1505 static void parse_hdr_end( pj_scanner *scanner )
Note: See TracChangeset
for help on using the changeset viewer.