PSI UPDATE
r2720 | ffr | 2008-10-13 15:40:07 +1100 (Mon, 13 Oct 2008) | 2 lines
This commit is contained in:
11
servlog.c
11
servlog.c
@@ -253,6 +253,7 @@ static const char* timestamp(struct timeval *tp) {
|
||||
int OpenVerifyLogFile()
|
||||
{
|
||||
char pFile[256];
|
||||
char filnam[512];
|
||||
char *pChar = NULL;
|
||||
|
||||
pChar = IFindOption(pSICSOptions,"LogFileBaseName");
|
||||
@@ -262,10 +263,10 @@ static const char* timestamp(struct timeval *tp) {
|
||||
}
|
||||
else
|
||||
{
|
||||
strcpy(pFile,pChar);
|
||||
strncpy(pFile,pChar,255);
|
||||
}
|
||||
sprintf(pFile,"%s%2.2d.log",pFile, iFile);
|
||||
fLogFile = fopen(pFile,"w");
|
||||
snprintf(filnam,511,"%s%2.2d.log",pFile, iFile);
|
||||
fLogFile = fopen(filnam,"w");
|
||||
if(!fLogFile)
|
||||
{
|
||||
fprintf(stderr,"ERROR: Cannot open logfile %s for writing\n",pFile);
|
||||
@@ -278,6 +279,10 @@ static const char* timestamp(struct timeval *tp) {
|
||||
}
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
void SICSLogEnable(int flag) {
|
||||
iLogUsable=flag;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
void SICSLogWriteTime(char *pText, OutCode eOut, struct timeval *tp)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user