summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--protocols/Steam/src/steam_login.cpp2
-rw-r--r--protocols/Steam/src/steam_ws.cpp16
2 files changed, 9 insertions, 9 deletions
diff --git a/protocols/Steam/src/steam_login.cpp b/protocols/Steam/src/steam_login.cpp
index 702e47839a..dda672c0af 100644
--- a/protocols/Steam/src/steam_login.cpp
+++ b/protocols/Steam/src/steam_login.cpp
@@ -267,6 +267,8 @@ void CSteamProto::OnClientLogon(const CMsgClientLogonResponse &reply, const CMsg
ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)ID_STATUS_CONNECTING, m_iStatus = m_iDesiredStatus);
SendPersonaStatus(m_iStatus);
+
+ WSSend(EMsg::ClientChatGetFriendMessageHistoryForOfflineMessages, NoResponse());
}
void CSteamProto::OnClientLogoff(const CMsgClientLoggedOff &reply, const CMsgProtoBufHeader&)
diff --git a/protocols/Steam/src/steam_ws.cpp b/protocols/Steam/src/steam_ws.cpp
index 783ea22e6a..963ebf6f9d 100644
--- a/protocols/Steam/src/steam_ws.cpp
+++ b/protocols/Steam/src/steam_ws.cpp
@@ -77,15 +77,7 @@ bool CSteamProto::ServerThreadStub(const char *szHost)
void WebSocket<CSteamProto>::process(const uint8_t *buf, size_t cbLen)
{
- uint32_t dwSign = *(uint32_t *)buf;
- EMsg msgType = (EMsg)(dwSign & ~STEAM_PROTOCOL_MASK);
-
- // now process the body
- if (msgType == EMsg::Multi) {
- buf += 8; cbLen -= 8;
- p->ProcessMulti(buf, cbLen);
- }
- else p->ProcessMessage(buf, cbLen);
+ p->ProcessMessage(buf, cbLen);
}
void CSteamProto::ProcessMulti(const uint8_t *buf, size_t cbLen)
@@ -137,6 +129,12 @@ void CSteamProto::ProcessMessage(const uint8_t *buf, size_t cbLen)
return;
}
+ if (msgType == EMsg::Multi) {
+ buf += sizeof(uint32_t); cbLen -= sizeof(uint32_t);
+ ProcessMulti(buf, cbLen);
+ return;
+ }
+
if (bIsProtobuf) {
uint32_t hdrLen = *(uint32_t *)buf; buf += sizeof(uint32_t); cbLen -= sizeof(uint32_t);
auto *p = cmsg_proto_buf_header__unpack(0, hdrLen, buf);