smbldap: Privatize struct smbldap_state
authorVolker Lendecke <vl@samba.org>
Wed, 19 Apr 2017 11:43:39 +0000 (13:43 +0200)
committerVolker Lendecke <vl@samba.org>
Thu, 20 Apr 2017 08:13:25 +0000 (10:13 +0200)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
source3/include/smbldap.h
source3/lib/smbldap.c

index 78e0a80..6af0806 100644 (file)
  *
  */
 
-struct smbldap_state {
-       LDAP *ldap_struct;
-       pid_t pid;
-       time_t last_ping; /* monotonic */
-       /* retrieve-once info */
-       const char *uri;
-
-       /* credentials */
-       bool anonymous;
-       char *bind_dn;
-       char *bind_secret;
-       int (*bind_callback)(LDAP *ldap_struct, struct smbldap_state *ldap_state, void *data);
-       void *bind_callback_data;
-
-       bool paged_results;
-
-       unsigned int num_failures;
-
-       time_t last_use; /* monotonic */
-       struct tevent_context *tevent_context;
-       struct tevent_timer *idle_event;
-
-       struct timeval last_rebind; /* monotonic */
-};
+struct smbldap_state;
 
 /* The following definitions come from lib/smbldap.c  */
 
index 50b45ae..3e7cdd4 100644 (file)
 
 #define SMBLDAP_IDLE_TIME 150          /* After 2.5 minutes disconnect */
 
+struct smbldap_state {
+       LDAP *ldap_struct;
+       pid_t pid;
+       time_t last_ping; /* monotonic */
+       /* retrieve-once info */
+       const char *uri;
+
+       /* credentials */
+       bool anonymous;
+       char *bind_dn;
+       char *bind_secret;
+       int (*bind_callback)(LDAP *ldap_struct,
+                            struct smbldap_state *ldap_state, void *data);
+       void *bind_callback_data;
+
+       bool paged_results;
+
+       unsigned int num_failures;
+
+       time_t last_use; /* monotonic */
+       struct tevent_context *tevent_context;
+       struct tevent_timer *idle_event;
+
+       struct timeval last_rebind; /* monotonic */
+};
+
 LDAP *smbldap_get_ldap(struct smbldap_state *state)
 {
        return state->ldap_struct;