diff options
Diffstat (limited to 'protocols/MSN/msn_threads.cpp')
-rw-r--r-- | protocols/MSN/msn_threads.cpp | 13 |
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);
|