[lwatch-cvs] files/src lwatch.c,1.22,1.23 settings.c,1.23,1.24
Brought to you by:
arturcz
|
From: <ar...@us...> - 2004-01-12 12:46:25
|
Update of /cvsroot/lwatch/files/src
In directory sc8-pr-cvs1:/tmp/cvs-serv29734/src
Modified Files:
lwatch.c settings.c
Log Message:
Fix SEGV when -O without -o.
Index: lwatch.c
===================================================================
RCS file: /cvsroot/lwatch/files/src/lwatch.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** lwatch.c 12 Jan 2004 11:17:55 -0000 1.22
--- lwatch.c 12 Jan 2004 12:46:22 -0000 1.23
***************
*** 42,45 ****
--- 42,46 ----
#include "config.h"
#include "control.h"
+ #include "defaults.h"
#include "settings.h"
#include "strpcre.h"
***************
*** 61,64 ****
--- 62,71 ----
parse_options(argc,argv);
parse_config();
+ /*** Tymczasowo ***/
+ if(!strlen(lw_conf.in_file))
+ strncpy(lw_conf.in_file,DEF_IN_FILE,MAXPATHLEN);
+ if(!strlen(lw_conf.out_file))
+ strncpy(lw_conf.out_file,DEF_OUT_FILE,MAXPATHLEN);
+ /******************/
set_handlers();
init_parser();
Index: settings.c
===================================================================
RCS file: /cvsroot/lwatch/files/src/settings.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** settings.c 12 Jan 2004 11:17:55 -0000 1.23
--- settings.c 12 Jan 2004 12:46:22 -0000 1.24
***************
*** 246,253 ****
--- 246,255 ----
#endif
fclose(yyin);
+ /* Tymczasowo przeniesione do lwatch.c *
if(!strlen(lw_conf.in_file))
strncpy(lw_conf.in_file,DEF_IN_FILE,MAXPATHLEN);
if(!strlen(lw_conf.out_file))
strncpy(lw_conf.out_file,DEF_OUT_FILE,MAXPATHLEN);
+ ***************************************/
#ifdef DEBUG
printf("date: %i, host: %i, serv: %i, mesg: %i\n",
|