dovecot-1.2: Added env_remove().

dovecot at dovecot.org dovecot at dovecot.org
Sat Dec 13 14:00:10 EET 2008


details:   http://hg.dovecot.org/dovecot-1.2/rev/b1a7df02ba38
changeset: 8536:b1a7df02ba38
user:      Timo Sirainen <tss at iki.fi>
date:      Sat Dec 13 13:53:26 2008 +0200
description:
Added env_remove().

diffstat:

2 files changed, 7 insertions(+)
src/lib/env-util.c |    5 +++++
src/lib/env-util.h |    2 ++

diffs (27 lines):

diff -r 403621c075c5 -r b1a7df02ba38 src/lib/env-util.c
--- a/src/lib/env-util.c	Sat Dec 13 13:19:03 2008 +0200
+++ b/src/lib/env-util.c	Sat Dec 13 13:53:26 2008 +0200
@@ -15,6 +15,11 @@ void env_put(const char *env)
 	}
 	if (putenv(p_strdup(pool, env)) != 0)
 		i_fatal("putenv(%s) failed: %m", env);
+}
+
+void env_remove(const char *name)
+{
+	unsetenv(name);
 }
 
 void env_clean(void)
diff -r 403621c075c5 -r b1a7df02ba38 src/lib/env-util.h
--- a/src/lib/env-util.h	Sat Dec 13 13:19:03 2008 +0200
+++ b/src/lib/env-util.h	Sat Dec 13 13:53:26 2008 +0200
@@ -4,6 +4,8 @@
 /* Add new environment variable. Wrapper to putenv(). Note that calls to this
    function allocates memory which isn't free'd until env_clean() is called. */
 void env_put(const char *env);
+/* Remove a single environment. */
+void env_remove(const char *name);
 /* Clear all environment variables. */
 void env_clean(void);
 


More information about the dovecot-cvs mailing list