| 224 | |
| 225 | |
| 226 | enum parse_sst_result |
| 227 | parse_min_se( struct sip_msg *msg, unsigned int *min_se ) |
| 228 | { |
| 229 | enum parse_sst_result result; |
| 230 | |
| 231 | if (msg->min_se==NULL && parse_headers(msg,HDR_MIN_SE_F,0)!=0 ) { |
| 232 | LM_ERR("failed to parse message when looking for MIN-SE \n"); |
| 233 | return parse_sst_header_not_found; |
| 234 | } |
| 235 | |
| 236 | if ( msg->min_se ) { |
| 237 | if ( msg->min_se->parsed == 0 |
| 238 | && (result = parse_min_se_body(msg->min_se)) |
| 239 | != parse_sst_success ) { |
| 240 | set_err_info(OSER_EC_PARSER, OSER_EL_MEDIUM, |
| 241 | "error parsing MINSE header"); |
| 242 | set_err_reply(400, "bad headers"); |
| 243 | return result; |
| 244 | } |
| 245 | if ( min_se ) { |
| 246 | *min_se = (unsigned int)(long)msg->min_se->parsed; |
| 247 | } |
| 248 | return parse_sst_success; |
| 249 | } |
| 250 | else { |
| 251 | return parse_sst_header_not_found; |
| 252 | } |
| 253 | } |
no test coverage detected