| 173 | } |
| 174 | |
| 175 | static int determine_fromto_user (struct to_body *fromto, str *source_string) { |
| 176 | struct sip_uri uri; |
| 177 | |
| 178 | if (fromto == NULL) { |
| 179 | LM_ERR("fromto is NULL!\n"); |
| 180 | return -1; |
| 181 | } |
| 182 | if (parse_uri (fromto->uri.s, fromto->uri.len, &uri) < 0) { |
| 183 | LM_ERR("Failed to parse From or To URI.\n"); |
| 184 | return -1; |
| 185 | } |
| 186 | source_string->s = uri.user.s; |
| 187 | source_string->len = uri.user.len; |
| 188 | return 0; |
| 189 | } |
| 190 | |
| 191 | static int first_token (str *source_string) { |
| 192 | size_t len; |
no test coverage detected