gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r8476 - in gnunet: . src/arm src/core src/include src/peeri


From: gnunet
Subject: [GNUnet-SVN] r8476 - in gnunet: . src/arm src/core src/include src/peerinfo src/resolver src/statistics src/transport src/util
Date: Thu, 28 May 2009 20:39:55 -0600

Author: grothoff
Date: 2009-05-28 20:39:55 -0600 (Thu, 28 May 2009)
New Revision: 8476

Modified:
   gnunet/TODO
   gnunet/src/arm/gnunet-service-arm.c
   gnunet/src/core/core_api.c
   gnunet/src/core/gnunet-service-core.c
   gnunet/src/include/gnunet_server_lib.h
   gnunet/src/peerinfo/gnunet-service-peerinfo.c
   gnunet/src/resolver/gnunet-service-resolver.c
   gnunet/src/statistics/gnunet-service-statistics.c
   gnunet/src/statistics/statistics_api.c
   gnunet/src/transport/gnunet-service-transport.c
   gnunet/src/transport/plugin_transport_http.c
   gnunet/src/transport/plugin_transport_tcp.c
   gnunet/src/transport/transport_api.c
   gnunet/src/util/client.c
   gnunet/src/util/crypto_rsa.c
   gnunet/src/util/network.c
   gnunet/src/util/os_network.c
   gnunet/src/util/scheduler.c
   gnunet/src/util/server.c
   gnunet/src/util/service.c
   gnunet/src/util/test_client.c
   gnunet/src/util/test_crypto_ksk.c
   gnunet/src/util/test_crypto_rsa.c
   gnunet/src/util/test_network_addressing.c
   gnunet/src/util/test_server.c
   gnunet/src/util/test_server_disconnect.c
   gnunet/src/util/test_server_with_client.c
   gnunet/src/util/test_service.c
Log:
removing server from argument list, other minor fixes

Modified: gnunet/TODO
===================================================================
--- gnunet/TODO 2009-05-29 01:22:39 UTC (rev 8475)
+++ gnunet/TODO 2009-05-29 02:39:55 UTC (rev 8476)
@@ -10,7 +10,6 @@
   => bootstrap should use plugins, possible multiple at the same time!
 
 Util:
-* Should "server" argument be given in event callbacks?
 * consider adding "get_time" to "configuration" API
 
 TESTCASES WANTED:

Modified: gnunet/src/arm/gnunet-service-arm.c
===================================================================
--- gnunet/src/arm/gnunet-service-arm.c 2009-05-29 01:22:39 UTC (rev 8475)
+++ gnunet/src/arm/gnunet-service-arm.c 2009-05-29 02:39:55 UTC (rev 8476)
@@ -327,8 +327,7 @@
  * Start the specified service.
  */
 static void
-start_service (struct GNUNET_SERVER_Handle *server,
-               struct GNUNET_SERVER_Client *client, const char *servicename)
+start_service (struct GNUNET_SERVER_Client *client, const char *servicename)
 {
   struct ServiceList *sl;
   char *binary;
@@ -368,6 +367,7 @@
                   config, servicename);
       signal_result (client, servicename, GNUNET_MESSAGE_TYPE_ARM_IS_DOWN);
       GNUNET_free (binary);
