diff options
author | aunsane <aunsane@gmail.com> | 2017-12-30 19:46:10 +0300 |
---|---|---|
committer | aunsane <aunsane@gmail.com> | 2017-12-30 19:46:25 +0300 |
commit | b050c8507e79855af4163c6efe3402a63320fa23 (patch) | |
tree | 02e6d95617517f7b455a7546335acf43514c87de /protocols/Steam/src | |
parent | 585c432e2b3a39d61044999bbf04fecfdcaa6efa (diff) |
Steam: fix message sending
Diffstat (limited to 'protocols/Steam/src')
-rw-r--r-- | protocols/Steam/src/steam_messages.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/protocols/Steam/src/steam_messages.cpp b/protocols/Steam/src/steam_messages.cpp index 7374be5208..a4c8ebee94 100644 --- a/protocols/Steam/src/steam_messages.cpp +++ b/protocols/Steam/src/steam_messages.cpp @@ -31,7 +31,7 @@ void CSteamProto::OnMessageSent(const HttpResponse &response, void *arg) {
SendMessageParam *param = (SendMessageParam*)arg;
- const char *error = Translate("Unknown error");
+ std::string error = Translate("Unknown error");
ptrW steamId(getWStringA(param->hContact, "SteamID"));
time_t timestamp = NULL;
@@ -40,7 +40,7 @@ void CSteamProto::OnMessageSent(const HttpResponse &response, void *arg) JSONNode root = JSONNode::parse(response.Content);
JSONNode node = root["error"];
if (!node.isnull())
- error = node.as_string().c_str();
+ error = node.as_string();
node = root["utc_timestamp"];
if (!node.isnull())
@@ -51,10 +51,10 @@ void CSteamProto::OnMessageSent(const HttpResponse &response, void *arg) }
}
- if (mir_strcmpi(error, "OK") != 0)
+ if (mir_strcmpi(error.c_str(), "OK") != 0)
{
- debugLogA(__FUNCTION__ ": failed to send message for %s (%s)", steamId, error);
- ProtoBroadcastAck(param->hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, param->hMessage, (LPARAM)error);
+ debugLogA(__FUNCTION__ ": failed to send message for %s (%s)", steamId, error.c_str());
+ ProtoBroadcastAck(param->hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, param->hMessage, (LPARAM)error.c_str());
}
else
{
|