[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r37296 - gnunet/src/scalarproduct
From: |
gnunet |
Subject: |
[GNUnet-SVN] r37296 - gnunet/src/scalarproduct |
Date: |
Mon, 20 Jun 2016 00:45:09 +0200 |
Author: grothoff
Date: 2016-06-20 00:45:09 +0200 (Mon, 20 Jun 2016)
New Revision: 37296
Modified:
gnunet/src/scalarproduct/gnunet-service-scalarproduct_alice.c
gnunet/src/scalarproduct/gnunet-service-scalarproduct_bob.c
Log:
avoid assertion on NULL mq
Modified: gnunet/src/scalarproduct/gnunet-service-scalarproduct_alice.c
===================================================================
--- gnunet/src/scalarproduct/gnunet-service-scalarproduct_alice.c
2016-06-19 22:40:01 UTC (rev 37295)
+++ gnunet/src/scalarproduct/gnunet-service-scalarproduct_alice.c
2016-06-19 22:45:09 UTC (rev 37296)
@@ -447,6 +447,12 @@
"Peer disconnected, terminating session %s with peer %s\n",
GNUNET_h2s (&s->session_id),
GNUNET_i2s (&s->peer));
+ if (GNUNET_SCALARPRODUCT_STATUS_ACTIVE == s->status)
+ {
+ /* We didn't get an answer yet, fail with error */
+ s->status = GNUNET_SCALARPRODUCT_STATUS_FAILURE;
+ prepare_client_end_notification (s);
+ }
if (NULL != s->cadet_mq)
{
GNUNET_MQ_destroy (s->cadet_mq);
@@ -453,12 +459,6 @@
s->cadet_mq = NULL;
}
s->channel = NULL;
- if (GNUNET_SCALARPRODUCT_STATUS_ACTIVE == s->status)
- {
- /* We didn't get an answer yet, fail with error */
- s->status = GNUNET_SCALARPRODUCT_STATUS_FAILURE;
- prepare_client_end_notification (s);
- }
}
Modified: gnunet/src/scalarproduct/gnunet-service-scalarproduct_bob.c
===================================================================
--- gnunet/src/scalarproduct/gnunet-service-scalarproduct_bob.c 2016-06-19
22:40:01 UTC (rev 37295)
+++ gnunet/src/scalarproduct/gnunet-service-scalarproduct_bob.c 2016-06-19
22:45:09 UTC (rev 37296)
@@ -497,12 +497,6 @@
"Peer disconnected, terminating session %s with peer %s\n",
GNUNET_h2s (&in->session_id),
GNUNET_i2s (&in->peer));
- if (NULL != in->cadet_mq)
- {
- GNUNET_MQ_destroy (in->cadet_mq);
- in->cadet_mq = NULL;
- }
- in->channel = NULL;
if (NULL != (s = in->s))
{
if (GNUNET_SCALARPRODUCT_STATUS_ACTIVE == s->status)
@@ -511,6 +505,12 @@
prepare_client_end_notification (s);
}
}
+ if (NULL != in->cadet_mq)
+ {
+ GNUNET_MQ_destroy (in->cadet_mq);
+ in->cadet_mq = NULL;
+ }
+ in->channel = NULL;
destroy_cadet_session (in);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r37296 - gnunet/src/scalarproduct,
gnunet <=