summaryrefslogtreecommitdiff
path: root/src/transport/transport-testing2.c
diff options
context:
space:
mode:
authorMartin Schanzenbach <mschanzenbach@posteo.de>2020-06-01 18:18:00 +0200
committerMartin Schanzenbach <mschanzenbach@posteo.de>2020-06-01 18:18:00 +0200
commitd20be8a919b93cbfd1e1de3b41ca0fa370949b05 (patch)
treec76472fb42d78749172d37a74c0b704d5a21ee1c /src/transport/transport-testing2.c
parent198c09654354d09a9b33f27cf095e0295f70826c (diff)
tng: UNIX communicator fixes. Test fixes
Diffstat (limited to 'src/transport/transport-testing2.c')
-rw-r--r--src/transport/transport-testing2.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/transport/transport-testing2.c b/src/transport/transport-testing2.c
index 8250027f7..e85e46b11 100644
--- a/src/transport/transport-testing2.c
+++ b/src/transport/transport-testing2.c
@@ -525,6 +525,7 @@ handle_incoming_msg (void *cls,
struct GNUNET_TRANSPORT_IncomingMessageAck *ack;
env = GNUNET_MQ_msg (ack, GNUNET_MESSAGE_TYPE_TRANSPORT_INCOMING_MSG_ACK);
+ GNUNET_assert (NULL != env);
ack->reserved = htonl (0);
ack->fc_id = inc_msg->fc_id;
ack->sender = inc_msg->sender;
@@ -770,6 +771,8 @@ disconnect_cb (void *cls,
GNUNET_CONTAINER_DLL_remove (tc_h->client_head,
tc_h->client_tail,
cl);
+ if (cl->c_mq == tc_h->c_mq)
+ tc_h->c_mq = NULL;
GNUNET_free (cl);
break;
}
@@ -1164,6 +1167,7 @@ GNUNET_TRANSPORT_TESTING_transport_communicator_send
env = GNUNET_MQ_msg_extra (msg,
inbox_size,
GNUNET_MESSAGE_TYPE_TRANSPORT_SEND_MSG);
+ GNUNET_assert (NULL != env);
msg->qid = htonl (tc_queue->qid);
msg->mid = tc_queue->mid++;
msg->receiver = tc_queue->peer_id;