From: Christian Grothoff Date: Fri, 11 Dec 2009 14:31:33 +0000 (+0000) Subject: fixing compile errors X-Git-Tag: initial-import-from-subversion-38251~23001 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=e128223f737f33dd7c28eab1a18e93038a9c27cd;p=oweals%2Fgnunet.git fixing compile errors --- diff --git a/src/fs/gnunet-directory.c b/src/fs/gnunet-directory.c index 22eecdb19..6201c5dbb 100644 --- a/src/fs/gnunet-directory.c +++ b/src/fs/gnunet-directory.c @@ -105,7 +105,7 @@ run (void *cls, const char *filename; int i; - if (NULL == argv[0]) + if (NULL == args[0]) { fprintf (stderr, _("You must specify a filename to inspect.")); diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c index b93ced56f..aae5216bd 100644 --- a/src/transport/gnunet-service-transport.c +++ b/src/transport/gnunet-service-transport.c @@ -2475,7 +2475,7 @@ transmit_address_to_client (void *cls, const char *address) * @param message the actual message */ static void -handle_addressLookUp (void *cls, +handle_address_lookup (void *cls, struct GNUNET_SERVER_Client *client, const struct GNUNET_MessageHeader *message) { @@ -2484,7 +2484,6 @@ handle_addressLookUp (void *cls, const char *nameTransport; const char *address; uint16_t size; - struct GNUNET_MessageHeader reply; struct GNUNET_SERVER_TransmitContext *tc; size = ntohs (message->size); @@ -2503,14 +2502,14 @@ handle_addressLookUp (void *cls, return; } address = (const char *)&alum[1]; - nameTransport = (const char*)&addr[addressLen]; + nameTransport = (const char*)&address[addressLen]; if (nameTransport [size - sizeof (struct AddressLookupMessage) - addressLen -1] != '\0') { GNUNET_break_op (0); GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); return; } - struct GNUNET_TIME_Absolute timeout= GNUNET_TIME_absolute_ntoh(bbalum->timeout); + struct GNUNET_TIME_Absolute timeout= GNUNET_TIME_absolute_ntoh(alum->timeout); struct GNUNET_TIME_Relative rtimeout = GNUNET_TIME_absolute_get_remaining(timeout); lsPlugin = find_transport(nameTransport); if (NULL == lsPlugin) @@ -2522,7 +2521,7 @@ handle_addressLookUp (void *cls, } tc = GNUNET_SERVER_transmit_context_create (client); lsPlugin->api->address_pretty_printer(cls, nameTransport, - addr, alum->addrlen, GNUNET_YES, rtimeout, &transmit_address_to_client, tc); + address, addressLen, GNUNET_YES, rtimeout, &transmit_address_to_client, tc); } /** @@ -2541,6 +2540,9 @@ static struct GNUNET_SERVER_MessageHandler handlers[] = { {&handle_try_connect, NULL, GNUNET_MESSAGE_TYPE_TRANSPORT_TRY_CONNECT, sizeof (struct TryConnectMessage)}, + {&handle_address_lookup, NULL, + GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_LOOKUP, + 0 }, {NULL, NULL, 0, 0} }; diff --git a/src/transport/transport.h b/src/transport/transport.h index fed4bf162..57c312171 100644 --- a/src/transport/transport.h +++ b/src/transport/transport.h @@ -249,7 +249,7 @@ struct AddressLookupMessage /** * timeout to give up. */ - struct GNUNET_TIME_AbosluteNBO tiemout; + struct GNUNET_TIME_AbsoluteNBO timeout; /** * Length of the (binary) address in bytes, in big-endian.