aboutsummaryrefslogtreecommitdiff
path: root/manage.c
diff options
context:
space:
mode:
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2009-05-21 10:15:26 +0000
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2009-05-21 10:15:26 +0000
commit1b3842c6c9c6c143751d9a87a13745e1b2a0c7c7 (patch)
tree5457974fae4eda45a1b86a945216de1ad09ff12f /manage.c
parentReduce the debug level (--verb) at which received management interface (diff)
downloadopenvpn-1b3842c6c9c6c143751d9a87a13745e1b2a0c7c7.tar.xz
Fixed race condition in management interface recv code on
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
Diffstat (limited to 'manage.c')
-rw-r--r--manage.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/manage.c b/manage.c
index 1dd2825..11038e8 100644
--- 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);
}
}