Logo Search packages:      
Sourcecode: sofia-sip version File versions  Download package

unsigned msg_extract_errors ( msg_t const *  msg  ) 

Get error classification flags.

If the message parser fails to parse certain headers in the message, it sets the corresponding extract error flags. The flags corresponding to each header are stored in the message parser (msg_mclass_t) structure. They are set when the header is added to the parser table.

The SIP flags are defined in <sofia-sip/sip_headers.h>. For well-known SIP headers, the flags for each header are listed in a separate text file (sip_bad_mask) read by msg_parser.awk.

The flags can be used directly by NTA (the mask triggering 400 response is set with NTATAG_BAD_REQ_MASK(), the mask triggering response messages to be dropped is set with NTATAG_BAD_RESP_MASK()). Alternatively the application can check them based on the method or required SIP features.

See also:
msg_mclass_insert_with_mask(), NTATAG_BAD_REQ_MASK(), NTATAG_BAD_RESP_MASK().

Definition at line 379 of file msg.c.

  return msg ? msg->m_extract_err : (unsigned)-1;

Generated by  Doxygen 1.6.0   Back to index