+      GNUNET_free (config);
       return;
     }
   GNUNET_log (GNUNET_ERROR_TYPE_INFO,
@@ -403,8 +403,7 @@
  * Stop the specified service.
  */
 static void
-stop_service (struct GNUNET_SERVER_Handle *server,
-              struct GNUNET_SERVER_Client *client, const char *servicename)
+stop_service (struct GNUNET_SERVER_Client *client, const char *servicename)
 {
   struct ServiceList *pos;
   struct GNUNET_CLIENT_Connection *sc;
@@ -412,7 +411,7 @@
   GNUNET_log (GNUNET_ERROR_TYPE_INFO,
               "Preparing to stop `%s'\n", servicename);
   pos = find_name (servicename);
-  if (pos->kill_continuation != NULL)
+  if ((pos != NULL) && (pos->kill_continuation != NULL))
     {
       /* killing already in progress */
       signal_result (client, servicename, GNUNET_MESSAGE_TYPE_ARM_IS_DOWN);
@@ -453,7 +452,6 @@
  * Handle START-message.
  *
  * @param cls closure (always NULL)
- * @param server the server handling the message
  * @param client identification of the client
  * @param message the actual message
  * @return GNUNET_OK to keep the connection open,
@@ -461,7 +459,6 @@
  */
 static void
 handle_start (void *cls,
-              struct GNUNET_SERVER_Handle *server,
               struct GNUNET_SERVER_Client *client,
               const struct GNUNET_MessageHeader *message)
 {
@@ -477,7 +474,7 @@
       GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
       return;
     }
-  start_service (server, client, servicename);
+  start_service (client, servicename);
   GNUNET_SERVER_receive_done (client, GNUNET_OK);
 }
 
@@ -486,7 +483,6 @@
  * Handle STOP-message.
  *
  * @param cls closure (always NULL)
- * @param server the server handling the message
  * @param client identification of the client
  * @param message the actual message
  * @return GNUNET_OK to keep the connection open,
@@ -494,7 +490,6 @@
  */
 static void
 handle_stop (void *cls,
-             struct GNUNET_SERVER_Handle *server,
              struct GNUNET_SERVER_Client *client,
              const struct GNUNET_MessageHeader *message)
 {
@@ -510,7 +505,7 @@
       GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
       return;
     }
-  stop_service (server, client, servicename);
+  stop_service (client, servicename);
 }
 
 
@@ -669,7 +664,7 @@
       pos = strtok (defaultservices, " ");
       while (pos != NULL)
         {
-          start_service (server, NULL, pos);
+          start_service (NULL, pos);
           pos = strtok (NULL, " ");
         }
       GNUNET_free (defaultservices);

Modified: gnunet/src/core/core_api.c
===================================================================
--- gnunet/src/core/core_api.c  2009-05-29 01:22:39 UTC (rev 8475)
+++ gnunet/src/core/core_api.c  2009-05-29 02:39:55 UTC (rev 8476)
@@ -732,8 +732,8 @@
   GNUNET_CLIENT_receive (h->client,
                          &init_reply_handler,
                          h,
-                         GNUNET_TIME_absolute_get_remaining (h->
-                                                             startup_timeout));
+                         GNUNET_TIME_absolute_get_remaining
+                         (h->startup_timeout));
   return sizeof (struct InitMessage) + h->hcnt * sizeof (uint16_t);
 }
 

Modified: gnunet/src/core/gnunet-service-core.c
===================================================================
--- gnunet/src/core/gnunet-service-core.c       2009-05-29 01:22:39 UTC (rev 
8475)
+++ gnunet/src/core/gnunet-service-core.c       2009-05-29 02:39:55 UTC (rev 
8476)
@@ -834,7 +834,6 @@
  */
 static void
 handle_client_init (void *cls,
-                    struct GNUNET_SERVER_Handle *server,
                     struct GNUNET_SERVER_Client *client,
                     const struct GNUNET_MessageHeader *message)
 {
@@ -948,7 +947,6 @@
  */
 static void
 handle_client_request_configure (void *cls,
-                                 struct GNUNET_SERVER_Handle *server,
                                  struct GNUNET_SERVER_Client *client,
                                  const struct GNUNET_MessageHeader *message)
 {
@@ -1102,8 +1100,9 @@
               "Asking transport for transmission of %u bytes to `%4s' in next 
%llu ms\n",
               n->encrypted_head->size,
               GNUNET_i2s (&n->peer),
-              GNUNET_TIME_absolute_get_remaining (n->encrypted_head->
-                                                  deadline).value);
+              GNUNET_TIME_absolute_get_remaining (n->
+                                                  encrypted_head->deadline).
+              value);
   n->th =
     GNUNET_TRANSPORT_notify_transmit_ready (transport, &n->peer,
                                             n->encrypted_head->size,
@@ -1307,6 +1306,7 @@
         }
       if (discard_low_prio)
         {
+          GNUNET_assert (min != NULL);
           /* remove lowest-priority entry from consideration */
           min->do_transmit = GNUNET_YES;        /* means: discard (for now) */
         }
@@ -1580,7 +1580,6 @@
  */
 static void
 handle_client_send (void *cls,
-                    struct GNUNET_SERVER_Handle *server,
                     struct GNUNET_SERVER_Client *client,
                     const struct GNUNET_MessageHeader *message);
 
