* Check username part in To header field */
| 147 | * Check username part in To header field |
| 148 | */ |
| 149 | int check_to(struct sip_msg* _m, str* _table) |
| 150 | { |
| 151 | if (!_m->to && ((parse_headers(_m, HDR_TO_F, 0) == -1) || (!_m->to))) { |
| 152 | LM_ERR("Error while parsing To header field\n"); |
| 153 | return ERR_INTERNAL; |
| 154 | } |
| 155 | if(parse_to_uri(_m)==NULL) { |
| 156 | LM_ERR("Error while parsing To header URI\n"); |
| 157 | return ERR_INTERNAL; |
| 158 | } |
| 159 | |
| 160 | return check_username(_m, _table, &get_to(_m)->parsed_uri); |
| 161 | } |
| 162 | |
| 163 | |
| 164 | /* |
nothing calls this directly
no test coverage detected