diff options
author | George Hazan <ghazan@miranda.im> | 2018-07-24 11:11:26 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-07-24 11:11:26 +0300 |
commit | d296f9f99daf102b9af5d56690e2bd00d61c1267 (patch) | |
tree | 39311caaf80abf0b47ecb78cf94dc8157b193575 /protocols/MSN | |
parent | ffc521e5d5e9bd66feb65afe0046b3fc7e073356 (diff) |
database:
- senseless fiels ptszVal removed from DBVARIANT, pwszVal is used instead;
- if you want db_get to return a string, you need to use db_get_s.
Diffstat (limited to 'protocols/MSN')
-rw-r--r-- | protocols/MSN/src/msn_chat.cpp | 2 | ||||
-rw-r--r-- | protocols/MSN/src/msn_misc.cpp | 6 | ||||
-rw-r--r-- | protocols/MSN/src/msn_opts.cpp | 4 | ||||
-rw-r--r-- | protocols/MSN/src/msn_proto.cpp | 2 | ||||
-rw-r--r-- | protocols/MSN/src/msn_svcs.cpp | 4 |
5 files changed, 9 insertions, 9 deletions
diff --git a/protocols/MSN/src/msn_chat.cpp b/protocols/MSN/src/msn_chat.cpp index 4278ebc8c0..7405e4a4b3 100644 --- a/protocols/MSN/src/msn_chat.cpp +++ b/protocols/MSN/src/msn_chat.cpp @@ -481,7 +481,7 @@ int CMsnProto::MSN_GCEventHook(WPARAM, LPARAM lParam) GCEVENT gce = { m_szModuleName, gch->ptszID, GC_EVENT_MESSAGE };
gce.dwFlags = GCEF_ADDTOLOG;
- gce.ptszNick = bError ? L"" : dbv.ptszVal;
+ gce.ptszNick = bError ? L"" : dbv.pwszVal;
gce.ptszUID = mir_a2u(MyOptions.szEmail);
gce.time = time(0);
gce.ptszText = gch->ptszText;
diff --git a/protocols/MSN/src/msn_misc.cpp b/protocols/MSN/src/msn_misc.cpp index 7422a9ee3d..3989e25b5f 100644 --- a/protocols/MSN/src/msn_misc.cpp +++ b/protocols/MSN/src/msn_misc.cpp @@ -314,11 +314,11 @@ void CMsnProto::MSN_GetCustomSmileyFileName(MCONTACT hContact, wchar_t* pszDest, DBVARIANT dbv = { 0 };
if (getWString(hContact, "e-mail", &dbv)) {
dbv.type = DBVT_ASCIIZ;
- dbv.ptszVal = (wchar_t*)mir_alloc(11*sizeof(wchar_t));
- _ui64tow((UINT_PTR)hContact, dbv.ptszVal, 10);
+ dbv.pwszVal = (wchar_t*)mir_alloc(11*sizeof(wchar_t));
+ _ui64tow((UINT_PTR)hContact, dbv.pwszVal, 10);
}
- tPathLen += mir_snwprintf(pszDest + tPathLen, cbLen - tPathLen, L"\\%s", dbv.ptszVal);
+ tPathLen += mir_snwprintf(pszDest + tPathLen, cbLen - tPathLen, L"\\%s", dbv.pwszVal);
db_free(&dbv);
}
else {
diff --git a/protocols/MSN/src/msn_opts.cpp b/protocols/MSN/src/msn_opts.cpp index 5f2f881d1c..570fe40dab 100644 --- a/protocols/MSN/src/msn_opts.cpp +++ b/protocols/MSN/src/msn_opts.cpp @@ -99,7 +99,7 @@ static INT_PTR CALLBACK DlgProcMsnOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP HWND wnd = GetDlgItem(hwndDlg, IDC_HANDLE2);
DBVARIANT dbv;
if (!proto->getWString("Nick", &dbv)) {
- SetWindowText(wnd, dbv.ptszVal);
+ SetWindowText(wnd, dbv.pwszVal);
db_free(&dbv);
}
EnableWindow(wnd, proto->msnLoggedIn);
@@ -491,7 +491,7 @@ static INT_PTR CALLBACK DlgProcAccMgrUI(HWND hwndDlg, UINT msg, WPARAM wParam, L DBVARIANT dbv;
if (!proto->getWString("Place", &dbv)) {
- SetDlgItemText(hwndDlg, IDC_PLACE, dbv.ptszVal);
+ SetDlgItemText(hwndDlg, IDC_PLACE, dbv.pwszVal);
db_free(&dbv);
}
}
diff --git a/protocols/MSN/src/msn_proto.cpp b/protocols/MSN/src/msn_proto.cpp index 567facc9e4..44b38db537 100644 --- a/protocols/MSN/src/msn_proto.cpp +++ b/protocols/MSN/src/msn_proto.cpp @@ -606,7 +606,7 @@ void __cdecl CMsnProto::MsnGetAwayMsgThread(void* arg) AwayMsgInfo *inf = (AwayMsgInfo*)arg;
DBVARIANT dbv;
if (!db_get_ws(inf->hContact, "CList", "StatusMsg", &dbv)) {
- ProtoBroadcastAck(inf->hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)inf->id, (LPARAM)dbv.ptszVal);
+ ProtoBroadcastAck(inf->hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)inf->id, (LPARAM)dbv.pwszVal);
db_free(&dbv);
}
else ProtoBroadcastAck(inf->hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)inf->id, 0);
diff --git a/protocols/MSN/src/msn_svcs.cpp b/protocols/MSN/src/msn_svcs.cpp index 1bdb6cac2e..9b5ce2fdda 100644 --- a/protocols/MSN/src/msn_svcs.cpp +++ b/protocols/MSN/src/msn_svcs.cpp @@ -253,7 +253,7 @@ void CMsnProto::OnContactDeleted(MCONTACT hContact) if (isChatRoom(hContact)) {
DBVARIANT dbv;
if (!getWString(hContact, "ChatRoomID", &dbv)) {
- MSN_KillChatSession(dbv.ptszVal);
+ MSN_KillChatSession(dbv.pwszVal);
db_free(&dbv);
}
}
@@ -429,7 +429,7 @@ INT_PTR CMsnProto::OnLeaveChat(WPARAM hContact, LPARAM) if (isChatRoom(hContact) != 0) {
DBVARIANT dbv;
if (getWString(hContact, "ChatRoomID", &dbv) == 0) {
- MSN_KillChatSession(dbv.ptszVal);
+ MSN_KillChatSession(dbv.pwszVal);
db_free(&dbv);
}
}
|