@@ -1612,7 +1611,7 @@
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Connection to peer `%4s' succeeded, retrying original send 
request\n",
               GNUNET_i2s (&sm->peer));
-  handle_client_send (NULL, NULL, NULL, &sm->header);
+  handle_client_send (NULL, NULL, &sm->header);
   GNUNET_free (sm);
   return 0;
 }
@@ -1623,7 +1622,6 @@
  */
 static void
 handle_client_send (void *cls,
-                    struct GNUNET_SERVER_Handle *server,
                     struct GNUNET_SERVER_Client *client,
                     const struct GNUNET_MessageHeader *message)
 {

Modified: gnunet/src/include/gnunet_server_lib.h
===================================================================
--- gnunet/src/include/gnunet_server_lib.h      2009-05-29 01:22:39 UTC (rev 
8475)
+++ gnunet/src/include/gnunet_server_lib.h      2009-05-29 02:39:55 UTC (rev 
8476)
@@ -64,13 +64,10 @@
  * received.
  *
  * @param cls closure
- * @param server the server handling the message
  * @param client identification of the client
  * @param message the actual message
  */
 typedef void (*GNUNET_SERVER_MessageCallback) (void *cls,
-                                               struct GNUNET_SERVER_Handle *
-                                               server,
                                                struct GNUNET_SERVER_Client *
                                                client,
                                                const struct

Modified: gnunet/src/peerinfo/gnunet-service-peerinfo.c
===================================================================
--- gnunet/src/peerinfo/gnunet-service-peerinfo.c       2009-05-29 01:22:39 UTC 
(rev 8475)
+++ gnunet/src/peerinfo/gnunet-service-peerinfo.c       2009-05-29 02:39:55 UTC 
(rev 8476)
@@ -385,9 +385,7 @@
  */
 static void
 send_to_each_host (const struct GNUNET_PeerIdentity *only,
-                   int trust_change,
-                   struct GNUNET_SERVER_Client *client,
-                   struct GNUNET_SERVER_Handle *server)
+                   int trust_change, struct GNUNET_SERVER_Client *client)
 {
   struct HostEntry *pos;
   struct InfoMessage *im;
@@ -550,13 +548,11 @@
  * Handle ADD-message.
  *
  * @param cls closure
- * @param server the server handling the message
  * @param client identification of the client
  * @param message the actual message
  */
 static void
 handle_add (void *cls,
-            struct GNUNET_SERVER_Handle *server,
             struct GNUNET_SERVER_Client *client,
             const struct GNUNET_MessageHeader *message)
 {
@@ -589,20 +585,18 @@
  * Handle GET-message.
  *
  * @param cls closure
- * @param server the server handling the message
  * @param client identification of the client
  * @param message the actual message
  */
 static void
 handle_get (void *cls,
-            struct GNUNET_SERVER_Handle *server,
             struct GNUNET_SERVER_Client *client,
             const struct GNUNET_MessageHeader *message)
 {
   const struct ListPeerMessage *lpm;
 
   lpm = (const struct ListPeerMessage *) message;
-  send_to_each_host (&lpm->peer, ntohl (lpm->trust_change), client, server);
+  send_to_each_host (&lpm->peer, ntohl (lpm->trust_change), client);
 }
 
 
@@ -610,20 +604,18 @@
  * Handle GET-ALL-message.
  *
  * @param cls closure
- * @param server the server handling the message
  * @param client identification of the client
  * @param message the actual message
  */
 static void
 handle_get_all (void *cls,
-                struct GNUNET_SERVER_Handle *server,
                 struct GNUNET_SERVER_Client *client,
                 const struct GNUNET_MessageHeader *message)
 {
   const struct ListAllPeersMessage *lpm;
 
   lpm = (const struct ListAllPeersMessage *) message;
-  send_to_each_host (NULL, ntohl (lpm->trust_change), client, server);
+  send_to_each_host (NULL, ntohl (lpm->trust_change), client);
 }
 
 

Modified: gnunet/src/resolver/gnunet-service-resolver.c
===================================================================
--- gnunet/src/resolver/gnunet-service-resolver.c       2009-05-29 01:22:39 UTC 
(rev 8475)
+++ gnunet/src/resolver/gnunet-service-resolver.c       2009-05-29 02:39:55 UTC 
(rev 8476)
@@ -368,13 +368,11 @@
  * Handle GET-message.
  *
  * @param cls closure
- * @param server the server handling the message
  * @param client identification of the client
  * @param message the actual message
  */
 static void
 handle_get (void *cls,
-            struct GNUNET_SERVER_Handle *server,
             struct GNUNET_SERVER_Client *client,
             const struct GNUNET_MessageHeader *message)
 {

Modified: gnunet/src/statistics/gnunet-service-statistics.c
===================================================================
--- gnunet/src/statistics/gnunet-service-statistics.c   2009-05-29 01:22:39 UTC 
(rev 8475)
+++ gnunet/src/statistics/gnunet-service-statistics.c   2009-05-29 02:39:55 UTC 
(rev 8476)
@@ -259,7 +259,6 @@
  * Handle GET-message.
  *
  * @param cls closure
- * @param server the server handling the message
  * @param client identification of the client
  * @param message the actual message
  * @return GNUNET_OK to keep the connection open,
@@ -267,7 +266,6 @@
  */
 static void
 handle_get (void *cls,
-            struct GNUNET_SERVER_Handle *server,
             struct GNUNET_SERVER_Client *client,
             const struct GNUNET_MessageHeader *message)
 {
@@ -308,13 +306,11 @@
  * Handle SET-message.
  *
  * @param cls closure
- * @param server the server handling the message
  * @param client identification of the client
  * @param message the actual message
  */
 static void
 handle_set (void *cls,
-            struct GNUNET_SERVER_Handle *server,
             struct GNUNET_SERVER_Client *client,
             const struct GNUNET_MessageHeader *message)
 {

Modified: gnunet/src/statistics/statistics_api.c
===================================================================
--- gnunet/src/statistics/statistics_api.c      2009-05-29 01:22:39 UTC (rev 
8475)
+++ gnunet/src/statistics/statistics_api.c      2009-05-29 02:39:55 UTC (rev 
8476)
@@ -369,9 +369,8 @@
           GNUNET_CLIENT_receive (h->client,
                                  &receive_stats,
                                  h,
-                                 GNUNET_TIME_absolute_get_remaining (h->
-                                                                     current->
-                                                                     timeout));
+                                 GNUNET_TIME_absolute_get_remaining
+                                 (h->current->timeout));
           return;
         }
       GNUNET_break (0);
@@ -422,8 +421,8 @@
   GNUNET_CLIENT_receive (handle->client,
                          &receive_stats,
                          handle,
-                         GNUNET_TIME_absolute_get_remaining (handle->current->
-                                                             timeout));
+                         GNUNET_TIME_absolute_get_remaining (handle->
+                                                             
current->timeout));
   return msize;
 }
 

Modified: gnunet/src/transport/gnunet-service-transport.c
===================================================================
--- gnunet/src/transport/gnunet-service-transport.c     2009-05-29 01:22:39 UTC 
(rev 8475)
+++ gnunet/src/transport/gnunet-service-transport.c     2009-05-29 02:39:55 UTC 
(rev 8476)
@@ -1632,9 +1632,8 @@
                                   GNUNET_NO,
                                   GNUNET_SCHEDULER_PRIORITY_IDLE,
                                   GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
-                                  GNUNET_TIME_absolute_get_remaining (pos->
-                                                                      timeout),
-                                  &cleanup_validation, NULL);
+                                  GNUNET_TIME_absolute_get_remaining
+                                  (pos->timeout), &cleanup_validation, NULL);
 }
 
 
@@ -1725,7 +1724,9 @@
     {
       first_call = GNUNET_YES;
       chvc->e = GNUNET_malloc (sizeof (struct ValidationList));
-      GNUNET_HELLO_get_key (h != NULL ? h : chvc->hello, &chvc->e->publicKey);
+      GNUNET_assert (GNUNET_OK ==
+                     GNUNET_HELLO_get_key (h != NULL ? h : chvc->hello,
+                                           &chvc->e->publicKey));
       chvc->e->timeout =
         GNUNET_TIME_relative_to_absolute (HELLO_VERIFICATION_TIMEOUT);
       chvc->e->next = pending_validations;
@@ -1777,10 +1778,9 @@
                                   GNUNET_NO,
                                   GNUNET_SCHEDULER_PRIORITY_IDLE,
                                   GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
-                                  GNUNET_TIME_absolute_get_remaining (chvc->
-                                                                      e->
-                                                                      timeout),
-                                  &cleanup_validation, NULL);
+                                  GNUNET_TIME_absolute_get_remaining
+                                  (chvc->e->timeout), &cleanup_validation,
+                                  NULL);
   GNUNET_free (chvc);
 }
 
@@ -1935,6 +1935,11 @@
               "Trying to transmit PONG using inbound connection\n");
 #endif
   n = find_neighbour (sender);
+  if (n == NULL)
+    {
+      GNUNET_break (0);
+      return;
+    }
   transmit_to_peer (NULL, &vcr.header, GNUNET_YES, n);
 }
 
@@ -2350,13 +2355,11 @@
  * by any client which causes us to add it to our list.
  *
  * @param cls closure (always NULL)
- * @param server the server handling the message
  * @param client identification of the client
  * @param message the actual message
  */
 static void
 handle_start (void *cls,
-              struct GNUNET_SERVER_Handle *server,
               struct GNUNET_SERVER_Client *client,
               const struct GNUNET_MessageHeader *message)
 {
@@ -2429,13 +2432,11 @@
  * Handle HELLO-message.
  *
  * @param cls closure (always NULL)
- * @param server the server handling the message
  * @param client identification of the client
  * @param message the actual message
  */
 static void
 handle_hello (void *cls,
-              struct GNUNET_SERVER_Handle *server,
               struct GNUNET_SERVER_Client *client,
               const struct GNUNET_MessageHeader *message)
 {
@@ -2454,13 +2455,11 @@
  * Handle SEND-message.
  *
  * @param cls closure (always NULL)
- * @param server the server handling the message
  * @param client identification of the client
  * @param message the actual message
  */
 static void
 handle_send (void *cls,
-             struct GNUNET_SERVER_Handle *server,
              struct GNUNET_SERVER_Client *client,
              const struct GNUNET_MessageHeader *message)
 {
@@ -2515,13 +2514,11 @@
  * Handle SET_QUOTA-message.
  *
  * @param cls closure (always NULL)
- * @param server the server handling the message
  * @param client identification of the client
  * @param message the actual message
  */
 static void
 handle_set_quota (void *cls,
-                  struct GNUNET_SERVER_Handle *server,
                   struct GNUNET_SERVER_Client *client,
                   const struct GNUNET_MessageHeader *message)
 {
@@ -2562,13 +2559,11 @@
  * Handle TRY_CONNECT-message.
  *
  * @param cls closure (always NULL)
- * @param server the server handling the message
  * @param client identification of the client
  * @param message the actual message
  */
 static void
 handle_try_connect (void *cls,
-                    struct GNUNET_SERVER_Handle *server,
                     struct GNUNET_SERVER_Client *client,
                     const struct GNUNET_MessageHeader *message)
 {

Modified: gnunet/src/transport/plugin_transport_http.c
===================================================================
--- gnunet/src/transport/plugin_transport_http.c        2009-05-29 01:22:39 UTC 
(rev 8475)
+++ gnunet/src/transport/plugin_transport_http.c        2009-05-29 02:39:55 UTC 
(rev 8476)
@@ -1006,8 +1006,9 @@
           cpy = sizeof (GNUNET_MessageHeader) - httpSession->cs.client.rpos1;
           if (cpy > have)
             cpy = have;
-          memcpy (&httpSession->cs.client.
-                  rbuff1[httpSession->cs.client.rpos1], &inbuf[poff], cpy);
+          memcpy (&httpSession->cs.
+                  client.rbuff1[httpSession->cs.client.rpos1], &inbuf[poff],
+                  cpy);
           httpSession->cs.client.rpos1 += cpy;
           have -= cpy;
           poff += cpy;
@@ -1027,8 +1028,9 @@
             httpSession->cs.client.rpos2;
           if (cpy > have)
             cpy = have;
-          memcpy (&httpSession->cs.client.
-                  rbuff2[httpSession->cs.client.rpos2], &inbuf[poff], cpy);
+          memcpy (&httpSession->cs.
+                  client.rbuff2[httpSession->cs.client.rpos2], &inbuf[poff],
+                  cpy);
           have -= cpy;
           poff += cpy;
           httpSession->cs.client.rpos2 += cpy;

Modified: gnunet/src/transport/plugin_transport_tcp.c
===================================================================
--- gnunet/src/transport/plugin_transport_tcp.c 2009-05-29 01:22:39 UTC (rev 
8475)
+++ gnunet/src/transport/plugin_transport_tcp.c 2009-05-29 02:39:55 UTC (rev 
8476)
@@ -620,14 +620,16 @@
     return;
   session->transmit_handle
     = GNUNET_SERVER_notify_transmit_ready (session->client,
-                                           htons (session->pending_messages->
-                                                  msg->size) +
-                                           (session->pending_messages->
-                                            is_welcome ? 0 : sizeof (struct
-                                                                     
DataMessage)),
+                                           htons (session->
+                                                  pending_messages->msg->
+                                                  size) +
+                                           (session->
+                                            pending_messages->is_welcome ? 0 :
+                                            sizeof (struct DataMessage)),
                                            GNUNET_TIME_absolute_get_remaining
-                                           (session->pending_messages[0].
-                                            timeout), &do_transmit, session);
+                                           (session->
+                                            pending_messages[0].timeout),
+                                           &do_transmit, session);
 }
 
 
@@ -1354,13 +1356,11 @@
  * our welcome.
  *
  * @param cls closure
- * @param server the server handling the message
  * @param client identification of the client
  * @param message the actual message
  */
 static void
 handle_tcp_welcome (void *cls,
-                    struct GNUNET_SERVER_Handle *server,
                     struct GNUNET_SERVER_Client *client,
                     const struct GNUNET_MessageHeader *message)
 {
@@ -1464,13 +1464,11 @@
  * compute latency and forward.
  *
  * @param cls closure
- * @param server the server handling the message
  * @param client identification of the client
  * @param message the actual message
  */
 static void
 handle_tcp_data (void *cls,
-                 struct GNUNET_SERVER_Handle *server,
                  struct GNUNET_SERVER_Client *client,
                  const struct GNUNET_MessageHeader *message)
 {

Modified: gnunet/src/transport/transport_api.c
===================================================================
--- gnunet/src/transport/transport_api.c        2009-05-29 01:22:39 UTC (rev 
8475)
+++ gnunet/src/transport/transport_api.c        2009-05-29 02:39:55 UTC (rev 
8476)
@@ -1350,9 +1350,8 @@
                                     GNUNET_NO,
                                     GNUNET_SCHEDULER_PRIORITY_KEEP,
                                     GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
-                                    GNUNET_TIME_absolute_get_remaining (th->
-                                                                        
timeout),
-                                    &transmit_timeout, th);
+                                    GNUNET_TIME_absolute_get_remaining
+                                    (th->timeout), &transmit_timeout, th);
   insert_transmit_handle (&h->connect_wait_head, th);
   return sizeof (struct TryConnectMessage);
 }
@@ -1653,9 +1652,8 @@
     default:
       GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                   _
-                  ("Received unexpected message of type %u from `%4s' in 
%s:%u\n"),
-                  ntohs (msg->type), GNUNET_i2s (&im->peer), __FILE__,
-                  __LINE__);
+                  ("Received unexpected message of type %u in %s:%u\n"),
+                  ntohs (msg->type), __FILE__, __LINE__);
       GNUNET_break (0);
       break;
     }

