diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-01-25 23:14:45 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-01-25 23:14:45 +0000 |
commit | c3fee331d5dd4784c7a793f5a63853101e1ceee3 (patch) | |
tree | f859e6ac09758925222785ab09a1965b0db66e11 /src/util/service.c | |
parent | 200c39244ad165f003ec810320b415dda6ec7542 (diff) | |
download | gnunet-c3fee331d5dd4784c7a793f5a63853101e1ceee3.tar.gz gnunet-c3fee331d5dd4784c7a793f5a63853101e1ceee3.zip |
-make sure we get the correct errno back after GNUNET_NETWORK_socket_create()
Diffstat (limited to 'src/util/service.c')
-rw-r--r-- | src/util/service.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/util/service.c b/src/util/service.c index d49ad4f2a..1f8532211 100644 --- a/src/util/service.c +++ b/src/util/service.c | |||
@@ -549,7 +549,7 @@ GNUNET_SERVICE_get_server_addresses (const char *service_name, | |||
549 | else | 549 | else |
550 | disablev6 = GNUNET_NO; | 550 | disablev6 = GNUNET_NO; |
551 | 551 | ||
552 | if (!disablev6) | 552 | if (! disablev6) |
553 | { | 553 | { |
554 | /* probe IPv6 support */ | 554 | /* probe IPv6 support */ |
555 | desc = GNUNET_NETWORK_socket_create (PF_INET6, SOCK_STREAM, 0); | 555 | desc = GNUNET_NETWORK_socket_create (PF_INET6, SOCK_STREAM, 0); |
@@ -562,8 +562,7 @@ GNUNET_SERVICE_get_server_addresses (const char *service_name, | |||
562 | return GNUNET_SYSERR; | 562 | return GNUNET_SYSERR; |
563 | } | 563 | } |
564 | LOG (GNUNET_ERROR_TYPE_INFO, | 564 | LOG (GNUNET_ERROR_TYPE_INFO, |
565 | _ | 565 | _("Disabling IPv6 support for service `%s', failed to create IPv6 socket: %s\n"), |
566 | ("Disabling IPv6 support for service `%s', failed to create IPv6 socket: %s\n"), | ||
567 | service_name, STRERROR (errno)); | 566 | service_name, STRERROR (errno)); |
568 | disablev6 = GNUNET_YES; | 567 | disablev6 = GNUNET_YES; |
569 | } | 568 | } |
@@ -623,7 +622,8 @@ GNUNET_SERVICE_get_server_addresses (const char *service_name, | |||
623 | (unsigned long long) sizeof (s_un.sun_path)); | 622 | (unsigned long long) sizeof (s_un.sun_path)); |
624 | unixpath = GNUNET_NETWORK_shorten_unixpath (unixpath); | 623 | unixpath = GNUNET_NETWORK_shorten_unixpath (unixpath); |
625 | LOG (GNUNET_ERROR_TYPE_INFO, | 624 | LOG (GNUNET_ERROR_TYPE_INFO, |
626 | _("Using `%s' instead\n"), unixpath); | 625 | _("Using `%s' instead\n"), |
626 | unixpath); | ||
627 | } | 627 | } |
628 | #ifdef LINUX | 628 | #ifdef LINUX |
629 | abstract = GNUNET_CONFIGURATION_get_value_yesno (cfg, | 629 | abstract = GNUNET_CONFIGURATION_get_value_yesno (cfg, |
@@ -654,7 +654,8 @@ GNUNET_SERVICE_get_server_addresses (const char *service_name, | |||
654 | } | 654 | } |
655 | LOG (GNUNET_ERROR_TYPE_INFO, | 655 | LOG (GNUNET_ERROR_TYPE_INFO, |
656 | _("Disabling UNIX domain socket support for service `%s', failed to create UNIX domain socket: %s\n"), | 656 | _("Disabling UNIX domain socket support for service `%s', failed to create UNIX domain socket: %s\n"), |
657 | service_name, STRERROR (errno)); | 657 | service_name, |
658 | STRERROR (errno)); | ||
658 | GNUNET_free (unixpath); | 659 | GNUNET_free (unixpath); |
659 | unixpath = NULL; | 660 | unixpath = NULL; |
660 | } | 661 | } |