summaryrefslogtreecommitdiff
path: root/protocols/Tox
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-11-14 15:43:25 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-11-14 15:43:25 +0300
commit28b81bbed5d8db354349fd787c3db4123e55d423 (patch)
tree9861c246bdb7696c25adbbcd9f210dda430f846e /protocols/Tox
parent4b933c7b73a4151872dea3119685cdebe40532c7 (diff)
code cleaning
Diffstat (limited to 'protocols/Tox')
-rw-r--r--protocols/Tox/src/tox_bootstrap.cpp6
-rw-r--r--protocols/Tox/src/tox_options.cpp8
2 files changed, 7 insertions, 7 deletions
diff --git a/protocols/Tox/src/tox_bootstrap.cpp b/protocols/Tox/src/tox_bootstrap.cpp
index 103f9a5fcf..638d3aadfe 100644
--- a/protocols/Tox/src/tox_bootstrap.cpp
+++ b/protocols/Tox/src/tox_bootstrap.cpp
@@ -33,16 +33,16 @@ void CToxProto::BootstrapNodesFromDb(Tox *tox, bool isIPv6)
char setting[MAX_PATH];
for (int i = 0; i < nodeCount; i++) {
mir_snprintf(setting, TOX_SETTINGS_NODE_IPV4, i);
- ptrA address(db_get_sa(NULL, module, setting));
+ ptrA address(db_get_sa(0, module, setting));
mir_snprintf(setting, TOX_SETTINGS_NODE_PORT, i);
int port = db_get_w(0, module, setting, 33445);
mir_snprintf(setting, TOX_SETTINGS_NODE_PKEY, i);
- ptrA pubKey(db_get_sa(NULL, module, setting));
+ ptrA pubKey(db_get_sa(0, module, setting));
BootstrapUdpNode(tox, address, port, pubKey);
BootstrapTcpRelay(tox, address, port, pubKey);
if (isIPv6) {
mir_snprintf(setting, TOX_SETTINGS_NODE_IPV6, i);
- address = db_get_sa(NULL, module, setting);
+ address = db_get_sa(0, module, setting);
BootstrapUdpNode(tox, address, port, pubKey);
BootstrapTcpRelay(tox, address, port, pubKey);
}
diff --git a/protocols/Tox/src/tox_options.cpp b/protocols/Tox/src/tox_options.cpp
index cd3a8357cd..2d5c570b45 100644
--- a/protocols/Tox/src/tox_options.cpp
+++ b/protocols/Tox/src/tox_options.cpp
@@ -539,13 +539,13 @@ bool CToxOptionsNodeList::OnApply()
int nodeCount = db_get_b(0, module, TOX_SETTINGS_NODE_COUNT, 0);
for (iItem = itemCount; iItem < nodeCount; iItem++) {
mir_snprintf(setting, TOX_SETTINGS_NODE_IPV4, iItem);
- db_unset(NULL, module, setting);
+ db_unset(0, module, setting);
mir_snprintf(setting, TOX_SETTINGS_NODE_IPV6, iItem);
- db_unset(NULL, module, setting);
+ db_unset(0, module, setting);
mir_snprintf(setting, TOX_SETTINGS_NODE_PORT, iItem);
- db_unset(NULL, module, setting);
+ db_unset(0, module, setting);
mir_snprintf(setting, TOX_SETTINGS_NODE_PKEY, iItem);
- db_unset(NULL, module, setting);
+ db_unset(0, module, setting);
}
db_set_b(0, module, TOX_SETTINGS_NODE_COUNT, itemCount);
return true;