I've got a problem with the following code:
if (bLesResent == TRUE) // Set in ResendLesThread - okay
{
CheckSODFile(); //Problem line
ConsolePrintf( " bStartOfDay = %d bLesResent = %d\n",
bStartOfDay, bLesResent );
}
void CheckSODFile(void)
{
if(access( REDISTRIBUTEFILE, 0 ) != -1 )
{
ConsolePrintf( "%s exists\n", REDISTRIBUTEFILE );
bStartOfDay = TRUE; // if the file is there - set to True
}
else
ConsolePrintf( "Cannot find %s\n", REDISTRIBUTEFILE );
return;
}
If I do CheckSODFile where it is above, it cannot find the file. If I do it before checking bLesResent - before the 1st IF, it can find the file.
I'm a little confused? Any thoughts?
Cheers



LinkBack URL
About LinkBacks


