diff options
author | George Hazan <ghazan@miranda.im> | 2018-09-04 18:54:25 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-09-04 18:54:25 +0300 |
commit | fa38c0bf4a5fec438cd5d614c69b444e01cc1e3e (patch) | |
tree | bc6681520220562eede0e0f7185b3d90f1fca587 /plugins/SendScreenshotPlus/src/CSendHTTPServer.cpp | |
parent | a5ab3760f487dfd5c34ff561a472bda29671f2a4 (diff) |
old ugly C-like calls replaced with CMStringA
Diffstat (limited to 'plugins/SendScreenshotPlus/src/CSendHTTPServer.cpp')
-rw-r--r-- | plugins/SendScreenshotPlus/src/CSendHTTPServer.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/plugins/SendScreenshotPlus/src/CSendHTTPServer.cpp b/plugins/SendScreenshotPlus/src/CSendHTTPServer.cpp index 3d24f10054..c0e9978259 100644 --- a/plugins/SendScreenshotPlus/src/CSendHTTPServer.cpp +++ b/plugins/SendScreenshotPlus/src/CSendHTTPServer.cpp @@ -38,14 +38,12 @@ CSendHTTPServer::CSendHTTPServer(HWND Owner, MCONTACT hContact, bool /*bAsync*/) m_EnableItem = SS_DLG_DESCRIPTION; //| SS_DLG_AUTOSEND | SS_DLG_DELETEAFTERSSEND; m_pszSendTyp = LPGENW("HTTPServer transfer"); m_pszFileName = nullptr; - m_fsi_pszSrvPath = nullptr; m_fsi_pszRealPath = nullptr; } CSendHTTPServer::~CSendHTTPServer() { mir_free(m_pszFileName); - mir_free(m_fsi_pszSrvPath); mir_free(m_fsi_pszRealPath); } @@ -63,15 +61,15 @@ int CSendHTTPServer::Send() if (!m_pszFileName) { m_pszFileName = GetFileNameA(m_pszFile); } - mir_freeAndNil(m_fsi_pszSrvPath); - mir_stradd(m_fsi_pszSrvPath, "/"); - mir_stradd(m_fsi_pszSrvPath, m_pszFileName); + + m_fsi_pszSrvPath.Empty(); + m_fsi_pszSrvPath.AppendChar('/'); + m_fsi_pszSrvPath.Append(m_pszFileName); replaceStr(m_fsi_pszRealPath, _T2A(m_pszFile)); memset(&m_fsi, 0, sizeof(m_fsi)); m_fsi.lStructSize = sizeof(STFileShareInfo); - m_fsi.pszSrvPath = m_fsi_pszSrvPath; m_fsi.nMaxDownloads = -1; // -1 = infinite m_fsi.pszRealPath = m_fsi_pszRealPath; @@ -88,8 +86,7 @@ void CSendHTTPServer::SendThread() //patched plugin version ret = CallService(MS_HTTP_ADD_CHANGE_REMOVE, (WPARAM)m_hContact, (LPARAM)&m_fsi); if (!ret) { - mir_free(m_URL); - m_URL = (char*)CallService(MS_HTTP_GET_LINK, (WPARAM)m_fsi.pszSrvPath, NULL); + m_URL = ptrA((char*)CallService(MS_HTTP_GET_LINK, (WPARAM)m_fsi.pszSrvPath, 0)); } } else { |