diff options
Diffstat (limited to 'protocols/Steam/src')
-rw-r--r-- | protocols/Steam/src/steam_contacts.cpp | 10 | ||||
-rw-r--r-- | protocols/Steam/src/steam_proto.cpp | 44 |
2 files changed, 27 insertions, 27 deletions
diff --git a/protocols/Steam/src/steam_contacts.cpp b/protocols/Steam/src/steam_contacts.cpp index 655c0814f2..85537b886a 100644 --- a/protocols/Steam/src/steam_contacts.cpp +++ b/protocols/Steam/src/steam_contacts.cpp @@ -716,10 +716,10 @@ void CSteamProto::OnSearchByIdEnded(const NETLIBHTTPREQUEST *response, void *arg ssr.hdr.cbSize = sizeof(STEAM_SEARCH_RESULT); ssr.hdr.flags = PSR_TCHAR; - ssr.hdr.id = (TCHAR*)arg; + ssr.hdr.id.t = (TCHAR*)arg; node = json_get(nroot, "personaname"); - ssr.hdr.nick = mir_wstrdup(ptrT(json_as_string(node))); + ssr.hdr.nick.t = mir_wstrdup(ptrT(json_as_string(node))); node = json_get(nroot, "realname"); if (node != NULL) @@ -730,11 +730,11 @@ void CSteamProto::OnSearchByIdEnded(const NETLIBHTTPREQUEST *response, void *arg size_t pos = realname.find(' ', 1); if (pos != std::string::npos) { - ssr.hdr.firstName = mir_wstrdup(realname.substr(0, pos).c_str()); - ssr.hdr.lastName = mir_wstrdup(realname.substr(pos + 1).c_str()); + ssr.hdr.firstName.t = mir_wstrdup(realname.substr(0, pos).c_str()); + ssr.hdr.lastName.t = mir_wstrdup(realname.substr(pos + 1).c_str()); } else - ssr.hdr.firstName = mir_wstrdup(realname.c_str()); + ssr.hdr.firstName.t = mir_wstrdup(realname.c_str()); } } diff --git a/protocols/Steam/src/steam_proto.cpp b/protocols/Steam/src/steam_proto.cpp index f4fbfb8d65..577a896979 100644 --- a/protocols/Steam/src/steam_proto.cpp +++ b/protocols/Steam/src/steam_proto.cpp @@ -70,7 +70,7 @@ CSteamProto::~CSteamProto() MCONTACT CSteamProto::AddToList(int, PROTOSEARCHRESULT* psr) { MCONTACT hContact = NULL; - ptrA steamId(mir_u2a(psr->id)); + ptrA steamId(mir_u2a(psr->id.t)); if (psr->cbSize == sizeof(PROTOSEARCHRESULT)) { if (!FindContact(steamId)) @@ -230,10 +230,10 @@ HANDLE CSteamProto::SearchBasic(const TCHAR* id) int CSteamProto::RecvMsg(MCONTACT hContact, PROTORECVEVENT* pre) { - return (INT_PTR)AddDBEvent(hContact, EVENTTYPE_MESSAGE, pre->timestamp, DBEF_UTF, mir_strlen(pre->szMessage), (BYTE*)pre->szMessage); + return (INT_PTR)AddDBEvent(hContact, EVENTTYPE_MESSAGE, pre->timestamp, DBEF_UTF, (DWORD)mir_strlen(pre->szMessage), (BYTE*)pre->szMessage); } -int CSteamProto::SendMsg(MCONTACT hContact, int flags, const char *message) +int CSteamProto::SendMsg(MCONTACT hContact, int, const char *message) { if (!IsOnline()) { @@ -312,26 +312,26 @@ int CSteamProto::SetStatus(int new_status) requestQueue->Start(); - ptrA token(getStringA("TokenSecret"));
- if (mir_strlen(token) > 0)
- {
- PushRequest(
- new LogonRequest(token),
- &CSteamProto::OnLoggedOn);
- }
- else
- {
- ptrA username(mir_urlEncode(ptrA(mir_utf8encodeT(getTStringA("Username")))));
- if (username == NULL || username[0] == '\0')
- {
+ ptrA token(getStringA("TokenSecret")); + if (mir_strlen(token) > 0) + { + PushRequest( + new LogonRequest(token), + &CSteamProto::OnLoggedOn); + } + else + { + ptrA username(mir_urlEncode(ptrA(mir_utf8encodeT(getTStringA("Username"))))); + if (username == NULL || username[0] == '\0') + { m_iStatus = m_iDesiredStatus = ID_STATUS_OFFLINE; - ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)ID_STATUS_CONNECTING, m_iStatus);
- return 0;
- }
-
- PushRequest(
- new GetRsaKeyRequest(username),
- &CSteamProto::OnGotRsaKey);
+ ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)ID_STATUS_CONNECTING, m_iStatus); + return 0; + } + + PushRequest( + new GetRsaKeyRequest(username), + &CSteamProto::OnGotRsaKey); } } else |