summaryrefslogtreecommitdiff
path: root/protocols/MSN/msn_threads.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-06-03 19:17:51 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-06-03 19:17:51 +0000
commit4c1143795a4e0ab188e23f89ee456408fdb6da24 (patch)
treec86c49ab0bceb32a67336805a37dfd1470e8fa02 /protocols/MSN/msn_threads.cpp
parent31ad5a2b294f59b5a64a8e7d8383669baeb7fdd0 (diff)
sync
git-svn-id: http://svn.miranda-ng.org/main/trunk@286 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/MSN/msn_threads.cpp')
-rw-r--r--protocols/MSN/msn_threads.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/protocols/MSN/msn_threads.cpp b/protocols/MSN/msn_threads.cpp
index f312fcdc01..3581f9afad 100644
--- a/protocols/MSN/msn_threads.cpp
+++ b/protocols/MSN/msn_threads.cpp
@@ -747,24 +747,25 @@ void ThreadData::getGatewayUrl(char* dest, int destlen, bool isPoll)
mir_snprintf(dest, destlen, isPoll ? pollFmtStr : cmdFmtStr, mGatewayIP, mSessionID);
}
-void ThreadData::processSessionData(const char* str)
+void ThreadData::processSessionData(const char* xMsgr, const char* xHost)
{
- char tSessionID[40], tGateIP[40];
+ char tSessionID[40], tGateIP[80];
- char* tDelim = (char*)strchr(str, ';');
+ char* tDelim = (char*)strchr(xMsgr, ';');
if (tDelim == NULL)
return;
*tDelim = 0; tDelim += 2;
- if (!sscanf(str, "SessionID=%s", tSessionID))
+ if (!sscanf(xMsgr, "SessionID=%s", tSessionID))
return;
char* tDelim2 = strchr(tDelim, ';');
if (tDelim2 != NULL)
*tDelim2 = '\0';
-
- if (!sscanf(tDelim, "GW-IP=%s", tGateIP))
+ if (xHost)
+ strcpy(tGateIP, xHost);
+ else if (!sscanf(tDelim, "GW-IP=%s", tGateIP))
return;
strcpy(mGatewayIP, tGateIP);