summaryrefslogtreecommitdiffstats
path: root/misc.c
diff options
context:
space:
mode:
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2006-11-08 06:54:20 +0000
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2006-11-08 06:54:20 +0000
commita783c40067ed2ac692c9d9c68ee01a7d568900b6 (patch)
tree7674873ccae14f78dc341beaf7d709ce5d6fa6ba /misc.c
parent2270775d8c17ce040818887cf8e3b288182660b6 (diff)
downloadopenvpn-a783c40067ed2ac692c9d9c68ee01a7d568900b6.tar.gz
openvpn-a783c40067ed2ac692c9d9c68ee01a7d568900b6.tar.xz
openvpn-a783c40067ed2ac692c9d9c68ee01a7d568900b6.zip
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
Diffstat (limited to 'misc.c')
-rw-r--r--misc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/misc.c b/misc.c
index ed3960c..161b9e4 100644
--- a/misc.c
+++ b/misc.c
@@ -864,6 +864,14 @@ setenv_int (struct env_set *es, const char *name, int value)
}
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)
{
setenv_str_ex (es, name, value, CC_NAME, 0, 0, CC_PRINT, 0, 0);