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

Function cred_realm

pvar.c:1910–1926  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1908
1909
1910static inline str *cred_realm(struct sip_msg *rq)
1911{
1912 str* realm;
1913 struct hdr_field* h;
1914 auth_body_t* cred;
1915
1916 get_authorized_cred(rq->proxy_auth, &h);
1917 if (!h) get_authorized_cred(rq->authorization, &h);
1918 if (!h) return 0;
1919 cred=(auth_body_t*)(h->parsed);
1920 if (!cred) return 0;
1921 realm = GET_REALM(&cred->digest);
1922 if (!realm->len || !realm->s) {
1923 return 0;
1924 }
1925 return realm;
1926}
1927
1928static int pv_get_acc_username(struct sip_msg *msg, pv_param_t *param,
1929 pv_value_t *res)

Callers 1

pv_get_acc_usernameFunction · 0.85

Calls 1

get_authorized_credFunction · 0.85

Tested by

no test coverage detected