summaryrefslogtreecommitdiff
path: root/plugins/Ping/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 /plugins/Ping/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 'plugins/Ping/src')
-rw-r--r--plugins/Ping/src/log.cpp2
-rw-r--r--plugins/Ping/src/pinglist.cpp8
-rw-r--r--plugins/Ping/src/utils.cpp4
3 files changed, 7 insertions, 7 deletions
diff --git a/plugins/Ping/src/log.cpp b/plugins/Ping/src/log.cpp
index 6c183f40bf..2ac0f8db41 100644
--- a/plugins/Ping/src/log.cpp
+++ b/plugins/Ping/src/log.cpp
@@ -37,7 +37,7 @@ INT_PTR GetLogFilename(WPARAM wParam, LPARAM lParam) {
mir_wstrncat(filename, L"\\ping_log.txt", wParam - mir_wstrlen(filename));
}
else {
- mir_wstrncpy(filename, dbv.ptszVal, wParam);
+ mir_wstrncpy(filename, dbv.pwszVal, wParam);
db_free(&dbv);
}
diff --git a/plugins/Ping/src/pinglist.cpp b/plugins/Ping/src/pinglist.cpp
index d0edc89823..33c7f34388 100644
--- a/plugins/Ping/src/pinglist.cpp
+++ b/plugins/Ping/src/pinglist.cpp
@@ -116,13 +116,13 @@ bool read_ping_address(PINGADDRESS &pa) {
DBVARIANT dbv;
if (!db_get_ws(0, buff, "Address", &dbv)) {
- mir_wstrncpy(pa.pszName, dbv.ptszVal, _countof(pa.pszName));
+ mir_wstrncpy(pa.pszName, dbv.pwszVal, _countof(pa.pszName));
db_free(&dbv);
}
else return false;
if (!db_get_ws(0, buff, "Label", &dbv)) {
- mir_wstrncpy(pa.pszLabel, dbv.ptszVal, _countof(pa.pszLabel));
+ mir_wstrncpy(pa.pszLabel, dbv.pwszVal, _countof(pa.pszLabel));
db_free(&dbv);
}
else return false;
@@ -139,13 +139,13 @@ bool read_ping_address(PINGADDRESS &pa) {
else pa.pszProto[0] = '\0';
if (!db_get_ws(0, buff, "Command", &dbv)) {
- mir_wstrncpy(pa.pszCommand, dbv.ptszVal, _countof(pa.pszCommand));
+ mir_wstrncpy(pa.pszCommand, dbv.pwszVal, _countof(pa.pszCommand));
db_free(&dbv);
}
else
pa.pszCommand[0] = '\0';
if (!db_get_ws(0, buff, "CommandParams", &dbv)) {
- mir_wstrncpy(pa.pszParams, dbv.ptszVal, _countof(pa.pszParams));
+ mir_wstrncpy(pa.pszParams, dbv.pwszVal, _countof(pa.pszParams));
db_free(&dbv);
}
else
diff --git a/plugins/Ping/src/utils.cpp b/plugins/Ping/src/utils.cpp
index dda9d77211..2f603ec3a0 100644
--- a/plugins/Ping/src/utils.cpp
+++ b/plugins/Ping/src/utils.cpp
@@ -222,7 +222,7 @@ void import_ping_address(int index, PINGADDRESS &pa) {
char buf[256];
mir_snprintf(buf, "Address%d", index);
if (!db_get_ws(0, "PingPlug", buf, &dbv)) {
- mir_wstrncpy(pa.pszName, dbv.ptszVal, _countof(pa.pszName));
+ mir_wstrncpy(pa.pszName, dbv.pwszVal, _countof(pa.pszName));
db_free(&dbv);
}
else
@@ -230,7 +230,7 @@ void import_ping_address(int index, PINGADDRESS &pa) {
mir_snprintf(buf, "Label%d", index);
if (!db_get_ws(0, "PingPlug", buf, &dbv)) {
- mir_wstrncpy(pa.pszLabel, dbv.ptszVal, _countof(pa.pszLabel));
+ mir_wstrncpy(pa.pszLabel, dbv.pwszVal, _countof(pa.pszLabel));
db_free(&dbv);
}
else