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/ICQCorp | |
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/ICQCorp')
-rw-r--r-- | protocols/ICQCorp/src/options.cpp | 4 | ||||
-rw-r--r-- | protocols/ICQCorp/src/protocol.cpp | 5 |
2 files changed, 4 insertions, 5 deletions
diff --git a/protocols/ICQCorp/src/options.cpp b/protocols/ICQCorp/src/options.cpp index 380daf9b49..2b0e9f1b2c 100644 --- a/protocols/ICQCorp/src/options.cpp +++ b/protocols/ICQCorp/src/options.cpp @@ -30,11 +30,11 @@ static INT_PTR CALLBACK icqOptionsDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LP case WM_INITDIALOG:
TranslateDialogDefault(hWnd);
SetDlgItemInt(hWnd, IDC_OPT_UIN, db_get_dw(NULL, protoName, "UIN", 0), FALSE);
- if (!db_get(NULL, protoName, "Password", &dbv)) {
+ if (!db_get_s(NULL, protoName, "Password", &dbv)) {
SetDlgItemTextA(hWnd, IDC_OPT_PASSWORD, dbv.pszVal);
db_free(&dbv);
}
- if (!db_get(NULL, protoName, "Server", &dbv)) {
+ if (!db_get_s(NULL, protoName, "Server", &dbv)) {
SetDlgItemTextA(hWnd, IDC_OPT_SERVER, dbv.pszVal);
db_free(&dbv);
}
diff --git a/protocols/ICQCorp/src/protocol.cpp b/protocols/ICQCorp/src/protocol.cpp index 7faa6c832e..6fa78b0e1a 100644 --- a/protocols/ICQCorp/src/protocol.cpp +++ b/protocols/ICQCorp/src/protocol.cpp @@ -195,7 +195,7 @@ bool ICQ::logon(unsigned short logonStatus) DBVARIANT dbv;
char str[128];
- if (!db_get(NULL, protoName, "Server", &dbv)) {
+ if (!db_get_s(NULL, protoName, "Server", &dbv)) {
lstrcpyA(str, dbv.pszVal);
db_free(&dbv);
}
@@ -219,12 +219,11 @@ bool ICQ::logon(unsigned short logonStatus) updateContactList();
dwUIN = db_get_dw(NULL, protoName, "UIN", 0);
- if (!db_get(NULL, protoName, "Password", &dbv)) {
+ if (!db_get_s(NULL, protoName, "Password", &dbv)) {
lstrcpyA(str, dbv.pszVal);
db_free(&dbv);
}
-
timeStampLastMessage = 0;
sequenceVal = 1;
|