Lines Matching defs:cache
18 * util_ldap_cache.c: LDAP cache things
48 void *util_ldap_url_node_copy(util_ald_cache_t *cache, void *c)
51 util_url_node_t *node = util_ald_alloc(cache, sizeof *node);
54 if (!(node->url = util_ald_strdup(cache, n->url))) {
55 util_ald_free(cache, node);
68 void util_ldap_url_node_free(util_ald_cache_t *cache, void *n)
72 util_ald_free(cache, node->url);
76 util_ald_free(cache, node);
79 void util_ldap_url_node_display(request_rec *r, util_ald_cache_t *cache, void *n)
147 void *util_ldap_search_node_copy(util_ald_cache_t *cache, void *c)
150 util_search_node_t *newnode = util_ald_alloc(cache, sizeof *newnode);
159 if (!(newnode->vals = util_ald_alloc(cache, sizeof(char *) * (k+1)))) {
160 util_ldap_search_node_free(cache, newnode);
166 if (!(newnode->vals[i] = util_ald_strdup(cache, node->vals[i]))) {
167 util_ldap_search_node_free(cache, newnode);
179 if (!(newnode->username = util_ald_strdup(cache, node->username)) ||
180 !(newnode->dn = util_ald_strdup(cache, node->dn)) ) {
181 util_ldap_search_node_free(cache, newnode);
185 if(!(newnode->bindpw = util_ald_strdup(cache, node->bindpw))) {
186 util_ldap_search_node_free(cache, newnode);
198 void util_ldap_search_node_free(util_ald_cache_t *cache, void *n)
207 util_ald_free(cache, node->vals[i]);
210 util_ald_free(cache, node->vals);
212 util_ald_free(cache, node->username);
213 util_ald_free(cache, node->dn);
214 util_ald_free(cache, node->bindpw);
215 util_ald_free(cache, node);
218 void util_ldap_search_node_display(request_rec *r, util_ald_cache_t *cache, void *n)
254 void *util_ldap_compare_node_copy(util_ald_cache_t *cache, void *c)
257 util_compare_node_t *node = util_ald_alloc(cache, sizeof *node);
260 if (!(node->dn = util_ald_strdup(cache, n->dn)) ||
261 !(node->attrib = util_ald_strdup(cache, n->attrib)) ||
262 !(node->value = util_ald_strdup(cache, n->value)) ||
263 ((n->subgroupList) && !(node->subgroupList = util_ald_sgl_dup(cache, n->subgroupList)))) {
264 util_ldap_compare_node_free(cache, node);
277 void util_ldap_compare_node_free(util_ald_cache_t *cache, void *n)
281 util_ald_sgl_free(cache, &(node->subgroupList));
282 util_ald_free(cache, node->dn);
283 util_ald_free(cache, node->attrib);
284 util_ald_free(cache, node->value);
285 util_ald_free(cache, node);
288 void util_ldap_compare_node_display(request_rec *r, util_ald_cache_t *cache, void *n)
357 void *util_ldap_dn_compare_node_copy(util_ald_cache_t *cache, void *c)
360 util_dn_compare_node_t *node = util_ald_alloc(cache, sizeof *node);
363 if (!(node->reqdn = util_ald_strdup(cache, n->reqdn)) ||
364 !(node->dn = util_ald_strdup(cache, n->dn))) {
365 util_ldap_dn_compare_node_free(cache, node);
375 void util_ldap_dn_compare_node_free(util_ald_cache_t *cache, void *n)
378 util_ald_free(cache, node->reqdn);
379 util_ald_free(cache, node->dn);
380 util_ald_free(cache, node);
383 void util_ldap_dn_compare_node_display(request_rec *r, util_ald_cache_t *cache, void *n)