Ignore:
Timestamp:
Oct 18, 2006 5:16:34 PM (18 years ago)
Author:
bennylp
Message:

Some changes to REFER handling in PJSUA-LIB:

  • added callback to report call transfer progress
  • changed the call transfer request callback name in pjsua
  • added "--norefersub" option in pjsua.
  • fixed bug when call transfer is done more than once in the same dialog (dialog usage can not be added)

Also removed 7xx status from the SIP status codes.

And added pjsip_parse_status_line() to parse sipfrag.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsip/sip_parser.c

    r735 r780  
    14721472} 
    14731473 
     1474 
     1475/* 
     1476 * Public API to parse SIP status line. 
     1477 */ 
     1478PJ_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 
    14741504/* Parse ending of header. */ 
    14751505static void parse_hdr_end( pj_scanner *scanner ) 
Note: See TracChangeset for help on using the changeset viewer.