Modified: gnunet/src/util/client.c
===================================================================
--- gnunet/src/util/client.c    2009-05-29 01:22:39 UTC (rev 8475)
+++ gnunet/src/util/client.c    2009-05-29 02:39:55 UTC (rev 8476)
@@ -202,8 +202,8 @@
 {
   if ((conn->received_pos >= sizeof (struct GNUNET_MessageHeader)) &&
       (conn->received_pos >=
-       ntohs (((const struct GNUNET_MessageHeader *) conn->received_buf)->
-              size)))
+       ntohs (((const struct GNUNET_MessageHeader *) conn->
+               received_buf)->size)))
     conn->msg_complete = GNUNET_YES;
 }
 

Modified: gnunet/src/util/crypto_rsa.c
===================================================================
--- gnunet/src/util/crypto_rsa.c        2009-05-29 01:22:39 UTC (rev 8475)
+++ gnunet/src/util/crypto_rsa.c        2009-05-29 02:39:55 UTC (rev 8476)
@@ -219,8 +219,8 @@
     GNUNET_CRYPTO_RSA_KEY_LENGTH - GNUNET_CRYPTO_RSA_DATA_ENCODING_LENGTH;
   GNUNET_assert (0 ==
                  gcry_mpi_print (GCRYMPI_FMT_USG,
-                                 &result->
-                                 key[GNUNET_CRYPTO_RSA_DATA_ENCODING_LENGTH],
+                                 &result->key
+                                 [GNUNET_CRYPTO_RSA_DATA_ENCODING_LENGTH],
                                  size, &size, skey[1]));
   adjust (&result->key[GNUNET_CRYPTO_RSA_DATA_ENCODING_LENGTH], size,
           GNUNET_CRYPTO_RSA_KEY_LENGTH -
@@ -704,6 +704,7 @@
   enc = GNUNET_malloc (sbuf.st_size);
   GNUNET_assert (sbuf.st_size == READ (fd, enc, sbuf.st_size));
   len = ntohs (enc->len);
+  ret = NULL;
   if ((len != sbuf.st_size) || (NULL == (ret = rsa_decode_key (enc))))
     {
       GNUNET_log (GNUNET_ERROR_TYPE_ERROR,

Modified: gnunet/src/util/network.c
===================================================================
--- gnunet/src/util/network.c   2009-05-29 01:22:39 UTC (rev 8475)
+++ gnunet/src/util/network.c   2009-05-29 02:39:55 UTC (rev 8476)
@@ -294,8 +294,9 @@
                       inet_ntop (fam,
                                  (fam == AF_INET6)
                                  ? (const void *) &((struct sockaddr_in6 *)
-                                                    &addr)->
-                                 sin6_addr : (const void *)
+                                                    &addr)->sin6_addr : (const
+                                                                         void
+                                                                         *)
                                  &((struct sockaddr_in *) &addr)->sin_addr,
                                  msg, sizeof (msg)));
         }

