diff options
Diffstat (limited to 'src/exit/gnunet-daemon-exit.c')
-rw-r--r-- | src/exit/gnunet-daemon-exit.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/exit/gnunet-daemon-exit.c b/src/exit/gnunet-daemon-exit.c index fb1e5ae38..743b5bf31 100644 --- a/src/exit/gnunet-daemon-exit.c +++ b/src/exit/gnunet-daemon-exit.c | |||
@@ -3543,7 +3543,7 @@ run (void *cls, | |||
3543 | 3543 | ||
3544 | dns_exit = NULL; | 3544 | dns_exit = NULL; |
3545 | if ( (GNUNET_YES == | 3545 | if ( (GNUNET_YES == |
3546 | GNUNET_CONFIGURATION_get_value_yesno (cfg_, "exit", "ENABLE_DNS")) && | 3546 | GNUNET_CONFIGURATION_get_value_yesno (cfg_, "exit", "EXIT_DNS")) && |
3547 | ( (GNUNET_OK != | 3547 | ( (GNUNET_OK != |
3548 | GNUNET_CONFIGURATION_get_value_string (cfg, "exit", | 3548 | GNUNET_CONFIGURATION_get_value_string (cfg, "exit", |
3549 | "DNS_RESOLVER", | 3549 | "DNS_RESOLVER", |
@@ -3557,20 +3557,14 @@ run (void *cls, | |||
3557 | GNUNET_free_non_null (dns_exit); | 3557 | GNUNET_free_non_null (dns_exit); |
3558 | dns_exit = NULL; | 3558 | dns_exit = NULL; |
3559 | } | 3559 | } |
3560 | if (NULL != dns_exit) | ||
3561 | dnsstub = GNUNET_DNSSTUB_start (dns_exit); | ||
3562 | |||
3563 | |||
3564 | app_idx = 0; | 3560 | app_idx = 0; |
3565 | if (GNUNET_YES == ipv4_exit) | 3561 | if (GNUNET_YES == ipv4_exit) |
3566 | { | 3562 | { |
3567 | // FIXME use regex to put info | ||
3568 | apptypes[app_idx] = GNUNET_APPLICATION_TYPE_IPV4_GATEWAY; | 3563 | apptypes[app_idx] = GNUNET_APPLICATION_TYPE_IPV4_GATEWAY; |
3569 | app_idx++; | 3564 | app_idx++; |
3570 | } | 3565 | } |
3571 | if (GNUNET_YES == ipv6_exit) | 3566 | if (GNUNET_YES == ipv6_exit) |
3572 | { | 3567 | { |
3573 | // FIXME use regex to put info | ||
3574 | apptypes[app_idx] = GNUNET_APPLICATION_TYPE_IPV6_GATEWAY; | 3568 | apptypes[app_idx] = GNUNET_APPLICATION_TYPE_IPV6_GATEWAY; |
3575 | app_idx++; | 3569 | app_idx++; |
3576 | } | 3570 | } |
@@ -3702,11 +3696,18 @@ run (void *cls, | |||
3702 | 3696 | ||
3703 | connections_map = GNUNET_CONTAINER_multihashmap_create (65536, GNUNET_NO); | 3697 | connections_map = GNUNET_CONTAINER_multihashmap_create (65536, GNUNET_NO); |
3704 | connections_heap = GNUNET_CONTAINER_heap_create (GNUNET_CONTAINER_HEAP_ORDER_MIN); | 3698 | connections_heap = GNUNET_CONTAINER_heap_create (GNUNET_CONTAINER_HEAP_ORDER_MIN); |
3699 | if (0 == app_idx) | ||
3700 | { | ||
3701 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | ||
3702 | _("No useful service enabled. Exiting.\n")); | ||
3703 | GNUNET_SCHEDULER_shutdown (); | ||
3704 | return; | ||
3705 | } | ||
3705 | mesh_handle | 3706 | mesh_handle |
3706 | = GNUNET_MESH_connect (cfg, NULL, | 3707 | = GNUNET_MESH_connect (cfg, NULL, |
3707 | &new_channel, | 3708 | &new_channel, |
3708 | &clean_channel, handlers, | 3709 | &clean_channel, handlers, |
3709 | apptypes); // FIXME use ports | 3710 | apptypes); |
3710 | if (NULL == mesh_handle) | 3711 | if (NULL == mesh_handle) |
3711 | { | 3712 | { |
3712 | GNUNET_SCHEDULER_shutdown (); | 3713 | GNUNET_SCHEDULER_shutdown (); |