Remove leftovers of architecture change
authorJulius Bünger <buenger@mytum.de>
Wed, 26 Sep 2018 19:14:13 +0000 (21:14 +0200)
committerJulius Bünger <buenger@mytum.de>
Wed, 26 Sep 2018 19:14:13 +0000 (21:14 +0200)
src/rps/gnunet-service-rps.c

index e3714bdba34107d5500163cf2239d62b71af54e9..3dd887d4788d5c02b3377b67c3b6c871db7a1d37 100644 (file)
@@ -1758,12 +1758,6 @@ struct ClientContext
    */
   struct GNUNET_MQ_Handle *mq;
 
-  /**
-   * DLL with handles to single requests from the client
-   */
-  struct ReplyCls *rep_cls_head;
-  struct ReplyCls *rep_cls_tail;
-
   /**
    * @brief How many updates this client expects to receive.
    */
@@ -2596,35 +2590,10 @@ cleanup_destroyed_channel (void *cls,
  * /Util functions
 ***********************************************************************/
 
-static void
-destroy_reply_cls (struct ReplyCls *rep_cls)
-{
-  struct ClientContext *cli_ctx;
-
-  cli_ctx = rep_cls->cli_ctx;
-  GNUNET_assert (NULL != cli_ctx);
-  if (NULL != rep_cls->req_handle)
-  {
-    RPS_sampler_request_cancel (rep_cls->req_handle);
-  }
-  GNUNET_CONTAINER_DLL_remove (cli_ctx->rep_cls_head,
-                               cli_ctx->rep_cls_tail,
-                               rep_cls);
-  GNUNET_free (rep_cls);
-}
-
-
 static void
 destroy_cli_ctx (struct ClientContext *cli_ctx)
 {
   GNUNET_assert (NULL != cli_ctx);
-  if (NULL != cli_ctx->rep_cls_head)
-  {
-    LOG (GNUNET_ERROR_TYPE_WARNING,
-         "Trying to destroy the context of a client that still has pending requests. Going to clean those\n");
-    while (NULL != cli_ctx->rep_cls_head)
-      destroy_reply_cls (cli_ctx->rep_cls_head);
-  }
   GNUNET_CONTAINER_DLL_remove (cli_ctx_head,
                                cli_ctx_tail,
                                cli_ctx);
@@ -3800,21 +3769,7 @@ shutdown_task (void *cls)
        NULL != cli_ctx_head;
        client_ctx = cli_ctx_head)
   {
-    /* Clean pending requests to the sampler */
-    for (reply_cls = client_ctx->rep_cls_head;
-         NULL != client_ctx->rep_cls_head;
-         reply_cls = client_ctx->rep_cls_head)
-    {
-      RPS_sampler_request_cancel (reply_cls->req_handle);
-      GNUNET_CONTAINER_DLL_remove (client_ctx->rep_cls_head,
-                                   client_ctx->rep_cls_tail,
-                                   reply_cls);
-      GNUNET_free (reply_cls);
-    }
-    GNUNET_CONTAINER_DLL_remove (cli_ctx_head,
-                                 cli_ctx_tail,
-                                 client_ctx);
-    GNUNET_free (client_ctx);
+    destroy_cli_ctx (client_ctx);
   }
   GNUNET_PEERINFO_notify_cancel (peerinfo_notify_handle);
   GNUNET_PEERINFO_disconnect (peerinfo_handle);