]> git.sur5r.net Git - openldap/commitdiff
misc slapi cleanup
authorPierangelo Masarati <ando@openldap.org>
Fri, 27 Dec 2002 11:48:41 +0000 (11:48 +0000)
committerPierangelo Masarati <ando@openldap.org>
Fri, 27 Dec 2002 11:48:41 +0000 (11:48 +0000)
servers/slapd/Makefile.in
servers/slapd/back-monitor/database.c
servers/slapd/slapi/ibm_pblock_params.h
servers/slapd/slapi/printmsg.c
servers/slapd/slapi/slapi.h
servers/slapd/slapi/slapi_common.h
servers/slapd/slapi/slapi_ops.c
servers/slapd/slapi/slapi_ops.h
servers/slapd/slapi/slapi_utils.h

index 7f225c2cee79734d8badbf7d6edceb5b2c32031c..fd6d5e5d754ca99e1ee46d7057583de95a5aa86d 100644 (file)
@@ -39,9 +39,10 @@ LDAP_INCDIR= ../../include -Islapi
 LDAP_LIBDIR= ../../libraries
 
 SLAP_DIR=
-SLAPD_STATIC_DEPENDS=@SLAPD_SLAPI_DEPEND@ @SLAPD_NO_STATIC@ libbackends.a
+SLAPD_STATIC_DEPENDS=@SLAPD_NO_STATIC@ libbackends.a
 SLAPD_STATIC_BACKENDS=@SLAPD_STATIC_BACKENDS@
 SLAPD_DYNAMIC_BACKENDS=@SLAPD_DYNAMIC_BACKENDS@
+SLAPD_SLAPI_DEPEND=@SLAPD_SLAPI_DEPEND@
 
 XDEFS = $(MODULES_CPPFLAGS)
 XLDFLAGS = $(MODULES_LDFLAGS)
@@ -224,13 +225,13 @@ slapd.exp: libslapd.a
        dlltool --dllname slapd.exe --input-def slapd.def \
                --base-file slapd.base --output-exp $@
 
-.slapi: FORCE
-       $(AR) ruv slapi/libtmpslapd.a $(OBJS)
-       (cd slapi; $(MAKE) $(MFLAGS) all)
-
 libslapi.a: .slapi
        cp slapi/.libs/libslapi.a .
 
+.slapi: slapd
+       $(AR) ruv slapi/libtmpslapd.a $(OBJS)
+       (cd slapi; $(MAKE) $(MFLAGS) all)
+
 slapd: $(SLAPD_DEPENDS)
        $(LTLINK) -o $@ $(SLAPD_OBJECTS) $(LIBS) \
                $(WRAP_LIBS)
@@ -238,7 +239,7 @@ slapd: $(SLAPD_DEPENDS)
 sslapd: version.o
        $(LTLINK) -static -o $@ $(OBJS) version.o $(LIBS) $(WRAP_LIBS)
 
-tools $(SLAPD_DYNAMIC_BACKENDS): slapd
+tools $(SLAPD_DYNAMIC_BACKENDS) $(SLAPD_SLAPI_DEPEND): slapd
        cd $@; $(MAKE) $(MFLAGS) all
        @touch $@
 
index 41dea0f1c8eb7a440f70799c3c7193466ae20272..634988a68aa0a67711d25933c41dd95fe1b1b2df 100644 (file)
@@ -37,6 +37,7 @@
 
 #include "slap.h"
 #include "slapi-plugin.h"
+#include "slapi_pblock.h"
 #include "back-monitor.h"
 
 #if defined(LDAP_SLAPI)
index 13be5fda865f6d64a1e994eecbd3cea2a42e544d..4a3902d32e06694ce8926b9c7c5c22a115100de1 100644 (file)
@@ -65,4 +65,4 @@
 #define SLAPI_IBM_EVENT_SENTREG                                                (FIRST_PARAM - 45)
 #define SLAPI_IBM_CONN_DN_ORIG                                         (FIRST_PARAM - 46)
 #define SLAPI_PLUGIN_DB_DELETE_PROGRESS_FN                     (FIRST_PARAM - 47) 
-#endif
+#endif /* _ibm_pblock_params_H */
index 87ff17ed40cffdfe0af7eb9022eb9482f929d58f..086032b6b49814ece5b858cc449b2c2fde6290c1 100644 (file)
@@ -27,7 +27,7 @@
 
 /* Single threads access to routine */
 ldap_pvt_thread_mutex_t slapi_printmessage_mutex; 
-const char             *slapi_log_file = NULL;
+char                   *slapi_log_file = NULL;
 int                    slapi_log_level = SLAPI_LOG_PLUGIN;
 
 int 
