From: Moises Silva Date: Sun, 22 May 2011 21:53:14 +0000 (-0400) Subject: Merge branch 'master' into smgmaster X-Git-Tag: v1.2.3^2~71^2^2~245^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=950e936111348042ece8d487430f09ae3f34cfc4;p=thirdparty%2Ffreeswitch.git Merge branch 'master' into smgmaster Conflicts: src/switch_console.c --- 950e936111348042ece8d487430f09ae3f34cfc4 diff --cc src/switch_console.c index 5e79f14503,d902af69e7..1e6430018e --- a/src/switch_console.c +++ b/src/switch_console.c @@@ -1001,7 -998,7 +998,7 @@@ static unsigned char console_f12key(Edi char *prompt(EditLine * e) { if (*prompt_str == '\0') { - switch_snprintf(prompt_str, sizeof(prompt_str), "sangoma-media-gateway@%s> ", hostname); - switch_snprintf(prompt_str, sizeof(prompt_str), "freeswitch@%s> ", switch_core_get_switchname()); ++ switch_snprintf(prompt_str, sizeof(prompt_str), "sangoma-media-gateway@%s> ", switch_core_get_switchname()); } return prompt_str; diff --cc src/switch_core.c index 07aca5752e,b0c983cab5..c6c55d48c6 --- a/src/switch_core.c +++ b/src/switch_core.c @@@ -483,11 -519,11 +519,14 @@@ SWITCH_DECLARE(void) switch_core_set_gl GetModuleFileName(NULL, base_dir, BUFSIZE); lastbacklash = strrchr(base_dir, '\\'); base_dir[(lastbacklash - base_dir)] = '\0'; + /* set base_dir as cwd, to be able to use relative paths in scripting languages (e.g. mod_lua) when FS is running as a service or while debugging FS using visual studio */ + SetCurrentDirectory(base_dir); + #else char base_dir[1024] = SWITCH_PREFIX_DIR; + if (SWITCH_GLOBAL_dirs.base_dir) { + snprintf(base_dir, sizeof(base_dir), "%s", SWITCH_GLOBAL_dirs.base_dir); + } #endif if (!SWITCH_GLOBAL_dirs.base_dir && (SWITCH_GLOBAL_dirs.base_dir = (char *) malloc(BUFSIZE))) {