diff options
author | George Hazan <george.hazan@gmail.com> | 2015-01-29 13:41:23 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-01-29 13:41:23 +0000 |
commit | c4562ac53bba7b587af2fcb5eebd6051b11d1f04 (patch) | |
tree | 0485d1182ebfd7c8d665c8afb9fef02fa3a8cbce /protocols/WhatsApp/src/connection.cpp | |
parent | e925caad25e01600e61de2e909d63037dd574a6e (diff) |
- two new's replaced with aggregates
- member's name unification
git-svn-id: http://svn.miranda-ng.org/main/trunk@11948 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/WhatsApp/src/connection.cpp')
-rw-r--r-- | protocols/WhatsApp/src/connection.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/protocols/WhatsApp/src/connection.cpp b/protocols/WhatsApp/src/connection.cpp index e53d7848e8..1ff049ae6d 100644 --- a/protocols/WhatsApp/src/connection.cpp +++ b/protocols/WhatsApp/src/connection.cpp @@ -22,14 +22,14 @@ void WhatsAppProto::stayConnectedLoop(void*) NotifyEvent(m_tszUserName, TranslateT("Please enter a phone number without country code."), NULL, WHATSAPP_EVENT_CLIENT);
return;
}
- this->phoneNumber = cc + in;
- this->jid = this->phoneNumber + "@s.whatsapp.net";
+ m_szPhoneNumber = cc + in;
+ m_szJid = m_szPhoneNumber + "@s.whatsapp.net";
if (!getString(WHATSAPP_KEY_NICK, &dbv)) {
- this->nick = dbv.pszVal;
+ m_szNick = dbv.pszVal;
db_free(&dbv);
}
- if (this->nick.empty()) {
+ if (m_szNick.empty()) {
NotifyEvent(m_tszUserName, TranslateT("Please enter a nickname."), NULL, WHATSAPP_EVENT_CLIENT);
return;
}
@@ -83,15 +83,14 @@ void WhatsAppProto::stayConnectedLoop(void*) portNumber = 5222, resource += "-5222";
this->conn = new WASocketConnection("c.whatsapp.net", portNumber);
- m_pConnection = new WAConnection(this->phoneNumber, resource, &this->connMutex, this, this);
- m_pConnection->init(&writerMutex, this->conn);
+ m_pConnection = new WAConnection(m_szPhoneNumber, resource, &this->connMutex, &writerMutex, this->conn, this, this);
{
WALogin login(m_pConnection, password);
m_Challenge = login.login(m_Challenge);
m_pConnection->setLogin(&login);
}
- m_pConnection->nick = this->nick;
+ m_pConnection->nick = m_szNick;
m_pConnection->setVerboseId(true);
if (m_iDesiredStatus != ID_STATUS_INVISIBLE)
m_pConnection->sendAvailableForChat();
|