summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--protocols/SkypeWeb/src/http_request.h4
-rw-r--r--protocols/SkypeWeb/src/requests/capabilities.h9
-rw-r--r--protocols/SkypeWeb/src/skype_poll_processing.cpp22
3 files changed, 19 insertions, 16 deletions
diff --git a/protocols/SkypeWeb/src/http_request.h b/protocols/SkypeWeb/src/http_request.h
index ac556c285c..f12a5111b1 100644
--- a/protocols/SkypeWeb/src/http_request.h
+++ b/protocols/SkypeWeb/src/http_request.h
@@ -222,7 +222,7 @@ public:
: Url(*this, url), Headers(*this)
{
cbSize = sizeof(NETLIBHTTPREQUEST);
- flags = NLHRF_HTTP11 | NLHRF_SSL | NLHRF_NODUMPSEND | NLHRF_DUMPASTEXT;
+ flags = NLHRF_HTTP11 | NLHRF_SSL | NLHRF_DUMPASTEXT;
requestType = type;
}
@@ -230,7 +230,7 @@ public:
: Url(*this, urlFormat, (va_start(formatArgs, urlFormat), formatArgs)), Headers(*this)
{
cbSize = sizeof(NETLIBHTTPREQUEST);
- flags = NLHRF_HTTP11 | NLHRF_SSL | NLHRF_NODUMPSEND | NLHRF_DUMPASTEXT;
+ flags = NLHRF_HTTP11 | NLHRF_SSL | NLHRF_DUMPASTEXT;
requestType = type;
va_end(formatArgs);
}
diff --git a/protocols/SkypeWeb/src/requests/capabilities.h b/protocols/SkypeWeb/src/requests/capabilities.h
index eb972cafa5..fb7c668c20 100644
--- a/protocols/SkypeWeb/src/requests/capabilities.h
+++ b/protocols/SkypeWeb/src/requests/capabilities.h
@@ -29,18 +29,11 @@ public:
<< CHAR_VALUE("Content-Type", "application/json; charset=UTF-8")
<< FORMAT_VALUE("RegistrationToken", "registrationToken=%s", regToken);
- short bitness = 32;
char compName[MAX_COMPUTERNAME_LENGTH + 1];
DWORD size = SIZEOF(compName);
GetComputerNameA(compName, &size);
-#ifdef _WIN64
- bitness = 64;
-#endif
-
- CMStringA verString(::FORMAT, "%s x%d", g_szMirVer, bitness);
-
JSONNODE *node = json_new(5);
JSONNODE *privateInfo = json_new(5);
JSONNODE *publicInfo = json_new(5);
@@ -58,7 +51,7 @@ public:
json_push_back(publicInfo, json_new_i("typ", 125));
json_push_back(publicInfo, json_new_a("skypeNameVersion", "Miranda NG Skype"));
json_push_back(publicInfo, json_new_a("nodeInfo", "xx"));
- json_push_back(publicInfo, json_new_a("version", verString.GetBuffer()));
+ json_push_back(publicInfo, json_new_a("version", g_szMirVer));
json_push_back(node, privateInfo);
json_push_back(node, publicInfo);
diff --git a/protocols/SkypeWeb/src/skype_poll_processing.cpp b/protocols/SkypeWeb/src/skype_poll_processing.cpp
index faf073f6e1..09357b7f67 100644
--- a/protocols/SkypeWeb/src/skype_poll_processing.cpp
+++ b/protocols/SkypeWeb/src/skype_poll_processing.cpp
@@ -30,7 +30,10 @@ void CSkypeProto::ProcessEndpointPresenceRes(JSONNODE *node)
return;
//"publicInfo":{"capabilities":"","typ":"11","skypeNameVersion":"0/7.1.0.105//","nodeInfo":"","version":"24"}
+ //"privateInfo": {"epname": "Skype"}
JSONNODE *publicInfo = json_get(node, "publicInfo");
+ JSONNODE *privateInfo = json_get(node, "privateInfo");
+ CMStringA MirVer = "";
if (publicInfo != NULL)
{
ptrA skypeNameVersion(mir_t2a(ptrT(json_as_string(json_get(publicInfo, "skypeNameVersion")))));
@@ -39,7 +42,6 @@ void CSkypeProto::ProcessEndpointPresenceRes(JSONNODE *node)
if (typ != NULL)
{
int iTyp = atoi(typ);
- CMStringA MirVer = "";
switch (iTyp)
{
case 17:
@@ -84,11 +86,19 @@ void CSkypeProto::ProcessEndpointPresenceRes(JSONNODE *node)
if (iTyp == 125)
MirVer.AppendFormat(" %s", version);
else
- MirVer.AppendFormat(" %s", ParseUrl(skypeNameVersion, "/"));
-
- db_set_s(hContact, m_szModuleName, "MirVer", MirVer);
+ MirVer.AppendFormat(" %s", ParseUrl(skypeNameVersion, "/"));
}
}
+ if (privateInfo != NULL)
+ {
+ ptrA epname(mir_t2a(ptrT(json_as_string(json_get(privateInfo, "epname")))));
+ if (epname != NULL)
+ {
+ MirVer.AppendFormat(" [%s]", epname);
+ }
+ }
+
+ db_set_s(hContact, m_szModuleName, "MirVer", MirVer);
}
void CSkypeProto::ProcessUserPresenceRes(JSONNODE *node)
@@ -142,7 +152,7 @@ void CSkypeProto::ProcessNewMessageRes(JSONNODE *node)
void CSkypeProto::ProcessConversationUpdateRes(JSONNODE *node)
{
- JSONNODE *lastMessage = json_get(node, "lastMessage");
+ /*JSONNODE *lastMessage = json_get(node, "lastMessage");
JSONNODE *properties = json_get(node, "properties");
ptrA convLink(mir_t2a(json_as_string(json_get(lastMessage, "conversationLink"))));
@@ -172,7 +182,7 @@ void CSkypeProto::ProcessConversationUpdateRes(JSONNODE *node)
//SetSrmmReadStatus(hContact);
}
}
- }
+ }*/
}
void CSkypeProto::ProcessThreadUpdateRes(JSONNODE *node)