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 78e0a802d5837c4a229fa91b50f734e10786ad46..6af0806b74897e14b8119e786d58197d9e59e035 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 50b45ae91ce818244350007e48a9922c278ea0e1..3e7cdd4dc58866851d1aa876340232f0f6575cb2 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;