summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--protocols/EmLanProto/src/mlan.cpp4
-rw-r--r--protocols/EmLanProto/src/mlan.h9
2 files changed, 7 insertions, 6 deletions
diff --git a/protocols/EmLanProto/src/mlan.cpp b/protocols/EmLanProto/src/mlan.cpp
index 639bb0a0e9..097ddcdf89 100644
--- a/protocols/EmLanProto/src/mlan.cpp
+++ b/protocols/EmLanProto/src/mlan.cpp
@@ -203,7 +203,7 @@ void CMLan::SendPacketExt(TPacket& pak, u_long addr)
delete[] buf;
}
-MCONTACT CMLan::FindContact(in_addr addr, const char* nick, bool add_to_list, bool make_permanent, bool make_visible, u_int status)
+MCONTACT CMLan::FindContact(in_addr addr, const char *nick, bool add_to_list, bool make_permanent, bool make_visible, u_int status)
{
for (auto &res : Contacts(PROTONAME)) {
u_long caddr = db_get_dw(res, PROTONAME, "ipaddr", -1);
@@ -397,7 +397,7 @@ INT_PTR CMLan::AddToContactList(u_int flags, EMPSEARCHRESULT *psr)
bool TempAdd = flags&PALF_TEMPORARY;
- MCONTACT contact = FindContact(addr, psr->nick.a, true, !TempAdd, !TempAdd, psr->stat);
+ MCONTACT contact = FindContact(addr, _T2A(psr->nick.w), true, !TempAdd, !TempAdd, psr->stat);
if (contact != NULL) {
db_set_w(contact, PROTONAME, "Status", psr->stat);
db_set_w(contact, PROTONAME, "RemoteVersion", psr->ver);
diff --git a/protocols/EmLanProto/src/mlan.h b/protocols/EmLanProto/src/mlan.h
index d3f879bc2a..27fad4e9ee 100644
--- a/protocols/EmLanProto/src/mlan.h
+++ b/protocols/EmLanProto/src/mlan.h
@@ -78,6 +78,7 @@ protected:
virtual void OnRecvPacket(u_char* mes, int len, in_addr from);
virtual void OnInTCPConnection(u_long addr, SOCKET in_socket);
virtual void OnOutTCPConnection(u_long addr, SOCKET out_socket, LPVOID lpParameter);
+
private:
struct TContact
{
@@ -85,11 +86,11 @@ private:
u_int m_status;
int m_time;
u_long m_ver;
- char* m_nick;
- TContact* m_prev;
+ char *m_nick;
+ TContact *m_prev;
};
u_int m_mirStatus;
- TContact* m_pRootContact;
+ TContact *m_pRootContact;
HANDLE m_hCheckThread;
wchar_t m_name[MAX_HOSTNAME_LEN];
@@ -99,7 +100,7 @@ private:
mir_cs m_csAccessAwayMes;
void RequestStatus(bool answer = false, u_long m_addr = INADDR_BROADCAST);
- MCONTACT FindContact(in_addr addr, const char* nick, bool add_to_list, bool make_permanent, bool make_visible, u_int status = ID_STATUS_ONLINE);
+ MCONTACT FindContact(in_addr addr, const char *nick, bool add_to_list, bool make_permanent, bool make_visible, u_int status = ID_STATUS_ONLINE);
void DeleteCache();
void StartChecking();