index e46f6c4afbd9198183259c347088088dfb933031..cfb212cbab3c842fcf8808ff90c0a3da0bc2ffa8 100644 (file)
@@ -26,7 +26,9 @@ typedef Filter                        Slapi_Filter;
 #endif /* NO_PBLOCK_CLASS */
 #include <plugin.h>
 #include <slapi_ops.h>
+#if 0 /* unused (yet?) */
 #include <slapi_cl.h>
+#endif /* 0 */
 
 /*
  * types of plugins
index 7a97d5d4039bf26ae8507c905f6525eb4997998b..0ff7a9951961681bc5b88b33093068cd196c2e2d 100644 (file)
@@ -28,8 +28,7 @@
 extern int slap_debug;
 
 int
-dn_check(char *, int  *);
-
+dn_check(char *, int *);
 
 typedef struct strlist {
        char *string;
index 4ff9264c42682ad63f15704937be2374bb73b421..b664fd1dfd7e1ba7e479e92c599ba120edea81ab 100644 (file)
 \r
 int bvptr2obj( struct berval **bvptr, struct berval **bvobj );\r
 \r
-int\r
+static void\r
 internal_result_v3(\r
-       Connection *conn, \r
-       Operation *op, \r
-       int err,\r
-       char *matched, \r
-       char *text, \r
-       char **referrals )\r
+       Connection      *conn, \r
+       Operation       *op, \r
+       ber_int_t       err,\r
+       const char      *matched, \r
+       const char      *text, \r
+       BerVarray       referrals,\r
+       LDAPControl     **ctrls )\r
 {\r
-       return LDAP_SUCCESS;\r
+       return;\r
 }\r
 \r
-int\r
+static int\r
 internal_search_entry(\r
-       Backend *be, \r
-       Connection *conn, \r
-       Operation *op, \r
-       Entry *e, \r
-       char **attrs, \r
-       int attrsonly, \r
-       char **denied_attrs ) \r
+       Backend         *be, \r
+       Connection      *conn, \r
+       Operation       *op, \r
+       Entry           *e, \r
+       AttributeName   *attrs, \r
+       int             attrsonly, \r
+       LDAPControl     **ctrls ) \r
 {\r
        char *ent2str = NULL;\r
        int nentries = 0, len = 0, i = 0;\r
@@ -90,37 +91,47 @@ internal_search_entry(
        return LDAP_SUCCESS;\r
 }\r
 \r
-int\r
+static void\r
 internal_search_result(\r
-       Connection *conn, \r
-       Operation *op,\r
-       int err, \r
-       char *matched, \r
-       char *text, \r
-       int nentries ) \r
+       Connection      *conn, \r
+       Operation       *op,\r
+       ber_int_t       err, \r
+       const char      *matched, \r
+       const char      *text, \r
+       BerVarray       refs,\r
+       LDAPControl     **ctrls,\r
+       int             nentries ) \r
 {\r
        slapi_pblock_set( (Slapi_PBlock *)op->o_pb,\r
                        SLAPI_NENTRIES, (void *)nentries );\r
 \r
-       return LDAP_SUCCESS;\r
+       return;\r
 }\r
 \r
-int\r
+static void\r
 internal_result_ext(\r
-       Connection *conn, \r
-       Operation *op, \r
-       int  errnum, \r
-       char *respname, \r
-       struct berval *response )\r
+       Connection      *conn, \r
+       Operation       *op, \r
+       ber_int_t       errnum, \r
+       const char      *matched,\r
+       const char      *text,\r
+       BerVarray       refs,\r
+       const char      *rspoid,\r
+       struct berval   *rspdata,\r
+       LDAPControl     **ctrls )\r
 {\r
-       return LDAP_SUCCESS;\r
+       return;\r
 }\r
 \r
-int\r
+static int\r
 internal_search_reference(\r
-       Connection *conn, \r
-       Operation *op, \r
-       char **ref ) \r
+       Backend         *be,\r
+       Connection      *conn, \r
+       Operation       *op, \r
+       Entry           *e,\r
+       BerVarray       refs,\r
+       LDAPControl     **ctrls,\r
+       BerVarray       *v2refs )\r
 {\r
        return LDAP_SUCCESS;\r
 }\r
@@ -220,16 +231,11 @@ fakeConnection(
 \r
        backend_connection_init( c );\r
 \r
-       pConn->c_send_ldap_result =\r
-               (SEND_LDAP_RESULT) internal_result_v3;\r
-       pConn->c_send_search_entry =\r
-               (SEND_SEARCH_ENTRY) internal_search_entry;\r
-       pConn->c_send_search_result =\r
-               (SEND_SEARCH_RESULT) internal_search_result;\r
-       pConn->c_send_ldap_extended =\r
-               (SEND_LDAP_EXTENDED) internal_result_ext;\r
-       pConn->c_send_search_reference =\r
-               (SEND_SEARCH_REFERENCE) internal_search_reference;\r
+       pConn->c_send_ldap_result = internal_result_v3;\r
+       pConn->c_send_search_entry = internal_search_entry;\r
+       pConn->c_send_search_result = internal_search_result;\r
+       pConn->c_send_ldap_extended = internal_result_ext;\r
+       pConn->c_send_search_reference = internal_search_reference;\r
 \r
        return pConn;\r
 }\r
index 26adf35aa839a92baa8c396dc0d6d014ff1e7b07..41555a66ee4199fdcbba048a204551daee2bf106 100644 (file)
 #define SLAPI_OPS_H
 
 Slapi_PBlock *slapi_search_internal( char *base, int scope, char *filter, 
-       LDAPControl **controls, char **attrs, int attrsonly );
-Slapi_PBlock *slapi_search_internal_bind( char *bindDN, char *base, int scope, char *filter, 
-       LDAPControl **controls, char **attrs, int attrsonly ); /* d58508 */
+               LDAPControl **controls, char **attrs, int attrsonly );
+Slapi_PBlock *slapi_search_internal_bind( char *bindDN, char *base,
+               int scope, char *filter, LDAPControl **controls,
+               char **attrs, int attrsonly ); /* d58508 */
 Slapi_PBlock *slapi_modify_internal( char *dn, LDAPMod **mods,
         LDAPControl **controls, int log_change );
