diff options
Diffstat (limited to 'protocols/Steam/src')
| -rw-r--r-- | protocols/Steam/src/protobuf-c/protobuf-c-text.c | 2 | ||||
| -rw-r--r-- | protocols/Steam/src/protobuf-c/protobuf-c-text.h | 2 | ||||
| -rw-r--r-- | protocols/Steam/src/steam_ws.cpp | 5 |
3 files changed, 6 insertions, 3 deletions
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()); } |
