MCPcopy Create free account
hub / github.com/apache/httpd / gen_client

Function gen_client

modules/aaa/mod_auth_digest.c:1145–1165  ·  view source on GitHub ↗

* Generate a new client entry, add it to the list, and return the * entry. Returns NULL if failed. */

Source from the content-addressed store, hash-verified

1143 * entry. Returns NULL if failed.
1144 */
1145static client_entry *gen_client(const request_rec *r)
1146{
1147 unsigned long op;
1148 client_entry new_entry = { 0, NULL, 0, "" }, *entry;
1149
1150 if (!opaque_cntr) {
1151 return NULL;
1152 }
1153
1154 apr_global_mutex_lock(opaque_lock);
1155 op = (*opaque_cntr)++;
1156 apr_global_mutex_unlock(opaque_lock);
1157
1158 if (!(entry = add_client(op, &new_entry, r->server))) {
1159 ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01769)
1160 "failed to allocate client entry - ignoring client");
1161 return NULL;
1162 }
1163
1164 return entry;
1165}
1166
1167
1168/*

Callers 1

note_digest_auth_failureFunction · 0.85

Calls 1

add_clientFunction · 0.85

Tested by

no test coverage detected