From 4c1143795a4e0ab188e23f89ee456408fdb6da24 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 3 Jun 2012 19:17:51 +0000 Subject: sync git-svn-id: http://svn.miranda-ng.org/main/trunk@286 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/MSN/msn_threads.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'protocols/MSN/msn_threads.cpp') 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); -- cgit v1.2.3