aboutsummaryrefslogtreecommitdiff
path: root/manage.c
diff options
context:
space:
mode:
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2006-06-29 18:57:21 +0000
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2006-06-29 18:57:21 +0000
commite482a63238d3085e96fa698b1c45cf54357038b4 (patch)
tree687dfbd60abb4ef6c5a2017af0d21394730a3699 /manage.c
parentMinor syshead.h change for NetBSD to allow (diff)
downloadopenvpn-e482a63238d3085e96fa698b1c45cf54357038b4.tar.xz
Added two new management states:
OPENVPN_STATE_RESOLVE -- DNS lookup */ OPENVPN_STATE_TCP_CONNECT -- Connecting to TCP server Echo management state change to log. git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@1068 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to 'manage.c')
-rw-r--r--manage.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/manage.c b/manage.c
index 3fdca46..1c28485 100644
--- a/manage.c
+++ b/manage.c
@@ -118,6 +118,10 @@ man_state_name (const int state)
return "RECONNECTING";
case OPENVPN_STATE_EXITING:
return "EXITING";
+ case OPENVPN_STATE_RESOLVE:
+ return "RESOLVE";
+ case OPENVPN_STATE_TCP_CONNECT:
+ return "TCP_CONNECT";
default:
return "?";
}
@@ -1536,7 +1540,8 @@ management_set_state (struct management *man,
| LOG_PRINT_STATE
| LOG_PRINT_LOCAL_IP
| LOG_PRINT_REMOTE_IP
- | LOG_PRINT_CRLF, &gc);
+ | LOG_PRINT_CRLF
+ | LOG_ECHO_TO_LOG, &gc);
if (out)
man_output_list_push (man, out);
@@ -2273,6 +2278,8 @@ log_entry_print (const struct log_entry *e, unsigned int flags, struct gc_arena
buf_printf (&out, ",%s", print_in_addr_t (e->local_ip, IA_EMPTY_IF_UNDEF, gc));
if (flags & LOG_PRINT_REMOTE_IP)
buf_printf (&out, ",%s", print_in_addr_t (e->remote_ip, IA_EMPTY_IF_UNDEF, gc));
+ if (flags & LOG_ECHO_TO_LOG)
+ msg (D_MANAGEMENT, "MANAGEMENT: %s", BSTR (&out));
if (flags & LOG_PRINT_CRLF)
buf_printf (&out, "\r\n");
return BSTR (&out);