From c0ad94db1a125d7adbe806e060767b6258552abb Mon Sep 17 00:00:00 2001 From: Martin Schanzenbach Date: Fri, 30 Sep 2016 06:41:31 +0000 Subject: [PATCH] -fix --- src/gns/gnunet-service-gns.c | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/src/gns/gnunet-service-gns.c b/src/gns/gnunet-service-gns.c index 149efc82d..386e6d744 100644 --- a/src/gns/gnunet-service-gns.c +++ b/src/gns/gnunet-service-gns.c @@ -360,7 +360,7 @@ client_disconnect_cb (void *cls, void *app_ctx) { struct ClientLookupHandle *clh; - struct GnsClient *gc = cls; + struct GnsClient *gc = app_ctx; GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Client %p disconnected\n", @@ -868,7 +868,7 @@ check_lookup (void *cls, return GNUNET_SYSERR; } name = (const char *) &l_msg[1]; - if ( ('\0' != name[l_msg->header.size - sizeof (struct LookupMessage) - 1]) || + if ( ('\0' != name[msg_size - sizeof (struct LookupMessage) - 1]) || (strlen (name) > GNUNET_DNSPARSER_MAX_NAME_LENGTH) ) { GNUNET_break (0); @@ -1135,25 +1135,6 @@ run (void *cls, } -/** TODO delete - * The main function for the GNS service. - * - * @param argc number of arguments from the command line - * @param argv command line arguments - * @return 0 ok, 1 on error - */ -/*int - main (int argc, char *const *argv) - { - int ret; - - ret = - (GNUNET_OK == - GNUNET_SERVICE_run (argc, argv, "gns", GNUNET_SERVICE_OPTION_NONE, &run, - NULL)) ? 0 : 1; - return ret; - }*/ - /** * Define "main" method using service macro. */ -- 2.25.1