diff options
author | George Hazan <ghazan@miranda.im> | 2020-03-11 14:28:14 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-03-11 14:28:14 +0300 |
commit | 647b4697b51d8a3cf52b7c0312b6adc89e4cf395 (patch) | |
tree | 40b0c156db23439065915794adac9be987630476 /protocols | |
parent | 28de0d3f863cecdb9fb13c40abbbfa301da9ae33 (diff) |
Jabber: more fool-proof check for empty nicks
Diffstat (limited to 'protocols')
-rwxr-xr-x | protocols/JabberG/src/jabber_iqid.cpp | 4 | ||||
-rwxr-xr-x | protocols/JabberG/src/jabber_thread.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/protocols/JabberG/src/jabber_iqid.cpp b/protocols/JabberG/src/jabber_iqid.cpp index 0a40a61b8b..ae375fc6f8 100755 --- a/protocols/JabberG/src/jabber_iqid.cpp +++ b/protocols/JabberG/src/jabber_iqid.cpp @@ -277,8 +277,8 @@ void CJabberProto::OnIqResultSetAuth(const TiXmlElement *iqNode, CJabberIqInfo*) if ((type = XmlGetAttr(iqNode, "type")) == nullptr) return;
if (!mir_strcmp(type, "result")) {
- ptrA tszNick(getUStringA("Nick"));
- if (tszNick == nullptr)
+ ptrA szNick(getUStringA("Nick"));
+ if (!mir_strlen(szNick))
setUString("Nick", m_ThreadInfo->conn.username);
OnLoggedIn();
diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp index 32eb344178..5ba36d7907 100755 --- a/protocols/JabberG/src/jabber_thread.cpp +++ b/protocols/JabberG/src/jabber_thread.cpp @@ -836,7 +836,7 @@ void CJabberProto::OnProcessSuccess(const TiXmlElement *node, ThreadData *info) debugLogA("Success: Logged-in.");
ptrA szNick(getUStringA("Nick"));
- if (szNick == nullptr)
+ if (!mir_strlen(szNick))
setUString("Nick", info->conn.username);
xmlStreamInitialize("after successful sasl");
|