*/
struct GNUNET_CRYPTO_EddsaPrivateKey priv_key;
+ /**
+ * CADET port.
+ */
+ struct GNUNET_CADET_Port *cadet_port;
+
/**
* Last message fragment ID sent to the group.
*/
{
struct Group *grp = &orig->grp;
GNUNET_CONTAINER_multihashmap_remove (origins, &grp->pub_key_hash, orig);
+ if (NULL != orig->cadet_port)
+ {
+ GNUNET_CADET_close_port (orig->cadet_port);
+ orig->cadet_port = NULL;
+ }
+ GNUNET_free (orig);
}
mem->join_dcsn = NULL;
}
GNUNET_CONTAINER_multihashmap_remove (members, &grp->pub_key_hash, mem);
+ GNUNET_free (mem);
}
(GNUNET_YES == grp->is_origin)
? cleanup_origin ((struct Origin *) grp)
: cleanup_member ((struct Member *) grp);
-
- GNUNET_free (grp);
}
grp->pub_key,
GNUNET_APPLICATION_TYPE_MULTICAST,
};
-
GNUNET_CRYPTO_hash (&port, sizeof (port), &grp->cadet_port_hash);
}
GNUNET_CONTAINER_multihashmap_put (origins, &grp->pub_key_hash, orig,
GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST);
- group_set_cadet_port_hash (grp);
- GNUNET_CADET_open_port (cadet, &grp->cadet_port_hash,
- cadet_notify_channel_new, NULL);
+ group_set_cadet_port_hash (grp);
+ orig->cadet_port = GNUNET_CADET_open_port (cadet, &grp->cadet_port_hash,
+ cadet_notify_channel_new, NULL);
}
else
{