| 1908 | |
| 1909 | |
| 1910 | static 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 | |
| 1928 | static int pv_get_acc_username(struct sip_msg *msg, pv_param_t *param, |
| 1929 | pv_value_t *res) |
no test coverage detected