Author Topic: Tox protocol  (Read 165817 times)

0 Members and 3 Guests are viewing this topic.

Offline Vulpix

Re: Tox
« Reply #165 on: 18 02 2015, 08:10:40 »
Nope, it was 2:43am :D I was sleeping, I only noticed I DCd in the morning when I turned on my monitor.
 

Offline unsane

Re: Tox
« Reply #166 on: 18 02 2015, 19:26:55 »
Experement with disconnect suppression in next build.
Si no estas con nosotros, estas contra nosotros.
 

Offline watcher

Re: Tox
« Reply #167 on: 18 02 2015, 20:50:39 »
Binaries updated to r12188. Please update manually from attachments in the first post. Please backup Tox profile before updating to this revision! It may become corrupted!
Пожалуйста, внимательно прочтите правила постинга перед тем, как открыть новую тему.
Please read forum rules.
 

Offline watcher

Re: Tox
« Reply #168 on: 19 02 2015, 07:11:41 »
Binaries updated to r12192. Please update manually from attachments in the first post. Please backup Tox profile before updating to this revision! It may become corrupted!
Пожалуйста, внимательно прочтите правила постинга перед тем, как открыть новую тему.
Please read forum rules.
 

Offline Vulpix

Re: Tox
« Reply #169 on: 19 02 2015, 08:57:30 »
Alrighty!

Out of curiosity, why is the "Tox nodes" option in the "Network" submenu, instead of being a tab on the "Tox" network menu? It makes little sense I think. Additionally, the "Tox nodes" submenu should have a "remove" button, if it has an "add" button. I know you can click the cross next to every entry but it feels counterintuitive.

Additionally, what is going on in the log below? Why the "double" bootstrap?

Spoiler
[9:57:59 1E14] CToxProto::SetStatus: changing status from 40071 to 40072
[9:57:59 1AA0] CToxProto::PollingThread: entering
[9:57:59 1AA0] CToxProto::InitToxCore: initializing tox core
[9:57:59 1AA0] CToxProto::InitToxCore: loading tox profile
[9:57:59 1AA0] CToxProto::InitToxCore: tox profile load successfully
[9:57:59 1AA0] CToxProto::BootstrapDht: bootstraping DHT
[9:57:59 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:57:59 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:57:59 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:57:59 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:57:59 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:57:59 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:57:59 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:57:59 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:57:59 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:57:59 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:57:59 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:57:59 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:57:59 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:57:59 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:58:00 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:58:00 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:58:00 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:58:00 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:58:00 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:58:00 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:58:00 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:58:00 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:58:00 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:58:00 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:58:00 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:58:00 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:58:00 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:58:00 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:58:00 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:58:00 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:58:00 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:58:00 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:58:00 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:58:00 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:58:01 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:58:01 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:58:01 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:58:01 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:58:01 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:58:01 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:58:01 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:58:01 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:58:01 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:58:01 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:58:01 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:58:01 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:58:01 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:58:01 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:58:01 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:58:01 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:58:01 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:58:01 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:58:01 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:58:01 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:58:02 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:58:02 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:58:02 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:58:02 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:58:02 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:58:02 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:58:02 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:58:02 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:58:02 1AA0] CToxProto::CheckConnection: lost connection with DHT
[9:58:02 1AA0] CToxProto::PollingThread: successfuly connected to DHT
[9:58:02 1AA0] CToxProto::PollingThread: changing status from 1 to 40072
[9:58:03 1AA0] CToxProto::BootstrapDht: bootstraping DHT
[9:58:03 1AA0] CToxProto::CheckConnection: restored connection with DHT
[close]

 

Offline Mataes

Re: Tox
« Reply #170 on: 19 02 2015, 09:15:44 »
1) coz list of nodes one for all tox accounts
2) diagree with you. for what we need button if we already have way to delete node?
 

Offline unsane

Re: Tox
« Reply #171 on: 19 02 2015, 09:33:29 »
Additionally, what is going on in the log below? Why the "double" bootstrap?
Danger, wild logs :D I'll fix "lost connection" duplication later.
I don't now how to avoid disconnect. It's just experiment.
When tox considers that it is disconnected from DHT it tries to rebootstrap DHT.
If you will get dc then the experiment will be failed.
Si no estas con nosotros, estas contra nosotros.
 

Offline Vulpix

Re: Tox
« Reply #172 on: 19 02 2015, 09:59:23 »
1) coz list of nodes one for all tox accounts
2) diagree with you. for what we need button if we already have way to delete node?

1) Ohh. Fair enough. I only use one so I didn't think of that.
2) I guess for completeness' sake. It feels weird to only have a button for "add" because when you highlight a node you expect to be able to hit DEL or click "remove" to delete it. It's just user/usability tweak, quality of life thing. Not game-breaking, hehe.

@unsane, so far, no DC :D
 

Offline Mataes

Re: Tox
« Reply #173 on: 19 02 2015, 10:01:14 »
about delete button on keyboard i agree. i ll add this function
 

Offline watcher

Re: Tox
« Reply #174 on: 19 02 2015, 22:10:05 »
Binaries updated to r12202. Please update manually from attachments in the first post. Please backup Tox profile before updating to this revision! It may become corrupted!
Пожалуйста, внимательно прочтите правила постинга перед тем, как открыть новую тему.
Please read forum rules.
 

Offline Vulpix

Re: Tox
« Reply #175 on: 20 02 2015, 07:00:23 »
Updated, but after update, all of the tox nodes in the GUI are gone. It also failed to connect 1x before connecting:

