summaryrefslogtreecommitdiff
path: root/protocols/Twitter/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-07-24 11:11:26 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-07-24 11:11:26 +0300
commitd296f9f99daf102b9af5d56690e2bd00d61c1267 (patch)
tree39311caaf80abf0b47ecb78cf94dc8157b193575 /protocols/Twitter/src
parentffc521e5d5e9bd66feb65afe0046b3fc7e073356 (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/Twitter/src')
-rw-r--r--protocols/Twitter/src/connection.cpp6
-rw-r--r--protocols/Twitter/src/contacts.cpp4
-rw-r--r--protocols/Twitter/src/ui.cpp2
3 files changed, 6 insertions, 6 deletions
diff --git a/protocols/Twitter/src/connection.cpp b/protocols/Twitter/src/connection.cpp
index 28bb28b4e3..af7f0774ab 100644
--- a/protocols/Twitter/src/connection.cpp
+++ b/protocols/Twitter/src/connection.cpp
@@ -177,7 +177,7 @@ bool TwitterProto::NegotiateConnection()
}
if (!getWString(TWITTER_KEY_GROUP, &dbv)) {
- Clist_GroupCreate(0, dbv.ptszVal);
+ Clist_GroupCreate(0, dbv.pwszVal);
db_free(&dbv);
}
@@ -401,7 +401,7 @@ void TwitterProto::UpdateAvatarWorker(void *p)
return;
std::string ext = data->url.substr(data->url.rfind('.')); // finds the filetype of the avatar
- std::wstring filename = GetAvatarFolder() + L'\\' + dbv.ptszVal + (wchar_t*)_A2T(ext.c_str()); // local filename and path
+ std::wstring filename = GetAvatarFolder() + L'\\' + dbv.pwszVal + (wchar_t*)_A2T(ext.c_str()); // local filename and path
db_free(&dbv);
PROTO_AVATAR_INFORMATION ai = { 0 };
@@ -537,7 +537,7 @@ void TwitterProto::ShowContactPopup(MCONTACT hContact, const std::string &text,
DBVARIANT dbv;
if (!db_get_ws(hContact, "CList", "MyHandle", &dbv) || !getWString(hContact, TWITTER_KEY_UN, &dbv)) {
- wcsncpy(popup.lptzContactName, dbv.ptszVal, MAX_CONTACTNAME);
+ wcsncpy(popup.lptzContactName, dbv.pwszVal, MAX_CONTACTNAME);
db_free(&dbv);
}
diff --git a/protocols/Twitter/src/contacts.cpp b/protocols/Twitter/src/contacts.cpp
index 3545862b9c..99c08ac1e9 100644
--- a/protocols/Twitter/src/contacts.cpp
+++ b/protocols/Twitter/src/contacts.cpp
@@ -163,7 +163,7 @@ void TwitterProto::GetAwayMsgWorker(void *arg)
DBVARIANT dbv;
if (!db_get_ws(hContact, "CList", "StatusMsg", &dbv)) {
- ProtoBroadcastAck(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, (LPARAM)dbv.ptszVal);
+ ProtoBroadcastAck(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, (LPARAM)dbv.pwszVal);
db_free(&dbv);
}
else ProtoBroadcastAck(hContact, ACKTYPE_AWAYMSG, ACKRESULT_FAILED, (HANDLE)1, 0);
@@ -252,7 +252,7 @@ MCONTACT TwitterProto::AddToClientList(const char *name, const char *status)
Skin_PlaySound("TwitterNewContact");
DBVARIANT dbv;
if (!getWString(TWITTER_KEY_GROUP, &dbv)) {
- db_set_ws(hContact, "CList", "Group", dbv.ptszVal);
+ db_set_ws(hContact, "CList", "Group", dbv.pwszVal);
db_free(&dbv);
}
diff --git a/protocols/Twitter/src/ui.cpp b/protocols/Twitter/src/ui.cpp
index d7164be99e..ffc6eb818a 100644
--- a/protocols/Twitter/src/ui.cpp
+++ b/protocols/Twitter/src/ui.cpp
@@ -40,7 +40,7 @@ INT_PTR CALLBACK first_run_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
DBVARIANT dbv;
if (!proto->getWString(TWITTER_KEY_GROUP, &dbv)) {
- SetDlgItemText(hwndDlg, IDC_GROUP, dbv.ptszVal);
+ SetDlgItemText(hwndDlg, IDC_GROUP, dbv.pwszVal);
db_free(&dbv);
}
else SetDlgItemText(hwndDlg, IDC_GROUP, L"Twitter");