s3-libads Move variables into if (socket_wrapper_dir()) where they are used.
authorAndrew Bartlett <abartlet@samba.org>
Thu, 28 Apr 2011 08:12:03 +0000 (18:12 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 29 Apr 2011 06:38:12 +0000 (16:38 +1000)
source3/libads/ldap.c

index eff851047ec0a5a7f16a9bb5ea097a4762e422a1..de3ad5aa77d8b4b8f7299ea7a34698c797626843 100644 (file)
@@ -65,10 +65,6 @@ static void gotalarm_sig(int signum)
 {
        LDAP *ldp = NULL;
 
-       int fd, ldap_err;
-       NTSTATUS status;
-       char *uri;
-
        DEBUG(10, ("Opening connection to LDAP server '%s:%d', timeout "
                   "%u seconds\n", server, port, to));
 
@@ -77,6 +73,10 @@ static void gotalarm_sig(int signum)
         * as this is the best way to get the emulated TCP socket into
         * OpenLDAP */
        if (socket_wrapper_dir() != NULL) {
+               int fd, ldap_err;
+               NTSTATUS status;
+               char *uri;
+
                status = open_socket_out(ss, port, to, &fd);
 
                if (!NT_STATUS_IS_OK(status)) {