-Slapi_PBlock *slapi_add_entry_internal( Slapi_Entry * e, LDAPControl **controls, int log_change );
-Slapi_PBlock *slapi_add_internal( char * dn, LDAPMod **attrs, LDAPControl **controls, int log_changes );
-Slapi_PBlock *slapi_add_entry_internal( Slapi_Entry * e, LDAPControl **controls, int log_change );
-Slapi_PBlock *slapi_delete_internal( char * dn,  LDAPControl **controls, int log_change );
-Slapi_PBlock *slapi_modrdn_internal( char * olddn, char * newrdn, int deloldrdn, LDAPControl **controls, int log_change);
+Slapi_PBlock *slapi_add_entry_internal( Slapi_Entry * e,
+               LDAPControl **controls, int log_change );
+Slapi_PBlock *slapi_add_internal( char * dn, LDAPMod **attrs,
+               LDAPControl **controls, int log_changes );
+Slapi_PBlock *slapi_add_entry_internal( Slapi_Entry * e,
+               LDAPControl **controls, int log_change );
+Slapi_PBlock *slapi_delete_internal( char * dn,  LDAPControl **controls,
+               int log_change );
+Slapi_PBlock *slapi_modrdn_internal( char * olddn, char * newrdn,
+               int deloldrdn, LDAPControl **controls, int log_change);
 /*
-Slapi_PBlock *slapi_modrdn_internal( char * olddn, char * newrdn, char *newParent, int deloldrdn, LDAPControl **controls, int log_change);
+Slapi_PBlock *slapi_modrdn_internal( char * olddn, char * newrdn,
+               char *newParent, int deloldrdn, LDAPControl **controls,
+               int log_change);
 */
 char **slapi_get_supported_extended_ops(void);
 int duplicateBVMod( LDAPMod *pMod, LDAPMod **ppNewMod );
index e8ee11356223ee2f2f0a83b4488230005941dcd3..49ae154275771fc3c8462af3dcd2b5669fe01437 100644 (file)
@@ -28,16 +28,16 @@ typedef int (*SLAPI_FUNC)(Slapi_PBlock *pb);
 #define TCPIPPATH "SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters"
 
 typedef struct _slapi_control {
-        int           s_ctrl_num;
-        char          **s_ctrl_oids;
-        unsigned long *s_ctrl_ops;
+        int                    s_ctrl_num;
+        char                   **s_ctrl_oids;
+        unsigned long          *s_ctrl_ops;
 } Slapi_Control;
 
 typedef struct _ExtendedOp {
-       struct berval ext_oid;
-        SLAPI_FUNC ext_func;
-        Backend    *ext_be;
-        struct _ExtendedOp *ext_next;
+       struct berval           ext_oid;
+        SLAPI_FUNC             ext_func;
+        Backend                        *ext_be;
+        struct _ExtendedOp     *ext_next;
 } ExtendedOp;
 
 int slapi_log_error( int severity, char *subsystem, char *fmt, ... );
@@ -111,7 +111,7 @@ int slapi_audit_send_record( Slapi_PBlock *pb, Connection *conn,
 extern ldap_pvt_thread_mutex_t slapi_hn_mutex;
 extern ldap_pvt_thread_mutex_t slapi_time_mutex;
 extern ldap_pvt_thread_mutex_t slapi_printmessage_mutex; 
-extern const char              *slapi_log_file;
+extern char                    *slapi_log_file;
 extern int                     slapi_log_level;
 
 #endif /* _SLAPI_UTILS_H */