]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Fixed several instances of declarations after statements.
authorJames Yonan <james@openvpn.net>
Thu, 8 May 2014 22:50:31 +0000 (16:50 -0600)
committerGert Doering <gert@greenie.muc.de>
Tue, 20 May 2014 08:33:37 +0000 (10:33 +0200)
Signed-off-by: James Yonan <james@openvpn.net>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <1399589436-8730-2-git-send-email-james@openvpn.net>
URL: http://article.gmane.org/gmane.network.openvpn.devel/8709
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/init.c
src/openvpn/socket.c
src/openvpn/win32.c

index 52d370b80b40042d8747e907d2cacb44ca4c01bb..88883fb7a9e009dd00879f3b02ecf35a4c2a3f5a 100644 (file)
@@ -183,10 +183,12 @@ ce_management_query_proxy (struct context *c)
   if (management)
     {
       gc = gc_new ();
-      struct buffer out = alloc_buf_gc (256, &gc);
-      buf_printf (&out, ">PROXY:%u,%s,%s", (l ? l->current : 0) + 1,
-                  (proto_is_udp (ce->proto) ? "UDP" : "TCP"), np (ce->remote));
-      management_notify_generic (management, BSTR (&out));
+      {
+       struct buffer out = alloc_buf_gc (256, &gc);
+       buf_printf (&out, ">PROXY:%u,%s,%s", (l ? l->current : 0) + 1,
+                   (proto_is_udp (ce->proto) ? "UDP" : "TCP"), np (ce->remote));
+       management_notify_generic (management, BSTR (&out));
+      }
       ce->flags |= CE_MAN_QUERY_PROXY;
       while (ce->flags & CE_MAN_QUERY_PROXY)
         {
index 23566f110ca3e8ee414cfa67f255be6d6ca4f72c..7ff14cc75b3199da96e400cdd1778e3a37f686a2 100644 (file)
@@ -1227,6 +1227,7 @@ resolve_remote (struct link_socket *sock,
              unsigned int flags = sf2gaf(GETADDR_RESOLVE|GETADDR_UPDATE_MANAGEMENT_STATE, sock->sockflags);
              int retry = 0;
              int status = -1;
+             struct addrinfo* ai;
 
              if (sock->connection_profiles_defined && sock->resolve_retry_seconds == RESOLV_RETRY_INFINITE)
                {
@@ -1263,7 +1264,6 @@ resolve_remote (struct link_socket *sock,
                  ASSERT (0);
                }
 
-                 struct addrinfo* ai;
                  /* Temporary fix, this need to be changed for dual stack */
                  status = openvpn_getaddrinfo(flags, sock->remote_host, retry,
                                                                                          signal_received, af, &ai);
index 13fd881e203a556ec6ae488cd8ad2f845d3df978..f35c96be377636b460e815f23034f2a8090b8cdc 100644 (file)
@@ -870,6 +870,9 @@ openvpn_execve (const struct argv *a, const struct env_set *es, const unsigned i
           WCHAR *cl = wide_cmd_line (a, &gc);
           WCHAR *cmd = wide_string (a->argv[0], &gc);
 
+          /* this allows console programs to run, and is ignored otherwise */
+          DWORD proc_flags = CREATE_NO_WINDOW;
+
           CLEAR (start_info);
           CLEAR (proc_info);
 
@@ -879,9 +882,6 @@ openvpn_execve (const struct argv *a, const struct env_set *es, const unsigned i
           start_info.dwFlags = STARTF_USESHOWWINDOW;
           start_info.wShowWindow = SW_HIDE;
 
-          /* this allows console programs to run, and is ignored otherwise */
-          DWORD proc_flags = CREATE_NO_WINDOW;
-
           if (CreateProcessW (cmd, cl, NULL, NULL, FALSE, proc_flags, env, NULL, &start_info, &proc_info))
             {
               DWORD exit_status = 0;