[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r27624 - gnunet/src/regex
From: |
gnunet |
Subject: |
[GNUnet-SVN] r27624 - gnunet/src/regex |
Date: |
Wed, 26 Jun 2013 13:55:44 +0200 |
Author: grothoff
Date: 2013-06-26 13:55:44 +0200 (Wed, 26 Jun 2013)
New Revision: 27624
Modified:
gnunet/src/regex/regex_internal_dht.c
Log:
-inline trivial static function that is only called once
Modified: gnunet/src/regex/regex_internal_dht.c
===================================================================
--- gnunet/src/regex/regex_internal_dht.c 2013-06-26 11:53:06 UTC (rev
27623)
+++ gnunet/src/regex/regex_internal_dht.c 2013-06-26 11:55:44 UTC (rev
27624)
@@ -729,7 +729,6 @@
const struct GNUNET_HashCode * key,
void *value)
{
-
GNUNET_free (value);
return GNUNET_YES;
}
@@ -738,37 +737,28 @@
/**
* Cancel an ongoing regex search in the DHT and free all resources.
*
- * @param ctx The search context.
+ * @param h the search context.
*/
-static void
-regex_cancel_search (struct REGEX_INTERNAL_Search *ctx)
+void
+REGEX_INTERNAL_search_cancel (struct REGEX_INTERNAL_Search *h)
{
- GNUNET_free (ctx->description);
- GNUNET_CONTAINER_multihashmap_iterate (ctx->dht_get_handles,
+ unsigned int i;
+
+ GNUNET_free (h->description);
+ GNUNET_CONTAINER_multihashmap_iterate (h->dht_get_handles,
®ex_cancel_dht_get, NULL);
- GNUNET_CONTAINER_multihashmap_iterate (ctx->dht_get_results,
+ GNUNET_CONTAINER_multihashmap_iterate (h->dht_get_results,
®ex_free_result, NULL);
- GNUNET_CONTAINER_multihashmap_destroy (ctx->dht_get_results);
- GNUNET_CONTAINER_multihashmap_destroy (ctx->dht_get_handles);
- if (0 < ctx->n_contexts)
+ GNUNET_CONTAINER_multihashmap_destroy (h->dht_get_results);
+ GNUNET_CONTAINER_multihashmap_destroy (h->dht_get_handles);
+ if (0 < h->n_contexts)
{
- int i;
-
- for (i = 0; i < ctx->n_contexts; i++)
- {
- GNUNET_free (ctx->contexts[i]);
- }
- GNUNET_free (ctx->contexts);
+ for (i = 0; i < h->n_contexts; i++)
+ GNUNET_free (h->contexts[i]);
+ GNUNET_free (h->contexts);
}
-}
-
-void
-REGEX_INTERNAL_search_cancel (struct REGEX_INTERNAL_Search *h)
-{
- regex_cancel_search (h);
GNUNET_free (h);
}
-
-/* end of regex_dht.c */
+/* end of regex_internal_dht.c */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r27624 - gnunet/src/regex,
gnunet <=