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

Function new_credentials

parser/digest/digest.c:34–51  ·  view source on GitHub ↗

* Create and initialize a new credentials structure */

Source from the content-addressed store, hash-verified

32 * Create and initialize a new credentials structure
33 */
34static inline int new_credentials(struct hdr_field* _h)
35{
36 auth_body_t* b;
37
38 b = (auth_body_t*)pkg_malloc(sizeof(auth_body_t));
39 if (b == 0) {
40 LM_ERR("no pkg memory left\n");
41 return -1;
42 }
43
44 init_dig_cred(&(b->digest));
45 b->stale = 0;
46 b->authorized = 0;
47
48 _h->parsed = (void*)b;
49
50 return 0;
51}
52
53
54/*

Callers 2

parse_credentialsFunction · 0.85
mark_authorized_credFunction · 0.85

Calls 1

init_dig_credFunction · 0.85

Tested by

no test coverage detected