diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-06 22:28:16 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-06 22:28:16 +0000 |
commit | 387259e6c1c0efb36d4b849b837f2709f061391d (patch) | |
tree | 08976c712a55710c9b3eaa9fea8b4bac048f219b /protocols/SkypeWeb/src/skype_poll_processing.cpp | |
parent | eefc7846e7379932910cf60d0fceff56f8029478 (diff) |
dozen of mem leaks fixed in SkypeWeb
git-svn-id: http://svn.miranda-ng.org/main/trunk@14034 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/skype_poll_processing.cpp')
-rw-r--r-- | protocols/SkypeWeb/src/skype_poll_processing.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/protocols/SkypeWeb/src/skype_poll_processing.cpp b/protocols/SkypeWeb/src/skype_poll_processing.cpp index cfb1d1dc69..fe6c892147 100644 --- a/protocols/SkypeWeb/src/skype_poll_processing.cpp +++ b/protocols/SkypeWeb/src/skype_poll_processing.cpp @@ -21,8 +21,8 @@ void CSkypeProto::ProcessEndpointPresenceRes(const JSONNode &node) {
debugLogA("CSkypeProto::ProcessEndpointPresenceRes");
std::string selfLink = node["selfLink"].as_string();
- ptrA skypename(ContactUrlToName(selfLink.c_str()));
- if (skypename == NULL)
+ CMStringA skypename(ContactUrlToName(selfLink.c_str()));
+ if (skypename.IsEmpty())
return;
MCONTACT hContact = FindContact(skypename);
@@ -83,10 +83,11 @@ void CSkypeProto::ProcessEndpointPresenceRes(const JSONNode &node) break;
}
}
+ MirVer.AppendChar(' ');
if (iTyp == 125)
- MirVer.AppendFormat(" %s", version);
+ MirVer.Append(version.c_str());
else
- MirVer.AppendFormat(" %s", ParseUrl(skypeNameVersion.c_str(), "/"));
+ MirVer.Append(ParseUrl(skypeNameVersion.c_str(), "/"));
}
}
if (privateInfo != NULL)
@@ -106,7 +107,7 @@ void CSkypeProto::ProcessUserPresenceRes(const JSONNode &node) std::string selfLink = node["selfLink"].as_string();
std::string status = node["status"].as_string();
- ptrA skypename;
+ CMStringA skypename;
if (selfLink.find("/8:") != std::string::npos)
{
@@ -117,7 +118,7 @@ void CSkypeProto::ProcessUserPresenceRes(const JSONNode &node) skypename = SelfUrlToName(selfLink.c_str());
}
- if (skypename != NULL)
+ if (!skypename.IsEmpty())
{
if (IsMe(skypename))
{
|