From a783c40067ed2ac692c9d9c68ee01a7d568900b6 Mon Sep 17 00:00:00 2001 From: james Date: Wed, 8 Nov 2006 06:54:20 +0000 Subject: Added time_ascii, time_duration, and time_unix environmental variables for plugins and callback scripts. git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@1440 e7ae566f-a301-0410-adde-c780ea21d3b5 --- misc.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'misc.c') diff --git a/misc.c b/misc.c index ed3960c..161b9e4 100644 --- a/misc.c +++ b/misc.c @@ -863,6 +863,14 @@ setenv_int (struct env_set *es, const char *name, int value) setenv_str (es, name, buf); } +void +setenv_unsigned (struct env_set *es, const char *name, unsigned int value) +{ + char buf[64]; + openvpn_snprintf (buf, sizeof(buf), "%u", value); + setenv_str (es, name, buf); +} + void setenv_str (struct env_set *es, const char *name, const char *value) { -- cgit