FS-9775: Added initialization of threadpool, and switched parsing and processing of a received datagram to dispatch through the threadpool. Also a bit more work on searches sneaking in here.

This commit is contained in:
Shane Bryldt authored and Mike Jerris committed 2017-01-25 14:59:36 -06:00
1 parent 2c5e40369f
commit e52a85eb8d
7 files changed
+380 -82

No files matched your search

+5 -3
View File
@@ -56,18 +56,18 @@ int main() {
err = ks_dht_alloc(&dht1, NULL);
ok(err == KS_STATUS_SUCCESS);
err = ks_dht_init(dht1);
err = ks_dht_init(dht1, NULL);
ok(err == KS_STATUS_SUCCESS);
ks_dht_prealloc(&dht2, dht1->pool);
err = ks_dht_init(&dht2);
err = ks_dht_init(&dht2, NULL);
ok(err == KS_STATUS_SUCCESS);
err = ks_dht_alloc(&dht3, NULL);
ok(err == KS_STATUS_SUCCESS);
err = ks_dht_init(dht3);
err = ks_dht_init(dht3, NULL);
ok(err == KS_STATUS_SUCCESS);
@@ -174,6 +174,8 @@ int main() {
ks_dht_pulse(dht1, 100); // Receive and process findnode query from dht3, queue and send findnode response
ok(ks_dhtrt_find_node(dht1->rt_ipv4, ep3->nodeid) == NULL); // The node should be dubious, and thus not be returned as good yet
ks_dht_pulse(dht3, 100); // Receive and process findnode response from dht1
ok(ks_dhtrt_find_node(dht3->rt_ipv4, ep2->nodeid) == NULL); // The node should be dubious, and thus not be returned as good yet