[7:50:09 1ADC] CToxProto::PollingThread: entering
[7:50:09 1ADC] CToxProto::InitToxCore: initializing tox core
[7:50:09 1ADC] CToxProto::InitToxCore: loading tox profile
[7:50:09 1ADC] CToxProto::InitToxCore: tox profile load successfully
[7:50:09 1ADC] CToxProto::BootstrapDht: bootstraping DHT
[7:50:19 1ADC] CToxProto::SetStatus: changing status from 202 to 40071
[7:50:19 1ADC] CToxProto::PollingThread: failed to connect to DHT
[7:50:19 1ADC] CToxProto::PollingThread: leaving
[7:50:30 0F60] CToxProto::SetStatus: changing status from 40071 to 40072
[7:50:30 1AEC] CToxProto::PollingThread: entering
[7:50:30 1AEC] CToxProto::InitToxCore: initializing tox core
[7:50:30 1AEC] CToxProto::InitToxCore: loading tox profile
[7:50:30 1AEC] CToxProto::InitToxCore: tox profile load successfully
[7:50:30 1AEC] CToxProto::BootstrapDht: bootstraping DHT
[7:50:40 1AEC] CToxProto::PollingThread: successfuly connected to DHT
[7:50:40 1AEC] CToxProto::PollingThread: changing status from 1 to 40072

but it worked ever since, so maybe it was just some temporary error.

Also I see the log is fixed since there is no spam of "lost connection" like before.
 

Offline unsane

Re: Tox
« Reply #176 on: 20 02 2015, 07:37:39 »
all of the tox nodes in the GUI are gone
It's because key TOX\NodeCount was renamed into TOX\Node_Count.
Si no estas con nosotros, estas contra nosotros.
 

Offline Vulpix

Re: Tox
« Reply #177 on: 20 02 2015, 08:14:37 »
I see... is there something I should do in miranda DB so I can see all the nodes I've added?

Also, I asked irungentoo about nodes and he said it literally doesn't matter which node you connect to to bootstrap, in the sense that "as long as you can connect, it can be the US node or node from NL and the connect bootstrap speed will be the same".
 

Offline Wishmaster

Re: Tox
« Reply #178 on: 20 02 2015, 10:55:36 »
Vulpix, you can remane that key as unsane said.

unsane, I wonder why that key is needed at all? Can't you just loop through all settings until you find one that doesn't exist?

Smth like that:
Code: [Select]
for (lvi.iItem = 0; ; lvi.iItem++)
{
mir_snprintf(setting, SIZEOF(setting), TOX_SETTINGS_NODE_IPV4, lvi.iItem);
                                char *szIPv4 = db_get_sa(NULL, MODULE, setting);
                                if (szIPv4 == NULL) break; // break if setting doesn't exist

mir_snprintf(setting, SIZEOF(setting), TOX_SETTINGS_NODE_IPV6, lvi.iItem);
                                char *szIPv6 = db_get_sa(NULL, MODULE, setting);
                                if (szIPv6 == NULL) {
                                       mir_free(szIPv4);
                                       break; // break if setting doesn't exist
                                 }

mir_snprintf(setting, SIZEOF(setting), TOX_SETTINGS_NODE_PKEY, lvi.iItem);
                                char *szKey = db_get_sa(NULL, MODULE, setting);
                                if (szKey == NULL) {
                                       mir_free(szIPv4);
                                       mir_free(szIPv6);
                                       break; // break if setting doesn't exist
                                 }

lvi.iImage = -1;
lvi.mask = LVIF_TEXT | LVIF_IMAGE;

lvi.iSubItem = 0;
lvi.pszText = szIPv4;
SendMessage(hwndList, LVM_INSERTITEMA, 0, (LPARAM)&lvi);

lvi.iSubItem = 1;
lvi.pszText = szIPv6;
SendMessage(hwndList, LVM_SETITEMA, 0, (LPARAM)&lvi);

mir_snprintf(setting, SIZEOF(setting), TOX_SETTINGS_NODE_PORT, lvi.iItem);
int port = db_get_w(NULL, MODULE, setting, 0);
if (port > 0)
{
char portNum[10];
itoa(port, portNum, 10);
lvi.pszText = mir_strdup(portNum);
}
lvi.iSubItem = 2;
SendMessage(hwndList, LVM_SETITEMA, 0, (LPARAM)&lvi);

lvi.iSubItem = 3;
lvi.pszText = szKey;
SendMessage(hwndList, LVM_SETITEMA, 0, (LPARAM)&lvi);

lvi.mask = LVIF_IMAGE;
lvi.iSubItem = 4;
lvi.iImage = 0;
ListView_SetItem(hwndList, &lvi);

lvi.iSubItem = 5;
lvi.iImage = 1;
ListView_SetItem(hwndList, &lvi);
}
« Last Edit: 20 02 2015, 11:01:10 by Wishmaster »
 

Offline Vulpix

Re: Tox
« Reply #179 on: 20 02 2015, 11:00:05 »
Wishmaster - Thanks! That helped.

My friend had another tox DC (other protocols were just fine and he was online at the time. Not messaging or sending anything; tox just went offline):


[9:16:45 1488] CToxProto::PollingThread: successfuly connected to DHT
[9:16:45 1488] CToxProto::PollingThread: changing status from 1 to 40072
[12:23:07 1488] CToxProto::CheckConnection: lost connection with DHT
[12:23:07 1488] CToxProto::BootstrapDht: bootstraping DHT
[12:23:11 1488] CToxProto::CheckConnection: disconnected from DHT
[12:23:11 1488] CToxProto::SetStatus: changing status from 40072 to 40071
[12:23:11 1488] CToxProto::PollingThread: leaving

What happened there?
« Last Edit: 20 02 2015, 11:41:55 by Vulpix »