From: Julius Bünger Date: Thu, 12 Jul 2018 23:14:43 +0000 (+0200) Subject: rps service: check return value when opening cadet port X-Git-Tag: v0.11.0~322^2~71 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=b197aa1988037a2839c4dcf752a343d9cfae7987;p=oweals%2Fgnunet.git rps service: check return value when opening cadet port --- diff --git a/src/rps/gnunet-service-rps.c b/src/rps/gnunet-service-rps.c index c60ab5e63..5d568dfac 100644 --- a/src/rps/gnunet-service-rps.c +++ b/src/rps/gnunet-service-rps.c @@ -4389,6 +4389,13 @@ run (void *cls, NULL, /* WindowSize handler */ cleanup_destroyed_channel, /* Disconnect handler */ cadet_handlers); + if (NULL == cadet_port) + { + LOG (GNUNET_ERROR_TYPE_ERROR, + "Cadet port `%s' is already in use.\n", + GNUNET_APPLICATION_PORT_RPS); + GNUNET_assert (0); + } peerinfo_handle = GNUNET_PEERINFO_connect (cfg);