| 176 | |
| 177 | |
| 178 | static inline int parse_dlg( struct sip_msg *msg ) |
| 179 | { |
| 180 | if (parse_headers(msg, HDR_FROM_F | HDR_CSEQ_F | HDR_TO_F, 0)==-1) { |
| 181 | LM_ERR("From or Cseq or To invalid\n"); |
| 182 | return 0; |
| 183 | } |
| 184 | if ((msg->from==0)||(msg->cseq==0)||(msg->to==0)) { |
| 185 | LM_ERR("missing From or Cseq or To\n"); |
| 186 | return 0; |
| 187 | } |
| 188 | |
| 189 | if (parse_from_header(msg)<0) { |
| 190 | LM_ERR("From broken\n"); |
| 191 | return 0; |
| 192 | } |
| 193 | /* To is automatically parsed through HDR_TO in parse bitmap, |
| 194 | * we don't need to worry about it now |
| 195 | if (parse_to_header(msg)==-1) { |
| 196 | LM_ERR("To broken\n"); |
| 197 | return 0; |
| 198 | } |
| 199 | */ |
| 200 | return 1; |
| 201 | } |
| 202 | |
| 203 | /* is the ACK (p_msg) in p_msg dialog-wise equal to the INVITE (t_msg) |
| 204 | * except to-tags? */ |
no test coverage detected