Modified: gnunet/src/util/os_network.c
===================================================================
--- gnunet/src/util/os_network.c        2009-05-29 01:22:39 UTC (rev 8475)
+++ gnunet/src/util/os_network.c        2009-05-29 02:39:55 UTC (rev 8476)
@@ -135,9 +135,10 @@
                       pTable->table[dwIfIdx].dwPhysAddrLen);
 
               snprintf (szEntry, 1000, "%s (%s - %I64u)",
-                        pszIfName ? pszIfName : (char *) pTable->
-                        table[dwIfIdx].bDescr, inet_ntop (AF_INET, &dwIP, dst,
-                                                          INET_ADDRSTRLEN),
+                        pszIfName ? pszIfName : (char *)
+                        pTable->table[dwIfIdx].bDescr, inet_ntop (AF_INET,
+                                                                  &dwIP, dst,
+                                                                  
INET_ADDRSTRLEN),
                         *((unsigned long long *) bPhysAddr));
               szEntry[1000] = 0;
 

Modified: gnunet/src/util/scheduler.c
===================================================================
--- gnunet/src/util/scheduler.c 2009-05-29 01:22:39 UTC (rev 8475)
+++ gnunet/src/util/scheduler.c 2009-05-29 02:39:55 UTC (rev 8476)
@@ -874,8 +874,8 @@
   task->timeout = GNUNET_TIME_relative_to_absolute (delay);
   task->priority =
     check_priority ((prio ==
-                     GNUNET_SCHEDULER_PRIORITY_KEEP) ? sched->
-                    current_priority : prio);
+                     GNUNET_SCHEDULER_PRIORITY_KEEP) ? sched->current_priority
+                    : prio);
   task->nfds = nfds;
   task->run_on_shutdown = run_on_shutdown;
   task->next = sched->pending;

Modified: gnunet/src/util/server.c
===================================================================
--- gnunet/src/util/server.c    2009-05-29 01:22:39 UTC (rev 8475)
+++ gnunet/src/util/server.c    2009-05-29 02:39:55 UTC (rev 8476)
@@ -565,7 +565,7 @@
                 }
               if (sender != NULL)
                 sender->suspended++;
-              mh->callback (mh->callback_cls, server, sender, message);
+              mh->callback (mh->callback_cls, sender, message);
               found = GNUNET_YES;
             }
           i++;

Modified: gnunet/src/util/service.c
===================================================================
--- gnunet/src/util/service.c   2009-05-29 01:22:39 UTC (rev 8475)
+++ gnunet/src/util/service.c   2009-05-29 02:39:55 UTC (rev 8476)
@@ -545,13 +545,11 @@
  * Handler for TEST message.
  *
  * @param cls closure (refers to service)
- * @param server the server handling the message
  * @param client identification of the client
  * @param message the actual message
  */
 static void
 handle_test (void *cls,
-             struct GNUNET_SERVER_Handle *server,
              struct GNUNET_SERVER_Client *client,
              const struct GNUNET_MessageHeader *message)
 {
@@ -569,13 +567,11 @@
  * Handler for SHUTDOWN message.
  *
  * @param cls closure (refers to service)
- * @param server the server handling the message
  * @param client identification of the client
  * @param message the actual message
  */
 static void
 handle_shutdown (void *cls,
-                 struct GNUNET_SERVER_Handle *server,
                  struct GNUNET_SERVER_Client *client,
                  const struct GNUNET_MessageHeader *message)
 {
@@ -805,8 +801,7 @@
     {
       if (GNUNET_SYSERR ==
           (disablev6 = GNUNET_CONFIGURATION_get_value_yesno (sctx->cfg,
-                                                             sctx->
-                                                             serviceName,
+                                                             sctx->serviceName,
                                                              "DISABLEV6")))
         return GNUNET_SYSERR;
     }

Modified: gnunet/src/util/test_client.c
===================================================================
--- gnunet/src/util/test_client.c       2009-05-29 01:22:39 UTC (rev 8475)
+++ gnunet/src/util/test_client.c       2009-05-29 02:39:55 UTC (rev 8476)
@@ -70,7 +70,6 @@
  */
 static void
 echo_cb (void *cls,
-         struct GNUNET_SERVER_Handle *server,
          struct GNUNET_SERVER_Client *client,
          const struct GNUNET_MessageHeader *message)
 {

Modified: gnunet/src/util/test_crypto_ksk.c
===================================================================
--- gnunet/src/util/test_crypto_ksk.c   2009-05-29 01:22:39 UTC (rev 8475)
+++ gnunet/src/util/test_crypto_ksk.c   2009-05-29 02:39:55 UTC (rev 8476)
@@ -128,8 +128,8 @@
     }
   printf ("%d RSA encrypt/decrypt operations %llums (%d failures)\n",
           ITER,
-          (unsigned long long) GNUNET_TIME_absolute_get_duration (start).
-          value, ok);
+          (unsigned long long)
+          GNUNET_TIME_absolute_get_duration (start).value, ok);
   if (ok == 0)
     return GNUNET_OK;
   else
@@ -179,8 +179,8 @@
     }
   printf ("%d RSA sign/verify operations %llums\n",
           ITER,
-          (unsigned long long) GNUNET_TIME_absolute_get_duration (start).
-          value);
+          (unsigned long long)
+          GNUNET_TIME_absolute_get_duration (start).value);
   return ok;
 }
 

