MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / determine_fromto_user

Function determine_fromto_user

prime_hash.c:175–189  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

173}
174
175static 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
191static int first_token (str *source_string) {
192 size_t len;

Callers 1

determine_sourceFunction · 0.85

Calls 1

parse_uriFunction · 0.85

Tested by

no test coverage detected