aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLRN <LRN@140774ce-b5e7-0310-ab8b-a85725594a96>2013-02-02 17:26:06 +0000
committerLRN <LRN@140774ce-b5e7-0310-ab8b-a85725594a96>2013-02-02 17:26:06 +0000
commit8a4aa1d816f553ffdf643b6874c9987a45a99ed4 (patch)
tree6245f5702cf8fa5484b1c117fed24d97afac339b
parent7491719c566b3a278bf8e5f044a284a772f73140 (diff)
Discard large metadata items first
git-svn-id: https://gnunet.org/svn/gnunet@25988 140774ce-b5e7-0310-ab8b-a85725594a96
-rw-r--r--src/util/container_meta_data.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util/container_meta_data.c b/src/util/container_meta_data.c
index 9a02645c26..3af457cc0a 100644
--- a/src/util/container_meta_data.c
+++ b/src/util/container_meta_data.c
@@ -804,7 +804,7 @@ GNUNET_CONTAINER_meta_data_serialize (const struct GNUNET_CONTAINER_MetaData
mdata = (char *) &ent[md->item_count];
off = size - (md->item_count * sizeof (struct MetaDataEntry));
i = 0;
- for (pos = md->items_tail; NULL != pos; pos = pos->prev)
+ for (pos = md->items_head; NULL != pos; pos = pos->next)
{
ent[i].type = htonl ((uint32_t) pos->type);
ent[i].format = htonl ((uint32_t) pos->format);
@@ -835,7 +835,7 @@ GNUNET_CONTAINER_meta_data_serialize (const struct GNUNET_CONTAINER_MetaData
cdata = NULL;
left = size;
i = 0;
- for (pos = md->items_tail; NULL != pos; pos = pos->prev)
+ for (pos = md->items_head; NULL != pos; pos = pos->next)
{
comp = GNUNET_NO;
if (0 == (opt & GNUNET_CONTAINER_META_DATA_SERIALIZE_NO_COMPRESS))