static char * key_file_p2;
static char * cert_file_p2;
+struct GNUNET_TRANSPORT_TransmitHandle * th;
+
#if VERBOSE
#define OKPP do { ok++; fprintf (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0)
#else
GNUNET_SCHEDULER_cancel (die_task);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Disconnecting from transports!\n");
+ if (th != NULL)
+ GNUNET_TRANSPORT_notify_transmit_ready_cancel(th);
+ th = NULL;
+
GNUNET_TRANSPORT_disconnect (p1.th);
GNUNET_TRANSPORT_disconnect (p2.th);
die_task = GNUNET_SCHEDULER_NO_TASK;
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Disconnecting from transports!\n");
GNUNET_break (0);
+
+ if (th != NULL)
+ GNUNET_TRANSPORT_notify_transmit_ready_cancel(th);
+ th = NULL;
+
GNUNET_TRANSPORT_disconnect (p1.th);
GNUNET_TRANSPORT_disconnect (p2.th);
if (GNUNET_SCHEDULER_NO_TASK != tct)
struct PeerContext *p = cls;
struct GNUNET_MessageHeader *hdr;
+ th = NULL;
+
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Transmitting message with %u bytes to peer %s\n",
sizeof (struct GNUNET_MessageHeader),
GNUNET_TRANSPORT_get_hello_cancel (p1.th, &exchange_hello, &p1);
die_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT_TRANSMIT,
&end_badly, NULL);
- GNUNET_TRANSPORT_notify_transmit_ready (p1.th,
+ th = GNUNET_TRANSPORT_notify_transmit_ready (p1.th,
&p2.id,
256, 0, TIMEOUT, ¬ify_ready,
&p1);
static GNUNET_SCHEDULER_TaskIdentifier tct;
+struct GNUNET_TRANSPORT_TransmitHandle * th_p2;
+
static char * key_file_p1;
static char * cert_file_p1;
#if VERBOSE
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Disconnecting from transports!\n");
#endif
+
+ if (th_p2 != NULL)
+ GNUNET_TRANSPORT_notify_transmit_ready_cancel(th_p2);
+ th_p2 = NULL;
+
GNUNET_TRANSPORT_disconnect (p1.th);
GNUNET_TRANSPORT_disconnect (p2.th);
#if VERBOSE
msg_scheduled,
msg_recv,
msg_recv_expected);
+ if (th_p2 != NULL)
+ GNUNET_TRANSPORT_notify_transmit_ready_cancel(th_p2);
+ th_p2 = NULL;
+
GNUNET_break (0);
GNUNET_TRANSPORT_disconnect (p1.th);
GNUNET_TRANSPORT_disconnect (p2.th);
ok = 42;
return 0;
}
+ th_p2 = NULL;
ret = 0;
s = get_size (n);
GNUNET_assert (size >= s);
while (size - ret >= s);
if (n < TOTAL_MSGS)
{
- GNUNET_TRANSPORT_notify_transmit_ready (p2.th,
+ th_p2 = GNUNET_TRANSPORT_notify_transmit_ready (p2.th,
&p1.id,
s, 0, TIMEOUT,
¬ify_ready,
GNUNET_TRANSPORT_get_hello_cancel (p1.th, &exchange_hello, &p1);
die_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT,
&end_badly, NULL);
- GNUNET_TRANSPORT_notify_transmit_ready (p2.th,
+ th_p2 = GNUNET_TRANSPORT_notify_transmit_ready (p2.th,
&p1.id,
get_size (0), 0, TIMEOUT,
¬ify_ready,
static GNUNET_SCHEDULER_TaskIdentifier tct;
+struct GNUNET_TRANSPORT_TransmitHandle * th_p2;
+
static char *key_file_p1;
static char *cert_file_p1;
#if VERBOSE
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Disconnecting from transports!\n");
#endif
+ if (th_p2 != NULL)
+ GNUNET_TRANSPORT_notify_transmit_ready_cancel(th_p2);
+ th_p2 = NULL;
+
GNUNET_TRANSPORT_disconnect (p1.th);
GNUNET_TRANSPORT_disconnect (p2.th);
#if VERBOSE
#if VERBOSE
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Disconnecting from transports!\n");
#endif
+ if (th_p2 != NULL)
+ GNUNET_TRANSPORT_notify_transmit_ready_cancel(th_p2);
+
GNUNET_TRANSPORT_disconnect (p1.th);
GNUNET_TRANSPORT_disconnect (p2.th);
#if VERBOSE
msg_recv,
msg_recv_expected);
GNUNET_break (0);
+
+ if (th_p2 != NULL)
+ GNUNET_TRANSPORT_notify_transmit_ready_cancel(th_p2);
+ th_p2 = NULL;
+
GNUNET_TRANSPORT_disconnect (p1.th);
GNUNET_TRANSPORT_disconnect (p2.th);
unsigned int s;
unsigned int ret;
+ th_p2 = NULL;
+
if (buf == NULL)
{
GNUNET_break (0);
while (size - ret >= s);
if (n < TOTAL_MSGS)
{
- GNUNET_TRANSPORT_notify_transmit_ready (p2.th,
+ th_p2 = GNUNET_TRANSPORT_notify_transmit_ready (p2.th,
&p1.id,
s, 0, TIMEOUT,
¬ify_ready,