don't strstr on null/blank strings.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7027 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris committed 2007-12-30 00:22:51 +00:00
1 parent 33bd22a308
commit 6c25cb4136
9 files changed
+13 -13

No files matched your search

+1 -1
View File
@@ -68,7 +68,7 @@ SWITCH_DECLARE(int) switch_config_open_file(switch_config_t * cfg, char *file_pa
cfg->path = path;
while (switch_config_next_pair(cfg, &var, &val)) {
if ((cfg->sectno != last) && !strcmp(cfg->section, file_path)) {
if (file_path && (cfg->sectno != last) && !strcmp(cfg->section, file_path)) {
cfg->lockto = cfg->sectno;
return 1;
}