--- ./keepalived/vrrp/vrrp_notify.c.orig 2010-04-02 11:57:16 +0200 +++ ./keepalived/vrrp/vrrp_notify.c 2010-04-02 11:55:47 +0200 @@ -93,8 +93,9 @@ static int script_open_litteral(char *script) { + FILE *fOut; log_message(LOG_DEBUG, "Opening script file %s",script); - FILE *fOut = fopen(script, "r");; + fOut = fopen(script, "r");; if (!fOut) { log_message(LOG_INFO, "Can't open %s (errno %d %s)", script, errno, strerror(errno)); --- ./lib/parser.c.bad 2009-09-24 12:22:57 +0200 +++ ./lib/parser.c 2010-04-02 11:55:09 +0200 @@ -193,13 +193,15 @@ FILE *stream; char *path; int ret; + int i; glob_t globbuf; + char prev_path[MAXBUF]; + char *confpath; globbuf.gl_offs = 0; glob(conf_file, 0, NULL, &globbuf); - int i; for(i = 0; i < globbuf.gl_pathc; i++){ log_message(LOG_INFO, "Opening file '%s'.\n",globbuf.gl_pathv[i]); stream = fopen(globbuf.gl_pathv[i], "r"); @@ -211,10 +213,9 @@ current_stream = stream; current_conf_file = globbuf.gl_pathv[i]; - char prev_path[MAXBUF]; path = getcwd(prev_path, MAXBUF); - char *confpath = strdup(globbuf.gl_pathv[i]); + confpath = strdup(globbuf.gl_pathv[i]); dirname(confpath); ret = chdir(confpath); process_stream(current_keywords);