From 6d08efb05a3ed58dadf7e280d4a683293961ff78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Sch=C3=BCmann?= Date: Fri, 11 Apr 2014 00:56:58 +0000 Subject: SendSS: ! translation fixes (CSendFTPFile,CSendHTTPServer) ! fixed some error handling (CSendHTTPServer,CSendImageShack) * allow silent sending with all CSend's (CSend, CSendDropbox, CSendFTPFile, CSendImageShack) we also use this for Dropbox since we don't know the upload progress * CSend's addition to r8939 (mir_freeAndNil() removed with mir_free() in some places) git-svn-id: http://svn.miranda-ng.org/main/trunk@8942 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/SendScreenshotPlus/src/CSendImageShack.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'plugins/SendScreenshotPlus/src/CSendImageShack.cpp') diff --git a/plugins/SendScreenshotPlus/src/CSendImageShack.cpp b/plugins/SendScreenshotPlus/src/CSendImageShack.cpp index 0906979e86..8bfe9c02d0 100644 --- a/plugins/SendScreenshotPlus/src/CSendImageShack.cpp +++ b/plugins/SendScreenshotPlus/src/CSendImageShack.cpp @@ -38,7 +38,6 @@ CSendImageShack::CSendImageShack(HWND Owner, MCONTACT hContact, bool bAsync) m_pszContentType = NULL; m_MFDRboundary = NULL; m_nlreply = NULL; - m_Silent = false; m_Url = NULL; } @@ -52,10 +51,10 @@ CSendImageShack::~CSendImageShack(){ //--------------------------------------------------------------------------- int CSendImageShack::Send() { - // check Netlib - if( !hNetlibUser ) { - //PrintError(1,TRUE); - return 1; + if(!hNetlibUser){ /// check Netlib + Error(SS_ERR_INIT, m_pszSendTyp); + Exit(ACKRESULT_FAILED); + return !m_bAsync; } if (!m_pszFileName) { m_pszFileName = GetFileNameA(m_pszFile); @@ -117,8 +116,9 @@ int CSendImageShack::Send() { //Now we add the file binary ($this->sendData($h)) FILE * fileId = _tfsopen(m_pszFile, _T("rb"), _SH_DENYWR ); if( !fileId) { - //PrintError(1,TRUE); - return 1; + Error(SS_ERR_INIT, m_pszSendTyp); + Exit(ACKRESULT_FAILED); + return !m_bAsync; } fseek(fileId, NULL, SEEK_END); size_t lenFile = ftell(fileId); @@ -202,11 +202,11 @@ void CSendImageShack::SendThread() { mir_freeAndNil(err); err = mir_a2t(m_nlreply->pData); } - Error(NULL, err); + Error(_T("%s"),err); mir_free(err); } }else{ - Error(NULL, TranslateT("Upload server did not respond timely.")); + Error(LPGENT("Upload server did not respond timely.")); } CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT, 0, (LPARAM) m_nlreply); m_nlreply = NULL; -- cgit v1.2.3