diff options
author | leecher1337 <leecher@dose.0wnz.at> | 2016-12-07 21:39:25 +0100 |
---|---|---|
committer | leecher1337 <leecher@dose.0wnz.at> | 2016-12-07 21:39:25 +0100 |
commit | f4375028eae5442720c07f59a74f5739c9dcc865 (patch) | |
tree | 35af3f2882599bef48436fab3be678d5dd160ccb /protocols | |
parent | 15f871ebb43e49f96e8f7e2ec95359bc0a05545f (diff) |
MSN: Support for File.1 type file transfers.
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/MSN/src/msn_commands.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/protocols/MSN/src/msn_commands.cpp b/protocols/MSN/src/msn_commands.cpp index 984c65e2cf..86824b85c6 100644 --- a/protocols/MSN/src/msn_commands.cpp +++ b/protocols/MSN/src/msn_commands.cpp @@ -483,7 +483,7 @@ void CMsnProto::MSN_ProcessURIObject(MCONTACT hContact, ezxml_t xmli) if (nlhrReply->resultCode == 200) {
char *pLength, *pEnd;
- if ((pLength = strstr(nlhrReply->pData, "\"contents\":")) && (pLength = strstr(pLength, "\"imgpsh\"")) &&
+ if ((pLength = strstr(nlhrReply->pData, "\"contents\":")) &&
(pLength = strstr(pLength, "\"length\":")) && (pEnd = strchr(pLength+9, ','))) {
pLength+=9;
*pEnd = 0;
@@ -496,7 +496,7 @@ void CMsnProto::MSN_ProcessURIObject(MCONTACT hContact, ezxml_t xmli) if (fileSize) {
filetransfer* ft = new filetransfer(this);
- char *pszFile = "";
+ char *pszFile = "", *pszType;
ezxml_t originalName, desc;
ft->std.hContact = hContact;
@@ -517,7 +517,10 @@ void CMsnProto::MSN_ProcessURIObject(MCONTACT hContact, ezxml_t xmli) ft->std.totalBytes = ft->std.currentFileSize = fileSize;
ft->std.totalFiles = 1;
ft->szInvcookie = (char*)mir_calloc(strlen(uri)+16);
- sprintf(ft->szInvcookie, "%s/content/imgpsh", uri);
+ if ((pszType = (char*)ezxml_attr(xmli, "type")) && !mir_strcmp(pszType, "File.1"))
+ sprintf(ft->szInvcookie, "%s/content/original", uri);
+ else
+ sprintf(ft->szInvcookie, "%s/content/imgpsh", uri);
wchar_t tComment[40];
mir_snwprintf(tComment, TranslateT("%I64u bytes"), ft->std.currentFileSize);
|