Module: sems Branch: 1.2 Commit: 2a401769fb70edb857842f1b23326571ed038cf5 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=2a401769fb70edb857842f1b23326571ed038cf5
Author: Stefan Sayer <[email protected]> Committer: Stefan Sayer <[email protected]> Date: Fri Sep 24 16:15:37 2010 +0200 work around getenv requiring char* --- core/AmUtils.cpp | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/core/AmUtils.cpp b/core/AmUtils.cpp index 98ed495..46b1a1a 100644 --- a/core/AmUtils.cpp +++ b/core/AmUtils.cpp @@ -975,11 +975,14 @@ void add_env_path(const char* name, const string& path) { string var(path); char* old_path=0; + char name_s[50]; regex_t path_reg; + strcpy(name_s, name); + assert(name); - if((old_path = getenv(name)) != 0) { + if((old_path = getenv(name_s)) != 0) { if(strlen(old_path)){ if(regcomp(&path_reg,("[:|^]" + path + "[:|$]").c_str(),REG_NOSUB)){ _______________________________________________ Semsdev mailing list [email protected] http://lists.iptel.org/mailman/listinfo/semsdev