Modified: gnunet/src/util/test_crypto_rsa.c
===================================================================
--- gnunet/src/util/test_crypto_rsa.c   2009-05-29 01:22:39 UTC (rev 8475)
+++ gnunet/src/util/test_crypto_rsa.c   2009-05-29 02:39:55 UTC (rev 8476)
@@ -83,8 +83,8 @@
     }
   printf ("%d RSA encrypt/decrypt operations %llums (%d failures)\n",
           ITER,
-          (unsigned long long) GNUNET_TIME_absolute_get_duration (start).
-          value, ok);
+          (unsigned long long)
+          GNUNET_TIME_absolute_get_duration (start).value, ok);
   GNUNET_CRYPTO_rsa_key_free (hostkey);
   if (ok == 0)
     return GNUNET_OK;
@@ -123,8 +123,8 @@
     }
   printf ("%d RSA encrypt operations %llu ms (%d failures)\n",
           ITER,
-          (unsigned long long) GNUNET_TIME_absolute_get_duration (start).
-          value, ok);
+          (unsigned long long)
+          GNUNET_TIME_absolute_get_duration (start).value, ok);
   GNUNET_CRYPTO_rsa_key_free (hostkey);
   if (ok != 0)
     return GNUNET_SYSERR;
@@ -182,8 +182,8 @@
     }
   printf ("%d RSA encrypt/decrypt SK operations %llus (%d failures)\n",
           ITER,
-          (unsigned long long) GNUNET_TIME_absolute_get_duration (start).
-          value, ok);
+          (unsigned long long)
+          GNUNET_TIME_absolute_get_duration (start).value, ok);
   GNUNET_CRYPTO_rsa_key_free (hostkey);
   if (ok != 0)
     return GNUNET_SYSERR;
