From ce10ea25b750f23c558a5920cd2b21d00212776a Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 30 Aug 2015 20:26:04 +0000 Subject: - all wrongly used macroses replaced with correcc ones; - version bump git-svn-id: http://svn.miranda-ng.org/main/trunk@15122 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/HTTPServer/src/HttpUser.cpp | 34 ++++++++++------------------------ plugins/HTTPServer/src/Version.h | 14 +++++++------- 2 files changed, 17 insertions(+), 31 deletions(-) diff --git a/plugins/HTTPServer/src/HttpUser.cpp b/plugins/HTTPServer/src/HttpUser.cpp index 99c8113042..ede33c5722 100644 --- a/plugins/HTTPServer/src/HttpUser.cpp +++ b/plugins/HTTPServer/src/HttpUser.cpp @@ -314,7 +314,7 @@ void CLHttpUser::SendRedir(int iErrorCode, const char * pszError, const char * p "\n" "\r\n" "\r\n", - iErrorCode, pszError, szCurrTime, PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM), pszRedirect, iErrorCode, pszError, pszError, pszDescription, PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM)); + iErrorCode, pszError, szCurrTime, __VERSION_STRING_DOTS, pszRedirect, iErrorCode, pszError, pszError, pszDescription, __VERSION_STRING_DOTS); Netlib_Send(hConnection, szBuff, dwBytesToWrite, 0); } @@ -628,7 +628,8 @@ bool CLHttpUser::bProcessGetRequest(char * pszRequest, bool bIsGetCommand) return true; } - const char szHttpPartial[] = "HTTP/1.1 206 Partial Content\r\n" + dwBytesToWrite = mir_snprintf(szBuf, + "HTTP/1.1 206 Partial Content\r\n" "Connection: Keep-Alive\r\n" "Date: %s\r\n" "Server: MirandaWeb/%s\r\n" @@ -638,21 +639,13 @@ bool CLHttpUser::bProcessGetRequest(char * pszRequest, bool bIsGetCommand) "Content-Type: %s\r\n" "Content-Range: bytes %d-%d/%d\r\n" "Last-Modified: %s\r\n" - "\r\n"; - - dwBytesToWrite = mir_snprintf(szBuf, szHttpPartial, - szCurTime, - PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM), - szETag, - dwDataToSend, - pszGetMimeType(pszRealPath), - dwFileStart, - (dwFileStart + dwDataToSend - 1), - nDataSize, - szFileTime); + "\r\n", + szCurTime, __VERSION_STRING_DOTS, szETag, dwDataToSend, pszGetMimeType(pszRealPath), + dwFileStart, (dwFileStart + dwDataToSend - 1), nDataSize, szFileTime); } else { - const char szHttpOk[] = "HTTP/1.1 200 OK\r\n" + dwBytesToWrite = mir_snprintf(szBuf, + "HTTP/1.1 200 OK\r\n" "Connection: Keep-Alive\r\n" "Date: %s\r\n" "Server: MirandaWeb/%s\r\n" @@ -661,15 +654,8 @@ bool CLHttpUser::bProcessGetRequest(char * pszRequest, bool bIsGetCommand) "Content-Length: %d\r\n" "Content-Type: %s\r\n" "Last-Modified: %s\r\n" - "\r\n"; - - dwBytesToWrite = mir_snprintf(szBuf, szHttpOk, - szCurTime, - PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM), - szETag, - nDataSize, - pszGetMimeType(pszRealPath), - szFileTime); + "\r\n", + szCurTime, __VERSION_STRING_DOTS, szETag, nDataSize, pszGetMimeType(pszRealPath), szFileTime); } Netlib_Send(hConnection, szBuf, dwBytesToWrite, 0); diff --git a/plugins/HTTPServer/src/Version.h b/plugins/HTTPServer/src/Version.h index 76c4b8d3db..8f3121b41b 100644 --- a/plugins/HTTPServer/src/Version.h +++ b/plugins/HTTPServer/src/Version.h @@ -1,14 +1,14 @@ -#define __MAJOR_VERSION 0 -#define __MINOR_VERSION 1 +#define __MAJOR_VERSION 0 +#define __MINOR_VERSION 1 #define __RELEASE_NUM 2 -#define __BUILD_NUM 2 +#define __BUILD_NUM 3 #include #define __PLUGIN_NAME "HTTPServer" #define __FILENAME "HTTPServer.dll" -#define __DESCRIPTION "HTTP Web Server plugin for Miranda." -#define __AUTHOR "Kennet Nielsen, modified by Vampik, Houdini" +#define __DESCRIPTION "HTTP Web Server plugin for Miranda." +#define __AUTHOR "Kennet Nielsen, modified by Vampik, Houdini" #define __AUTHOREMAIL "" -#define __AUTHORWEB "http://miranda-ng.org/p/HTTPServer/" -#define __COPYRIGHT "© 2003-2009 Kennet Nielsen, Vampik, Houdini" +#define __AUTHORWEB "http://miranda-ng.org/p/HTTPServer/" +#define __COPYRIGHT "© 2003-2009 Kennet Nielsen, Vampik, Houdini" -- cgit v1.2.3