if(! GetSystemDirectory(Sys, MAX_PATH))
{
LogEvent(_T("QOTD: Getting system path failed.\n"), 0, TRUE);
- ExitThread(-1);
+ ExitThread(1);
}
_tcscat(Sys, FilePath);
_stprintf(buf, _T("QOTD: Error opening quote file : %s\n"), Sys);
LogEvent(buf, 0, TRUE);
LogEvent(_T("QOTD: Terminating thread\n"), 0, FALSE);
- ExitThread(-1);
+ ExitThread(1);
}
/* read all quotes in the file into an array */
{
LogEvent(_T("QOTD: Connection shutdown failed\n"), 0, FALSE);
LogEvent(_T("QOTD: Terminating thread\n"), 0, FALSE);
- ExitThread(-1);
+ ExitThread(1);
}
LogEvent(_T("QOTD: Terminating thread\n"), 0, FALSE);
INT StringSize;
INT RetVal;
- StringSize = strlen(Quote);
+ StringSize = (INT)_tcsclen(Quote);
RetVal = send(Sock, Quote, sizeof(TCHAR) * StringSize, 0);
if (RetVal == SOCKET_ERROR)