diff options
author | George Hazan <george.hazan@gmail.com> | 2013-07-08 22:10:14 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-07-08 22:10:14 +0000 |
commit | bb952e431866d131bae95c08e579ec8a00f00343 (patch) | |
tree | 60881668cf328b50906346c5f66ce47da2d9ad88 /plugins/HTTPServer/src/main.cpp | |
parent | c181af64bab27eb50e684c64c0a3caa49f8bbe39 (diff) |
core protocol helpers for creating protocol evengs, services & threads
git-svn-id: http://svn.miranda-ng.org/main/trunk@5286 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/HTTPServer/src/main.cpp')
-rw-r--r-- | plugins/HTTPServer/src/main.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/HTTPServer/src/main.cpp b/plugins/HTTPServer/src/main.cpp index f6bd92563a..b59587737e 100644 --- a/plugins/HTTPServer/src/main.cpp +++ b/plugins/HTTPServer/src/main.cpp @@ -127,7 +127,7 @@ bool bOpenLogFile() { bool bWriteToFile(HANDLE hFile, const char * pszSrc, int nLen = -1) {
if (nLen < 0)
- nLen = strlen(pszSrc);
+ nLen = (int)strlen(pszSrc);
DWORD dwBytesWritten;
return WriteFile(hFile, pszSrc, nLen, &dwBytesWritten, NULL) && (dwBytesWritten == (DWORD)nLen);
}
@@ -162,9 +162,9 @@ void LogEvent(const TCHAR * pszTitle, const char * pszLog) { char szTmp[128];
time_t now;
time(&now);
- int nLen = strftime(szTmp, sizeof(szTmp), "%d-%m-%Y %H:%M:%S -- ", localtime(&now));
+ int nLen = (int)strftime(szTmp, sizeof(szTmp), "%d-%m-%Y %H:%M:%S -- ", localtime(&now));
- int nLogLen = strlen(pszLog);
+ int nLogLen = (int)strlen(pszLog);
while (nLogLen > 0 && (pszLog[nLogLen-1] == '\r' || pszLog[nLogLen-1] == '\n'))
nLogLen--;
@@ -242,7 +242,7 @@ bool bReadConfigurationFile() { // move rest of buffer to front
if (pszCurPos && pszCurPos != szBuf) {
- dwBytesInBuffer = sizeof(szBuf) - (pszCurPos - szBuf);
+ dwBytesInBuffer = DWORD(sizeof(szBuf) - (pszCurPos - szBuf));
memmove(szBuf, pszCurPos, dwBytesInBuffer);
}
@@ -915,7 +915,7 @@ int nSystemShutdown(WPARAM /*wparam*/, LPARAM /*lparam*/) { return 1;
}
- nPluginPathLen = strlen(szPluginPath);
+ nPluginPathLen = (int)strlen(szPluginPath);
sLogFilePath = szPluginPath;
sLogFilePath += "HTTPServer.log";
|