]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Fixed race condition in management interface recv code on
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>
Thu, 21 May 2009 10:15:26 +0000 (10:15 +0000)
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>
Thu, 21 May 2009 10:15:26 +0000 (10:15 +0000)
Windows, where sending a set of several commands to the
management interface in quick succession might cause the
latter commands in the set to be ignored.

Increased management interface input command buffer size
from 256 to 1024 bytes.

Minor tweaks to Windows build system.

git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@4414 e7ae566f-a301-0410-adde-c780ea21d3b5

install-win32/getgui
install-win32/maketext
manage.c

index 03f68a8697753c95d24bb19ec9abdabec01cc26d..b53a8f7d74b72f9435b89c2fbf65493a5c69bf8e 100644 (file)
@@ -7,7 +7,7 @@
 
 GUI="$OPENVPN_GUI_DIR/$OPENVPN_GUI"
 
-if [ -e "$GUI" ]; then
+if [ -f "$GUI" ]; then
     mkdir -p $GENOUT/bin &>/dev/null    
     cp $GUI $GENOUT/bin
     if [ -d "$SIGNTOOL" ]; then
@@ -15,7 +15,7 @@ if [ -e "$GUI" ]; then
     fi
 fi
 
-if [ -e "$GENOUT/bin/$OPENVPN_GUI" ]; then
+if [ -f "$GENOUT/bin/$OPENVPN_GUI" ]; then
     echo '!define OPENVPN_GUI_DEFINED' >autodefs/guidefs.nsi
 else
     cat /dev/null >autodefs/guidefs.nsi
index cf59b53b385d1a896b074e64def351a1854dd82a..9a94a812122f1e76cce1701b7879934f58fe735f 100644 (file)
@@ -41,7 +41,7 @@ cp install-win32/setpath.nsi $n
 cp install-win32/GetWindowsVersion.nsi $n
 
 if [ -n "$EXTRACT_FILES" ]; then
-    cp install-win32/MultiFileExtract.nsi $n
+    cp "$EXTRACT_FILES/MultiFileExtract.nsi" $n
 fi
 
 # get OpenVPN client config files
index 1dd2825b9f36c96445046d68628e629a00d517b0..11038e86bcce5140ac0901530cfc12e283498808 100644 (file)
--- a/manage.c
+++ b/manage.c
@@ -1914,7 +1914,7 @@ man_connection_init (struct management *man)
        * Allocate helper objects for command line input and
        * command output from/to the socket.
        */
-      man->connection.in = command_line_new (256);
+      man->connection.in = command_line_new (1024);
       man->connection.out = buffer_list_new (0);
 
       /*
@@ -2323,7 +2323,8 @@ management_io (struct management *man)
            {
              if (net_events & FD_READ)
                {
-                 man_read (man);
+                 while (man_read (man) > 0)
+                   ;
                  net_event_win32_clear_selected_events (&man->connection.ne32, FD_READ);
                }
            }