diff options
Diffstat (limited to 'protocols/MSN/src/msn_auth.cpp')
-rw-r--r-- | protocols/MSN/src/msn_auth.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/protocols/MSN/src/msn_auth.cpp b/protocols/MSN/src/msn_auth.cpp index 176c42f1f9..c2956d09af 100644 --- a/protocols/MSN/src/msn_auth.cpp +++ b/protocols/MSN/src/msn_auth.cpp @@ -287,10 +287,9 @@ bool SkypeToken::Refresh(bool bForce) nlhr.pData = szPOST.GetBuffer();
m_proto->mHttpsTS = clock();
- NETLIBHTTPREQUEST *nlhrReply = Netlib_HttpTransaction(m_proto->m_hNetlibUser, &nlhr);
+ NLHR_PTR nlhrReply(Netlib_HttpTransaction(m_proto->m_hNetlibUser, &nlhr));
m_proto->mHttpsTS = clock();
- bool bRet = false;
if (nlhrReply) {
m_proto->hHttpsConnection = nlhrReply->nlc;
@@ -303,14 +302,13 @@ bool SkypeToken::Refresh(bool bForce) if (tExpires == 0)
tExpires = 86400;
SetToken("skype_token " + szToken, time(0) + tExpires);
- bRet = true;
+ return true;
}
}
}
- Netlib_FreeHttpRequest(nlhrReply);
}
else m_proto->hHttpsConnection = nullptr;
- return bRet;
+ return false;
}
const char* SkypeToken::XSkypetoken()
@@ -698,7 +696,7 @@ bool CMsnProto::RefreshOAuth(const char *pszRefreshToken, const char *pszService // Query
mHttpsTS = clock();
- NETLIBHTTPREQUEST *nlhrReply = Netlib_HttpTransaction(m_hNetlibUser, &nlhr);
+ NLHR_PTR nlhrReply(Netlib_HttpTransaction(m_hNetlibUser, &nlhr));
mHttpsTS = clock();
if (nlhrReply) {
hHttpsConnection = nlhrReply->nlc;
@@ -728,7 +726,6 @@ bool CMsnProto::RefreshOAuth(const char *pszRefreshToken, const char *pszService }
}
}
- Netlib_FreeHttpRequest(nlhrReply);
}
else hHttpsConnection = nullptr;
return bRet;
|