summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--protocols/Steam/Steam.vcxproj1
-rw-r--r--protocols/Steam/Steam.vcxproj.filters3
-rw-r--r--protocols/Steam/src/protobuf-c/protobuf-c-text.c2
-rw-r--r--protocols/Steam/src/protobuf-c/protobuf-c-text.h2
-rw-r--r--protocols/Steam/src/steam_ws.cpp5
5 files changed, 10 insertions, 3 deletions
diff --git a/protocols/Steam/Steam.vcxproj b/protocols/Steam/Steam.vcxproj
index 1aaa47b8d4..d126cc98d7 100644
--- a/protocols/Steam/Steam.vcxproj
+++ b/protocols/Steam/Steam.vcxproj
@@ -88,6 +88,7 @@
<ClInclude Include="src\api\session.h" />
<ClInclude Include="src\proto.h" />
<ClInclude Include="src\protobuf-c\enums.pb-c.h" />
+ <ClInclude Include="src\protobuf-c\protobuf-c-text.h" />
<ClInclude Include="src\protobuf-c\protobuf-c.h" />
<ClInclude Include="src\protobuf-c\steammessages_auth.steamclient.pb-c.h" />
<ClInclude Include="src\protobuf-c\steammessages_base.pb-c.h" />
diff --git a/protocols/Steam/Steam.vcxproj.filters b/protocols/Steam/Steam.vcxproj.filters
index 5d66d86de2..b0551b6245 100644
--- a/protocols/Steam/Steam.vcxproj.filters
+++ b/protocols/Steam/Steam.vcxproj.filters
@@ -170,6 +170,9 @@
<ClInclude Include="src\protobuf-c\steammessages_friendmessages.steamclient.pb-c.h">
<Filter>Source Files\protobuf</Filter>
</ClInclude>
+ <ClInclude Include="src\protobuf-c\protobuf-c-text.h">
+ <Filter>Source Files\protobuf</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="res\Resource.rc">
diff --git a/protocols/Steam/src/protobuf-c/protobuf-c-text.c b/protocols/Steam/src/protobuf-c/protobuf-c-text.c
index 6cbc9b46e7..7c7f82001b 100644
--- a/protocols/Steam/src/protobuf-c/protobuf-c-text.c
+++ b/protocols/Steam/src/protobuf-c/protobuf-c-text.c
@@ -490,7 +490,7 @@ protobuf_c_text_to_string_internal(ReturnString *rs,
/* See .h file for API docs. */
char *
-protobuf_c_text_to_string(ProtobufCMessage *m,
+protobuf_c_text_to_string(const ProtobufCMessage *m,
ProtobufCAllocator *allocator)
{
ReturnString rs = { 0, 0, 0, NULL };
diff --git a/protocols/Steam/src/protobuf-c/protobuf-c-text.h b/protocols/Steam/src/protobuf-c/protobuf-c-text.h
index bb3539737d..d921b21d08 100644
--- a/protocols/Steam/src/protobuf-c/protobuf-c-text.h
+++ b/protocols/Steam/src/protobuf-c/protobuf-c-text.h
@@ -149,7 +149,7 @@ typedef struct _ProtobufCTextError {
* \endcode
* Though technically \c free(retval); is probably sufficient.
*/
-extern char *protobuf_c_text_to_string(ProtobufCMessage *m,
+extern char *protobuf_c_text_to_string(const ProtobufCMessage *m,
ProtobufCAllocator *allocator);
/** Import a text format protobuf from a string into a \c ProtobufCMessage.
diff --git a/protocols/Steam/src/steam_ws.cpp b/protocols/Steam/src/steam_ws.cpp
index f22587eca4..b84baf95e8 100644
--- a/protocols/Steam/src/steam_ws.cpp
+++ b/protocols/Steam/src/steam_ws.cpp
@@ -207,6 +207,10 @@ void CSteamProto::WSSend(EMsg msgType, const ProtobufCppMessage &msg)
void CSteamProto::WSSendHeader(EMsg msgType, const CMsgProtoBufHeader &hdr, const ProtobufCppMessage &msg)
{
+ auto *pszText = protobuf_c_text_to_string(&msg, 0);
+ debugLogA("Message sent: %s\r\n%s", msg.descriptor->c_name, pszText);
+ free(pszText);
+
uint32_t hdrLen = (uint32_t)protobuf_c_message_get_packed_size(&hdr);
MBinBuffer hdrbuf(hdrLen);
protobuf_c_message_pack(&hdr, (uint8_t *)hdrbuf.data());
@@ -220,7 +224,6 @@ void CSteamProto::WSSendHeader(EMsg msgType, const CMsgProtoBufHeader &hdr, cons
protobuf_c_message_pack(&msg, body.data());
hdrbuf.append(body);
- Netlib_Dump(HNETLIBCONN(m_ws->getConn()), hdrbuf.data(), hdrbuf.length(), true, 0);
m_ws->sendBinary(hdrbuf.data(), hdrbuf.length());
}