From b6826180f37ebfa77c08f1ce761fc9b357d3ed12 Mon Sep 17 00:00:00 2001 From: Stefan Knoblich Date: Mon, 4 Jul 2011 01:10:11 +0200 Subject: [PATCH] mod_ladspa: Set setenv() overwrite flag to replace empty LADSPA_PATH variables. For complete putenv()-like behaviour. Further investigation on why putenv() caused EFAULTs on execve() and segfaults on reload: putenv(3): "The string pointed to by string becomes part of the environment, so altering the string changes the environment." setenv(3): "This function makes copies of the strings pointed to by name and value (by contrast with putenv(3))." Signed-off-by: Stefan Knoblich --- src/mod/applications/mod_ladspa/mod_ladspa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mod/applications/mod_ladspa/mod_ladspa.c b/src/mod/applications/mod_ladspa/mod_ladspa.c index 0e399818eb..968f2d7879 100644 --- a/src/mod/applications/mod_ladspa/mod_ladspa.c +++ b/src/mod/applications/mod_ladspa/mod_ladspa.c @@ -631,9 +631,9 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_ladspa_load) if (zstr(path)) { if (switch_directory_exists("/usr/lib64/ladspa/", pool) == SWITCH_STATUS_SUCCESS) { - setenv("LADSPA_PATH", "/usr/lib64/ladspa/:/usr/local/lib/ladspa", 0); + setenv("LADSPA_PATH", "/usr/lib64/ladspa/:/usr/local/lib/ladspa", 1); } else if (switch_directory_exists("/usr/lib/ladspa/", pool) == SWITCH_STATUS_SUCCESS) { - setenv("LADSPA_PATH", "/usr/lib/ladspa/:/usr/local/lib/ladspa", 0); + setenv("LADSPA_PATH", "/usr/lib/ladspa/:/usr/local/lib/ladspa", 1); } }