From a615cf5b1e6486a28f6e913f8320dca703eaae6e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Philipp=20T=C3=B6lke?= Date: Wed, 8 Sep 2010 07:20:59 +0000 Subject: [PATCH] check whether i really can open file-like things --- src/vpn/gnunet-daemon-vpn.c | 2 ++ src/vpn/gnunet-service-dns.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/vpn/gnunet-daemon-vpn.c b/src/vpn/gnunet-daemon-vpn.c index 147983f5c..7c4217cd2 100644 --- a/src/vpn/gnunet-daemon-vpn.c +++ b/src/vpn/gnunet-daemon-vpn.c @@ -70,6 +70,8 @@ static void start_helper_and_schedule() { mycls.helper_in = GNUNET_DISK_pipe(1); mycls.helper_out = GNUNET_DISK_pipe(1); + if (mycls.helper_in == NULL || mycls.helper_out == NULL) return; + mycls.helper_pid = GNUNET_OS_start_process(mycls.helper_in, mycls.helper_out, "gnunet-helper-vpn", "gnunet-helper-vpn", NULL); mycls.fh_from_helper = GNUNET_DISK_pipe_handle (mycls.helper_out, GNUNET_DISK_PIPE_END_READ); diff --git a/src/vpn/gnunet-service-dns.c b/src/vpn/gnunet-service-dns.c index c85ba0027..7d32e1d73 100644 --- a/src/vpn/gnunet-service-dns.c +++ b/src/vpn/gnunet-service-dns.c @@ -102,6 +102,8 @@ run (void *cls, mycls.dnsout = GNUNET_NETWORK_socket_create (AF_INET, SOCK_DGRAM, 0); + if (mycls.dnsout == NULL) return; + struct sockaddr_in addr; memset(&addr, 0, sizeof(struct sockaddr_in)); -- 2.25.1