summaryrefslogtreecommitdiff
path: root/protocols/VKontakte/src/misc.cpp
diff options
context:
space:
mode:
authorSergey Bolhovskoy <elzorfox@ya.ru>2014-10-07 04:47:23 +0000
committerSergey Bolhovskoy <elzorfox@ya.ru>2014-10-07 04:47:23 +0000
commit00714f1a92044866135cd75e599ff3fac75fe33f (patch)
treeda70b71498faa719e6a0f9650d8114e9e117e7e8 /protocols/VKontakte/src/misc.cpp
parent251e7759f31dbf3c8a199766b5d341342af77992 (diff)
VKontakte:
rename FileUploadParam => CVkFileUploadParam add processing file upload errors git-svn-id: http://svn.miranda-ng.org/main/trunk@10722 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src/misc.cpp')
-rw-r--r--protocols/VKontakte/src/misc.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp
index 50ffe7a86b..9d299a31cc 100644
--- a/protocols/VKontakte/src/misc.cpp
+++ b/protocols/VKontakte/src/misc.cpp
@@ -100,6 +100,8 @@ bool CVkProto::CheckJsonResult(AsyncHttpRequest *pReq, NETLIBHTTPREQUEST *reply,
int iErrorCode = json_as_int(pErrorCode);
debugLogA("CVkProto::CheckJsonResult %d", iErrorCode);
+ CVkFileUploadParam * fup = (CVkFileUploadParam *)pReq->pUserInfo;
+ CVkSendMsgParam *param = (CVkSendMsgParam*)pReq->pUserInfo;
switch (iErrorCode){
case VKERR_AUTHORIZATION_FAILED:
ConnectionFailed(LOGINERR_WRONGPASSWORD);
@@ -107,6 +109,17 @@ bool CVkProto::CheckJsonResult(AsyncHttpRequest *pReq, NETLIBHTTPREQUEST *reply,
case VKERR_CAPTCHA_NEEDED:
ApplyCaptcha(pReq, pError);
break;
+ case VKERR_COULD_NOT_SAVE_FILE:
+ case VKERR_INVALID_ALBUM_ID:
+ case VKERR_INVALID_SERVER:
+ case VKERR_INVALID_HASH:
+ case VKERR_INVALID_AUDIO:
+ case VKERR_AUDIO_DEL_COPYRIGHT:
+ case VKERR_INVALID_FILENAME:
+ case VKERR_INVALID_FILESIZE:
+ if (fup)
+ fup->iErrorCode = iErrorCode;
+ break;
case VKERR_UNKNOWN:
case VKERR_TOO_MANY_REQ_PER_SEC:
case VKERR_FLOOD_CONTROL:
@@ -125,7 +138,6 @@ bool CVkProto::CheckJsonResult(AsyncHttpRequest *pReq, NETLIBHTTPREQUEST *reply,
case VKERR_HIMSELF_AS_FRIEND:
case VKERR_YOU_ON_BLACKLIST:
case VKERR_USER_ON_BLACKLIST:
- CVkSendMsgParam *param = (CVkSendMsgParam*)pReq->pUserInfo;
if (param)
param->iCount = iErrorCode;
break;
@@ -141,7 +153,6 @@ void CVkProto::OnReceiveSmth(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq)
debugLogA("CVkProto::OnReceiveSmth %s", json_as_string(pResponse));
}
-
/////////////////////////////////////////////////////////////////////////////////////////
static IconItem iconList[] =