From: Pierangelo Masarati Date: Sat, 1 Mar 2003 12:28:07 +0000 (+0000) Subject: add 'next[/prev]' initializer X-Git-Tag: NO_SLAP_OP_BLOCKS~230 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=46a841870fe6cce3108ef32019b8b3d9ff62edec;p=openldap add 'next[/prev]' initializer --- diff --git a/include/ldap_queue.h b/include/ldap_queue.h index c7230470af..9244f6cd79 100644 --- a/include/ldap_queue.h +++ b/include/ldap_queue.h @@ -129,6 +129,8 @@ struct name { \ #define LDAP_SLIST_HEAD_INITIALIZER(head) \ { NULL } +#define LDAP_SLIST_NEXT_INITIALIZER(next) \ + { NULL } #define LDAP_SLIST_ENTRY(type) \ struct { \ @@ -271,6 +273,8 @@ struct name { \ #define LDAP_LIST_HEAD_INITIALIZER(head) \ { NULL } +#define LDAP_LIST_NEXT_PREV_INITIALIZER(next, prev) \ + { NULL, NULL } #define LDAP_LIST_ENTRY(type) \ struct { \ diff --git a/servers/slapd/controls.c b/servers/slapd/controls.c index ce704e417f..7e4d9af3ed 100644 --- a/servers/slapd/controls.c +++ b/servers/slapd/controls.c @@ -80,47 +80,47 @@ char **slap_known_controls = NULL; static struct slap_control control_defs[] = { { LDAP_CONTROL_VALUESRETURNFILTER, SLAP_CTRL_SEARCH, NULL, - parseValuesReturnFilter, NULL }, + parseValuesReturnFilter, LDAP_SLIST_NEXT_INITIALIZER(next) }, #ifdef LDAP_CONTROL_PAGEDRESULTS { LDAP_CONTROL_PAGEDRESULTS, SLAP_CTRL_SEARCH, NULL, - parsePagedResults, NULL }, + parsePagedResults, LDAP_SLIST_NEXT_INITIALIZER(next) }, #endif #ifdef LDAP_CONTROL_X_DOMAIN_SCOPE { LDAP_CONTROL_X_DOMAIN_SCOPE, SLAP_CTRL_FRONTEND|SLAP_CTRL_SEARCH, NULL, - parseDomainScope, NULL }, + parseDomainScope, LDAP_SLIST_NEXT_INITIALIZER(next) }, #endif #ifdef LDAP_CONTROL_X_PERMISSIVE_MODIFY { LDAP_CONTROL_X_PERMISSIVE_MODIFY, SLAP_CTRL_MODIFY, NULL, - parsePermissiveModify, NULL }, + parsePermissiveModify, LDAP_SLIST_NEXT_INITIALIZER(next) }, #endif #ifdef LDAP_CONTROL_SUBENTRIES { LDAP_CONTROL_SUBENTRIES, SLAP_CTRL_SEARCH, NULL, - parseSubentries, NULL }, + parseSubentries, LDAP_SLIST_NEXT_INITIALIZER(next) }, #endif { LDAP_CONTROL_NOOP, SLAP_CTRL_ACCESS, NULL, - parseNoOp, NULL }, + parseNoOp, LDAP_SLIST_NEXT_INITIALIZER(next) }, #ifdef LDAP_CLIENT_UPDATE { LDAP_CONTROL_CLIENT_UPDATE, SLAP_CTRL_SEARCH, NULL, - parseClientUpdate, NULL }, + parseClientUpdate, LDAP_SLIST_NEXT_INITIALIZER(next) }, #endif #ifdef LDAP_SYNC { LDAP_CONTROL_SYNC, SLAP_CTRL_SEARCH, NULL, - parseLdupSync, NULL }, + parseLdupSync, LDAP_SLIST_NEXT_INITIALIZER(next) }, #endif { LDAP_CONTROL_MANAGEDSAIT, SLAP_CTRL_ACCESS, NULL, - parseManageDSAit, NULL }, + parseManageDSAit, LDAP_SLIST_NEXT_INITIALIZER(next) }, { LDAP_CONTROL_PROXY_AUTHZ, SLAP_CTRL_FRONTEND|SLAP_CTRL_ACCESS, proxy_authz_extops, - parseProxyAuthz, NULL }, - { NULL, 0, NULL, 0, NULL } + parseProxyAuthz, LDAP_SLIST_NEXT_INITIALIZER(next) }, + { NULL, 0, NULL, 0, LDAP_SLIST_NEXT_INITIALIZER(next) } }; /*