mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-23 12:42:02 +00:00
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 <s.knoblich@axsentis.de>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user