summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElzorFox <elzorfox@ya.ru>2017-03-29 10:16:49 +0500
committerElzorFox <elzorfox@ya.ru>2017-03-29 10:16:49 +0500
commitc7ecb1ba6a82ba869ce95927d549fe4f266ffff5 (patch)
tree74f713d4559fe546946eb308281125e166f1c32b
parent4b69cb37370299462344633385da52896c7078fd (diff)
VKontakte:
add multiple files sending (simple but not optimal way) version bump
-rw-r--r--protocols/VKontakte/src/version.h2
-rw-r--r--protocols/VKontakte/src/vk_files.cpp7
2 files changed, 7 insertions, 2 deletions
diff --git a/protocols/VKontakte/src/version.h b/protocols/VKontakte/src/version.h
index db36d12655..c25b9d23d4 100644
--- a/protocols/VKontakte/src/version.h
+++ b/protocols/VKontakte/src/version.h
@@ -1,7 +1,7 @@
#define __MAJOR_VERSION 0
#define __MINOR_VERSION 1
#define __RELEASE_NUM 2
-#define __BUILD_NUM 16
+#define __BUILD_NUM 17
#include <stdver.h>
diff --git a/protocols/VKontakte/src/vk_files.cpp b/protocols/VKontakte/src/vk_files.cpp
index 6a12284933..12cc1b73eb 100644
--- a/protocols/VKontakte/src/vk_files.cpp
+++ b/protocols/VKontakte/src/vk_files.cpp
@@ -22,7 +22,7 @@ HANDLE CVkProto::SendFile(MCONTACT hContact, const wchar_t *desc, wchar_t **file
debugLogA("CVkProto::SendFile");
LONG userID = getDword(hContact, "ID", VK_INVALID_USER);
- if (!IsOnline() || ((userID == VK_INVALID_USER || userID == VK_FEED_USER) && !isChatRoom(hContact)))
+ if (!IsOnline() || ((userID == VK_INVALID_USER || userID == VK_FEED_USER) && !isChatRoom(hContact)) || !files || !files[0])
return (HANDLE)0;
CVkFileUploadParam *fup = new CVkFileUploadParam(hContact, desc, files);
@@ -51,6 +51,10 @@ HANDLE CVkProto::SendFile(MCONTACT hContact, const wchar_t *desc, wchar_t **file
}
pReq->pUserInfo = fup;
Push(pReq);
+
+ if (files[1])
+ SendFile(hContact, L"", &files[1]);
+
return (HANDLE)fup;
}
@@ -250,6 +254,7 @@ void CVkProto::OnReciveUpload(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq)
AsyncHttpRequest *pUploadReq;
ProtoBroadcastAck(fup->hContact, ACKTYPE_FILE, ACKRESULT_CONNECTED, (HANDLE)fup);
+ ProtoBroadcastAck(fup->hContact, ACKTYPE_FILE, ACKRESULT_NEXTFILE, (HANDLE)fup);
switch (fup->GetType()) {
case CVkFileUploadParam::typeImg: