gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [gnunet] 01/04: RPS service: cleanup (unused) data structur


From: gnunet
Subject: [GNUnet-SVN] [gnunet] 01/04: RPS service: cleanup (unused) data structures
Date: Mon, 29 Oct 2018 18:07:33 +0100

This is an automated email from the git hooks/post-receive script.

julius-buenger pushed a commit to branch master
in repository gnunet.

commit 255670708e5dd65327dd85d8cfb9f74c674167bc
Author: Julius Bünger <address@hidden>
AuthorDate: Thu Oct 25 14:43:07 2018 +0200

    RPS service: cleanup (unused) data structures
---
 src/rps/gnunet-service-rps.c      | 7 -------
 src/rps/gnunet-service-rps_view.c | 2 ++
 2 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/src/rps/gnunet-service-rps.c b/src/rps/gnunet-service-rps.c
index 288a79e7a..6d7f06090 100644
--- a/src/rps/gnunet-service-rps.c
+++ b/src/rps/gnunet-service-rps.c
@@ -953,7 +953,6 @@ remove_channel_ctx (struct ChannelCtx *channel_ctx)
 struct GNUNET_CADET_Channel *
 get_channel (struct PeerContext *peer_ctx)
 {
-  struct GNUNET_PeerIdentity *ctx_peer;
   /* There exists a copy-paste-clone in run() */
   struct GNUNET_MQ_MessageHandler cadet_handlers[] = {
     GNUNET_MQ_hd_fixed_size (peer_check,
@@ -981,8 +980,6 @@ get_channel (struct PeerContext *peer_ctx)
     LOG (GNUNET_ERROR_TYPE_DEBUG,
          "Trying to establish channel to peer %s\n",
          GNUNET_i2s (&peer_ctx->peer_id));
-    ctx_peer = GNUNET_new (struct GNUNET_PeerIdentity);
-    *ctx_peer = peer_ctx->peer_id;
     peer_ctx->send_channel_ctx = add_channel_ctx (peer_ctx);
     peer_ctx->send_channel_ctx->channel =
       GNUNET_CADET_channel_create (cadet_handle,
@@ -1845,7 +1842,6 @@ handle_inbound_channel (void *cls,
                         const struct GNUNET_PeerIdentity *initiator)
 {
   struct PeerContext *peer_ctx;
-  struct GNUNET_PeerIdentity *ctx_peer;
   struct ChannelCtx *channel_ctx;
   struct Sub *sub = cls;
 
@@ -1857,8 +1853,6 @@ handle_inbound_channel (void *cls,
   peer_ctx = create_or_get_peer_ctx (sub, initiator);
   set_peer_online (peer_ctx);
   (void) add_valid_peer (&peer_ctx->peer_id, peer_ctx->sub->valid_peers);
-  ctx_peer = GNUNET_new (struct GNUNET_PeerIdentity);
-  *ctx_peer = *initiator;
   channel_ctx = add_channel_ctx (peer_ctx);
   channel_ctx->channel = channel;
   /* We only accept one incoming channel per peer */
@@ -4487,7 +4481,6 @@ run (void *cls,
      const struct GNUNET_CONFIGURATION_Handle *c,
      struct GNUNET_SERVICE_Handle *service)
 {
-  char *fn_valid_peers;
   struct GNUNET_TIME_Relative round_interval;
   long long unsigned int sampler_size;
   char hash_port_string[] = GNUNET_APPLICATION_PORT_RPS;
diff --git a/src/rps/gnunet-service-rps_view.c 
b/src/rps/gnunet-service-rps_view.c
index 3af858e60..17fec559d 100644
--- a/src/rps/gnunet-service-rps_view.c
+++ b/src/rps/gnunet-service-rps_view.c
@@ -282,7 +282,9 @@ View_destroy (struct View *view)
 {
   View_clear (view);
   GNUNET_free (view->array);
+  view->array = NULL;
   GNUNET_CONTAINER_multipeermap_destroy (view->mpm);
+  GNUNET_free (view);
 }
 
 /* end of gnunet-service-rps_view.c */

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

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