diff options
author | David Barksdale <amatus.amongus@gmail.com> | 2015-11-21 16:57:18 +0000 |
---|---|---|
committer | David Barksdale <amatus.amongus@gmail.com> | 2015-11-21 16:57:18 +0000 |
commit | ecf7431a9e47f01bc2562bf4ade06f779dcdf0eb (patch) | |
tree | b6a72ea051adcd98309ed9426bd003d98a4a5cc0 /src/transport/gnunet-transport.c | |
parent | c4d5332fd50897d043e45f0318a02c81af98edf0 (diff) | |
download | gnunet-ecf7431a9e47f01bc2562bf4ade06f779dcdf0eb.tar.gz gnunet-ecf7431a9e47f01bc2562bf4ade06f779dcdf0eb.zip |
gnunet-transport shutting down too early
Fixes issue #3700
Diffstat (limited to 'src/transport/gnunet-transport.c')
-rw-r--r-- | src/transport/gnunet-transport.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/transport/gnunet-transport.c b/src/transport/gnunet-transport.c index f8d3e26d8..7108f9aa8 100644 --- a/src/transport/gnunet-transport.c +++ b/src/transport/gnunet-transport.c | |||
@@ -427,11 +427,6 @@ struct GNUNET_OS_Process *resolver; | |||
427 | static unsigned int address_resolutions; | 427 | static unsigned int address_resolutions; |
428 | 428 | ||
429 | /** | 429 | /** |
430 | * Address resolutions pending in progress | ||
431 | */ | ||
432 | static unsigned int address_resolution_in_progress; | ||
433 | |||
434 | /** | ||
435 | * DLL for NAT Test Contexts: head | 430 | * DLL for NAT Test Contexts: head |
436 | */ | 431 | */ |
437 | struct TestContext *head; | 432 | struct TestContext *head; |
@@ -1446,11 +1441,7 @@ process_peer_iteration_cb (void *cls, | |||
1446 | if (NULL == peer) | 1441 | if (NULL == peer) |
1447 | { | 1442 | { |
1448 | /* done */ | 1443 | /* done */ |
1449 | address_resolution_in_progress = GNUNET_NO; | ||
1450 | pic = NULL; | 1444 | pic = NULL; |
1451 | if (NULL != end) | ||
1452 | GNUNET_SCHEDULER_cancel (end); | ||
1453 | end = GNUNET_SCHEDULER_add_now (&shutdown_task, NULL); | ||
1454 | return; | 1445 | return; |
1455 | } | 1446 | } |
1456 | 1447 | ||
@@ -1467,7 +1458,7 @@ process_peer_iteration_cb (void *cls, | |||
1467 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1458 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1468 | "Received address for peer `%s': %s\n", | 1459 | "Received address for peer `%s': %s\n", |
1469 | GNUNET_i2s (peer), | 1460 | GNUNET_i2s (peer), |
1470 | address->transport_name); | 1461 | address ? address->transport_name : ""); |
1471 | 1462 | ||
1472 | if (NULL != address) | 1463 | if (NULL != address) |
1473 | resolve_peer_address (address, | 1464 | resolve_peer_address (address, |
@@ -1904,7 +1895,6 @@ testservice_task (void *cls, | |||
1904 | } | 1895 | } |
1905 | else if (iterate_connections) /* -i: List information about peers once */ | 1896 | else if (iterate_connections) /* -i: List information about peers once */ |
1906 | { | 1897 | { |
1907 | address_resolution_in_progress = GNUNET_YES; | ||
1908 | pic = GNUNET_TRANSPORT_monitor_peers (cfg, (NULL == cpid) ? NULL : &pid, | 1898 | pic = GNUNET_TRANSPORT_monitor_peers (cfg, (NULL == cpid) ? NULL : &pid, |
1909 | GNUNET_YES, TIMEOUT, &process_peer_iteration_cb, (void *) cfg); | 1899 | GNUNET_YES, TIMEOUT, &process_peer_iteration_cb, (void *) cfg); |
1910 | op_timeout = GNUNET_SCHEDULER_add_delayed (OP_TIMEOUT, | 1900 | op_timeout = GNUNET_SCHEDULER_add_delayed (OP_TIMEOUT, |
@@ -1915,7 +1905,6 @@ testservice_task (void *cls, | |||
1915 | { | 1905 | { |
1916 | monitored_peers = GNUNET_CONTAINER_multipeermap_create (10, | 1906 | monitored_peers = GNUNET_CONTAINER_multipeermap_create (10, |
1917 | GNUNET_NO); | 1907 | GNUNET_NO); |
1918 | address_resolution_in_progress = GNUNET_YES; | ||
1919 | pic = GNUNET_TRANSPORT_monitor_peers (cfg, | 1908 | pic = GNUNET_TRANSPORT_monitor_peers (cfg, |
1920 | (NULL == cpid) ? NULL : &pid, | 1909 | (NULL == cpid) ? NULL : &pid, |
1921 | GNUNET_NO, | 1910 | GNUNET_NO, |