diff options
author | George Hazan <ghazan@miranda.im> | 2020-01-13 16:48:55 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-01-13 16:48:55 +0300 |
commit | 87a2660299edd64cbb6f6c92c33683e91a6d187c (patch) | |
tree | a1b0777ec5b8afc0c49fbb66cf6a122b5ac82c6d /protocols/MSN/src | |
parent | 21f52dbfa251d171b4cc9dc315e8736da2e2be08 (diff) |
Netlib_GetHeader() - handful utility to avoid writing cycles
Diffstat (limited to 'protocols/MSN/src')
-rw-r--r-- | protocols/MSN/src/msn_auth.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/protocols/MSN/src/msn_auth.cpp b/protocols/MSN/src/msn_auth.cpp index 97b4655b9a..edfd81452f 100644 --- a/protocols/MSN/src/msn_auth.cpp +++ b/protocols/MSN/src/msn_auth.cpp @@ -1055,18 +1055,13 @@ int CMsnProto::MSN_AuthOAuth(void) mHttpsTS = clock();
if (nlhrReply2) {
char *pszURL = nullptr, *pAccessToken, *pEnd;
+
hHttpsConnection = nlhrReply2->nlc;
-
bPassportAuth = true;
if (nlhrReply2->resultCode == 302) {
/* Extract access_token from Location can be found */
- for (int i = 0; i < nlhrReply2->headersCount; i++) {
- if (!mir_strcmpi(nlhrReply2->headers[i].szName, "Location")) {
- pszURL = nlhrReply2->headers[i].szValue;
- break;
- }
- }
+ pszURL = Netlib_GetHeader(nlhrReply2, "Location");
}
else {
/* There may be a problem with login, i.e. M$ security measures. Open up browser
|