From d2b0636c491f44bb33b62893f2d3875d54f88fda Mon Sep 17 00:00:00 2001 From: james Date: Fri, 26 Feb 2010 10:26:45 +0000 Subject: Fixed an issue in the Management Interface that could cause a process hang with 100% CPU utilization in --management-client mode if the management interface client disconnected at the point where credentials are queried. git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@5458 e7ae566f-a301-0410-adde-c780ea21d3b5 --- manage.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/manage.c b/manage.c index 0f72f64..f75aedd 100644 --- a/manage.c +++ b/manage.c @@ -1541,17 +1541,18 @@ man_reset_client_socket (struct management *man, const bool exiting) { if (socket_defined (man->connection.sd_cli)) { - msg (D_MANAGEMENT, "MANAGEMENT: Client disconnected"); #ifdef WIN32 man_stop_ne32 (man); #endif man_close_socket (man, man->connection.sd_cli); man->connection.sd_cli = SOCKET_UNDEFINED; + man->connection.state = MS_INITIAL; command_line_reset (man->connection.in); buffer_list_reset (man->connection.out); #ifdef MANAGEMENT_DEF_AUTH in_extra_reset (&man->connection, false); #endif + msg (D_MANAGEMENT, "MANAGEMENT: Client disconnected"); } if (!exiting) { @@ -2511,11 +2512,13 @@ man_output_standalone (struct management *man, volatile int *signal_received) static int man_standalone_event_loop (struct management *man, volatile int *signal_received, const time_t expire) { - int status; - ASSERT (man_standalone_ok (man)); - status = man_block (man, signal_received, expire); - if (status > 0) - management_io (man); + int status = -1; + if (man_standalone_ok (man)) + { + status = man_block (man, signal_received, expire); + if (status > 0) + management_io (man); + } return status; } @@ -2573,6 +2576,8 @@ management_event_loop_n_seconds (struct management *man, int sec) while (true) { man_standalone_event_loop (man, &signal_received, expire); + if (!signal_received) + man_check_for_signals (&signal_received); if (signal_received) return; } @@ -2662,6 +2667,8 @@ management_query_user_pass (struct management *man, do { man_standalone_event_loop (man, &signal_received, 0); + if (!signal_received) + man_check_for_signals (&signal_received); if (signal_received) { ret = false; @@ -2742,6 +2749,8 @@ management_hold (struct management *man) do { man_standalone_event_loop (man, &signal_received, 0); + if (!signal_received) + man_check_for_signals (&signal_received); if (signal_received) break; } while (!man->persist.hold_release); -- cgit v1.2.3 From 63976e0f09c51f3001e487584863f8f3e930a824 Mon Sep 17 00:00:00 2001 From: David Sommerseth Date: Tue, 16 Feb 2010 22:06:51 +0100 Subject: Added mapping files from SVN commit ID to more descriptive commit IDs. Unfortunately, this will not rewrite the commit history. So all commits done by james@e7ae566f-a301-0410-adde-c780ea21d3b5 is James Yonans commits. It was considered to risky to use git tools to rewrite the commit history, as it could influence those already using this git tree. --- .mailmap | 1 + .svncommitters | 1 + 2 files changed, 2 insertions(+) create mode 100644 .mailmap create mode 100644 .svncommitters diff --git a/.mailmap b/.mailmap new file mode 100644 index 0000000..91ff553 --- /dev/null +++ b/.mailmap @@ -0,0 +1 @@ +James Yonan james diff --git a/.svncommitters b/.svncommitters new file mode 100644 index 0000000..0772102 --- /dev/null +++ b/.svncommitters @@ -0,0 +1 @@ +james = James Yonan -- cgit v1.2.3