diff options
author | Piotr Piastucki <leech.miranda@gmail.com> | 2015-05-27 01:13:45 +0000 |
---|---|---|
committer | Piotr Piastucki <leech.miranda@gmail.com> | 2015-05-27 01:13:45 +0000 |
commit | c014bd45e4761fd8da881e4f726022fc918624b2 (patch) | |
tree | dd48c9cfe1614748b303b37035525e706e872a34 /protocols/MSN/src/msn_errors.cpp | |
parent | 7101bc5c14b738fb783dfd5a7f6f7d11762cbe2a (diff) |
Implemented fetching Skype Token for Cloud storage API.
Fixed error handling.
Implemented handling of RichText/UriObject
git-svn-id: http://svn.miranda-ng.org/main/trunk@13855 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/MSN/src/msn_errors.cpp')
-rw-r--r-- | protocols/MSN/src/msn_errors.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/protocols/MSN/src/msn_errors.cpp b/protocols/MSN/src/msn_errors.cpp index 916ce9070e..2a5752f9f7 100644 --- a/protocols/MSN/src/msn_errors.cpp +++ b/protocols/MSN/src/msn_errors.cpp @@ -28,6 +28,39 @@ int CMsnProto::MSN_HandleErrors(ThreadData* info, char* cmdString) int errorCode, packetID = -1;
sscanf(cmdString, "%d %d", &errorCode, &packetID);
+ char* params = "";
+ int trid = -1;
+
+ if (cmdString[3]) {
+ if (isdigit((BYTE)cmdString[4])) {
+ trid = strtol(cmdString + 4, ¶ms, 10);
+ switch (*params) {
+ case ' ': case '\0': case '\t': case '\n':
+ while (*params == ' ' || *params == '\t')
+ params++;
+ break;
+
+ default:
+ params = cmdString + 4;
+ }
+ }
+ else params = cmdString + 4;
+ }
+
+ union {
+ char* tWords[2];
+ struct { char *typeId, *strMsgBytes; } data;
+ };
+
+ if (sttDivideWords(params, SIZEOF(tWords), tWords) < 2) {
+ debugLogA("Invalid %.3s command, ignoring", cmdString);
+ return 0;
+ }
+
+ HReadBuffer buf(info, 0);
+ char* msgBody = (char*)buf.surelyRead(atol(data.strMsgBytes));
+
+
debugLogA("Server error:%s", cmdString);
switch (errorCode) {
|