@@ -237,8 +237,8 @@
     }
   printf ("%d RSA sign/verify operations %llums\n",
           ITER,
-          (unsigned long long) GNUNET_TIME_absolute_get_duration (start).
-          value);
+          (unsigned long long)
+          GNUNET_TIME_absolute_get_duration (start).value);
   GNUNET_CRYPTO_rsa_key_free (hostkey);
   return ok;
 }

Modified: gnunet/src/util/test_network_addressing.c
===================================================================
--- gnunet/src/util/test_network_addressing.c   2009-05-29 01:22:39 UTC (rev 
8475)
+++ gnunet/src/util/test_network_addressing.c   2009-05-29 02:39:55 UTC (rev 
8476)
@@ -117,6 +117,7 @@
   expect.sin_port = v4->sin_port;
   expect.sin_addr.s_addr = htonl (INADDR_LOOPBACK);
   GNUNET_assert (0 == memcmp (&expect, v4, alen));
+  GNUNET_free (addr);
   GNUNET_NETWORK_socket_destroy (lsock);
   GNUNET_NETWORK_receive (asock,
                           1024,

Modified: gnunet/src/util/test_server.c
===================================================================
--- gnunet/src/util/test_server.c       2009-05-29 01:22:39 UTC (rev 8475)
+++ gnunet/src/util/test_server.c       2009-05-29 02:39:55 UTC (rev 8476)
@@ -40,7 +40,6 @@
 
 static void
 recv_fin_cb (void *cls,
-             struct GNUNET_SERVER_Handle *server,
              struct GNUNET_SERVER_Client *client,
              const struct GNUNET_MessageHeader *message)
 {
@@ -177,7 +176,6 @@
 
 static void
 recv_cb (void *cls,
-         struct GNUNET_SERVER_Handle *server,
          struct GNUNET_SERVER_Client *argclient,
          const struct GNUNET_MessageHeader *message)
 {

Modified: gnunet/src/util/test_server_disconnect.c
===================================================================
--- gnunet/src/util/test_server_disconnect.c    2009-05-29 01:22:39 UTC (rev 
8475)
+++ gnunet/src/util/test_server_disconnect.c    2009-05-29 02:39:55 UTC (rev 
8476)
@@ -67,7 +67,6 @@
 
 static void
 recv_cb (void *cls,
-         struct GNUNET_SERVER_Handle *server,
          struct GNUNET_SERVER_Client *argclient,
          const struct GNUNET_MessageHeader *message)
 {

Modified: gnunet/src/util/test_server_with_client.c
===================================================================
--- gnunet/src/util/test_server_with_client.c   2009-05-29 01:22:39 UTC (rev 
8475)
+++ gnunet/src/util/test_server_with_client.c   2009-05-29 02:39:55 UTC (rev 
8476)
@@ -59,7 +59,6 @@
 
 static void
 recv_cb (void *cls,
-         struct GNUNET_SERVER_Handle *server,
          struct GNUNET_SERVER_Client *argclient,
          const struct GNUNET_MessageHeader *message)
 {

Modified: gnunet/src/util/test_service.c
===================================================================
--- gnunet/src/util/test_service.c      2009-05-29 01:22:39 UTC (rev 8475)
+++ gnunet/src/util/test_service.c      2009-05-29 02:39:55 UTC (rev 8476)
@@ -92,7 +92,6 @@
 
 static void
 recv_cb (void *cls,
-         struct GNUNET_SERVER_Handle *server,
          struct GNUNET_SERVER_Client *client,
          const struct GNUNET_MessageHeader *message)
 {





reply via email to

[Prev in Thread] Current Thread [Next in Thread]