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

Function strip_realm

modules/auth/api.c:44–58  ·  view source on GitHub ↗

* if realm determined from request, look if there are some * modification rules */

Source from the content-addressed store, hash-verified

42 * modification rules
43 */
44void strip_realm(str* _realm)
45{
46 /* no param defined -- return */
47 if (!realm_prefix.len) return;
48
49 /* prefix longer than realm -- return */
50 if (realm_prefix.len > _realm->len) return;
51
52 /* match ? -- if so, shorten realm -*/
53 if (memcmp(realm_prefix.s, _realm->s, realm_prefix.len) == 0) {
54 _realm->s += realm_prefix.len;
55 _realm->len -= realm_prefix.len;
56 }
57 return;
58}
59
60
61/*

Callers 2

pre_authFunction · 0.85
challengeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected