]> git.sur5r.net Git - openldap/commitdiff
add 'next[/prev]' initializer
authorPierangelo Masarati <ando@openldap.org>
Sat, 1 Mar 2003 12:28:07 +0000 (12:28 +0000)
committerPierangelo Masarati <ando@openldap.org>
Sat, 1 Mar 2003 12:28:07 +0000 (12:28 +0000)
include/ldap_queue.h
servers/slapd/controls.c

index c7230470af7ec003a444cda01e85b3ee110bb130..9244f6cd79f0c89f1f41a039c2b127bcfaf5553b 100644 (file)
@@ -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 {                                                               \
index ce704e417f1050973ae4168054fa42ea1a6d5154..7e4d9af3ed9db04d2fd66fe5149cf362e16f0c31 100644 (file)
@@ -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) }
 };
 
 /*