diff options
author | Piotr Piastucki <leech.miranda@gmail.com> | 2015-05-14 15:24:53 +0000 |
---|---|---|
committer | Piotr Piastucki <leech.miranda@gmail.com> | 2015-05-14 15:24:53 +0000 |
commit | b7a1174511c3b7fad5b81a54bb4647662d94031c (patch) | |
tree | 91b3f36fd78ae9b481cb11d8602e61a79c388d04 /protocols/MSN/src/msn_ftold.cpp | |
parent | 01b66588ca510b49be5a06d2bfb5bd28b4416030 (diff) |
Updated for partial MSNP24 protocol support, for detailed changes see MSNP24 branch.
git-svn-id: http://svn.miranda-ng.org/main/trunk@13589 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/MSN/src/msn_ftold.cpp')
-rw-r--r-- | protocols/MSN/src/msn_ftold.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/protocols/MSN/src/msn_ftold.cpp b/protocols/MSN/src/msn_ftold.cpp index 305e6319b7..c921ae3e11 100644 --- a/protocols/MSN/src/msn_ftold.cpp +++ b/protocols/MSN/src/msn_ftold.cpp @@ -295,9 +295,12 @@ void __cdecl CMsnProto::msnftp_sendFileThread(void* arg) }
}
- if (info->mBytesInData == sizeof(info->mData)) {
- debugLogA("sizeof(data) is too small: the longest line won't fit");
- break;
+ if (info->mBytesInData == info->mDataSize) {
+ char *mData = (char*)mir_realloc(info->mData, (info->mDataSize*=2)+1);
+ if (mData) info->mData = mData; else {
+ debugLogA("sizeof(data) is too small: the longest line won't fit");
+ break;
+ }
}
}
@@ -333,8 +336,7 @@ void CMsnProto::msnftp_startFileSend(ThreadData* info, const char* Invcommand, c else
hostname[0] = 0;
- char command[1024];
- int nBytes = mir_snprintf(command, SIZEOF(command),
+ info->sendPacketPayload("MSG", "N",
"MIME-Version: 1.0\r\n"
"Content-Type: text/x-msmsgsinvite; charset=UTF-8\r\n\r\n"
"Invitation-Command: %s\r\n"
@@ -352,8 +354,6 @@ void CMsnProto::msnftp_startFileSend(ThreadData* info, const char* Invcommand, c nlb.wExPort, nlb.wExPort ^ 0x3141, nlb.wPort ^ 0x3141,
MSN_GenRandom());
- info->sendPacket("MSG", "N %d\r\n%s", nBytes, command);
-
if (sb) {
ThreadData* newThread = new ThreadData;
newThread->mType = SERVER_FILETRANS;
|