* Create and initialize a new credentials structure */
| 32 | * Create and initialize a new credentials structure |
| 33 | */ |
| 34 | static 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 | /* |
no test coverage detected