@JAVAPORT@PORT = 2096
HOSTNAME = localhost
BINARY = gnunet-service-cadet-new
-# PREFIX = valgrind --leak-check=yes
+PREFIX = valgrind --leak-check=yes
ACCEPT_FROM = 127.0.0.1;
ACCEPT_FROM6 = ::1;
UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-service-cadet.sock
GCPP_del_connection (cc->path,
cc->off,
cc);
+ for (unsigned int i=0;i<cc->off;i++)
+ GCP_remove_connection (GCPP_get_peer_at_offset (cc->path,
+ i),
+ cc);
GNUNET_assert (GNUNET_YES ==
GNUNET_CONTAINER_multishortmap_remove (connections,
&GCC_get_id (cc)->connection_of_tunnel,
*/
#include "platform.h"
#include "gnunet-service-cadet-new_connection.h"
+#include "gnunet-service-cadet-new_tunnels.h"
#include "gnunet-service-cadet-new_peer.h"
#include "gnunet-service-cadet-new_paths.h"
"Destroying path %s\n",
GCPP_2s (path));
for (unsigned int i=0;i<path->entries_length;i++)
- GNUNET_free (path->entries[i]);
+ {
+ struct CadetPeerPathEntry *entry = path->entries[i];
+
+ if (NULL != entry->cc)
+ {
+ struct CadetTConnection *ct;
+
+ ct = GCC_get_ct (entry->cc);
+ if (NULL != ct)
+ GCT_connection_lost (ct);
+ GCC_destroy_without_tunnel (entry->cc);
+ }
+ GNUNET_free (entry);
+ }
GNUNET_free (path->entries);
GNUNET_free (path);
}
GNUNET_free (t->unverified_ax);
}
cleanup_ax (&t->ax);
+ GNUNET_assert (NULL == t->destroy_task);
GNUNET_free (t);
}
GNUNET_CONTAINER_multihashmap32_remove (t->channels,
ntohl (ctn.cn),
ch));
- if (0 ==
- GCT_count_channels (t))
+ if ( (0 ==
+ GCT_count_channels (t)) &&
+ (NULL == t->destroy_task) )
{
- t->destroy_task = GNUNET_SCHEDULER_add_delayed (IDLE_DESTROY_DELAY,
- &destroy_tunnel,
- t);
+ t->destroy_task
+ = GNUNET_SCHEDULER_add_delayed (IDLE_DESTROY_DELAY,
+ &destroy_tunnel,
+ t);
}
}