summaryrefslogtreecommitdiff
path: root/plugins/SendScreenshotPlus/src/CSendImageShack.cpp
diff options
context:
space:
mode:
authorRené Schümann <white06tiger@gmail.com>2014-04-11 00:56:58 +0000
committerRené Schümann <white06tiger@gmail.com>2014-04-11 00:56:58 +0000
commit6d08efb05a3ed58dadf7e280d4a683293961ff78 (patch)
tree6dfe2104a80d07b89d68b99691b905d2e6c57d6c /plugins/SendScreenshotPlus/src/CSendImageShack.cpp
parent577556ad930d4302e51cfeda256ce3a9898bea86 (diff)
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
Diffstat (limited to 'plugins/SendScreenshotPlus/src/CSendImageShack.cpp')
-rw-r--r--plugins/SendScreenshotPlus/src/CSendImageShack.cpp18
1 files changed, 9 insertions, 9 deletions
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;