]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/slap.h
Vienna Bulk Commit
[openldap] / servers / slapd / slap.h
index a7d99114ddd2e40a1a9a59c82a8971c10a0d2378..5b231775b1e1184cadab18493d300844dbe84fd1 100644 (file)
@@ -8,6 +8,7 @@
 #include <sys/types.h>
 #include <ac/syslog.h>
 #include <ac/regex.h>
+#include <ac/socket.h>                 /* needed by LDAP_CONNECTIONLESS */
 
 #include "avl.h"
 
@@ -18,7 +19,7 @@
 
 #include "ldap_log.h"
 
-#include "../../libraries/liblber/lber-int.h"
+#include "lber.h"
 #include "ldap.h"
 
 #include "ldap_pvt_thread.h"
@@ -249,6 +250,7 @@ struct backend_db {
 #define                be_modrdn       bd_info->bi_op_modrdn
 #define                be_search       bd_info->bi_op_search
 
+#define                be_release      bd_info->bi_entry_release_rw
 #define                be_group        bd_info->bi_acl_group
 
        /* these should be renamed from be_ to bd_ */
@@ -361,6 +363,7 @@ struct backend_info {
                int msgid));
 
        /* Auxilary Functions */
+       int     (*bi_entry_release_rw) LDAP_P((BackendDB *bd, Entry *e, int rw));
 #ifdef SLAPD_ACLGROUPS
        int     (*bi_acl_group)  LDAP_P((Backend *bd,
                Entry *e, char *bdn, char *edn,
@@ -415,7 +418,7 @@ typedef struct slap_conn {
        int                     c_conn_state;   /* connection state */
 
        ldap_pvt_thread_mutex_t c_mutex; /* protect the connection */
-       Sockbuf         c_sb;           /* ber connection stuff           */
+       Sockbuf         *c_sb;                  /* ber connection stuff           */
 
        /* only can be changed by connect_init */
        time_t          c_starttime;    /* when the connection was opened */
@@ -449,13 +452,13 @@ typedef struct slap_conn {
 
 #if defined(LDAP_SYSLOG) && defined(LDAP_DEBUG)
 #define Statslog( level, fmt, connid, opid, arg1, arg2, arg3 ) \
-       { \
-               if ( ldap_debug & level ) \
-                       fprintf( stderr, fmt, connid, opid, arg1, arg2, arg3 );\
-               if ( ldap_syslog & level ) \
-                       syslog( ldap_syslog_level, fmt, connid, opid, arg1, \
-                           arg2, arg3 ); \
-       }
+       do { \
+               if ( ldap_debug & (level) ) \
+                       fprintf( stderr, (fmt), (connid), (opid), (arg1), (arg2), (arg3) );\
+               if ( ldap_syslog & (level) ) \
+                       syslog( ldap_syslog_level, (fmt), (connid), (opid), (arg1), \
+                               (arg2), (arg3) ); \
+       } while (0)
 #else
 #define Statslog( level, fmt, connid, opid, arg1, arg2, arg3 )
 #endif