From: Martin Schanzenbach Date: Fri, 30 Sep 2016 06:41:31 +0000 (+0000) Subject: -fix X-Git-Tag: initial-import-from-subversion-38251~179 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=c0ad94db1a125d7adbe806e060767b6258552abb;p=oweals%2Fgnunet.git -fix --- 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. */