-handle disconnect case more nicely
authorChristian Grothoff <christian@grothoff.org>
Mon, 27 Jun 2016 13:52:31 +0000 (13:52 +0000)
committerChristian Grothoff <christian@grothoff.org>
Mon, 27 Jun 2016 13:52:31 +0000 (13:52 +0000)
src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c
src/scalarproduct/gnunet-service-scalarproduct-ecc_bob.c
src/scalarproduct/gnunet-service-scalarproduct_alice.c
src/scalarproduct/gnunet-service-scalarproduct_bob.c

index 7485d5de1168d6521ff3e1b2a57360e716df31d8..196bdbeeb9b591304f1e81e8bc5af01133935402 100644 (file)
@@ -311,6 +311,8 @@ prepare_client_end_notification (struct AliceServiceSession *session)
   struct ClientResponseMessage *msg;
   struct GNUNET_MQ_Envelope *e;
 
+  if (NULL == session->client_mq)
+    return; /* no client left to be notified */
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Sending session-end notification with status %d to client for session %s\n",
               session->status,
index 4a1e9cbd0e1db0fea4ec4aa84c83879dc99aadca..9d0bf57b13aa063ba3f9fb2b84415fa0c55548ef 100644 (file)
@@ -419,6 +419,8 @@ prepare_client_end_notification (struct BobServiceSession *session)
   struct ClientResponseMessage *msg;
   struct GNUNET_MQ_Envelope *e;
 
+  if (NULL == session->client_mq)
+    return; /* no client left to be notified */
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Sending session-end notification with status %d to client for session %s\n",
               session->status,
index d6da754f458c0a8b4d33461c267b057ec175fefd..76aee54e3b80c4c9cdceda92854c4a9e45bd4d12 100644 (file)
@@ -331,6 +331,8 @@ prepare_client_end_notification (struct AliceServiceSession *session)
   struct ClientResponseMessage *msg;
   struct GNUNET_MQ_Envelope *e;
 
+  if (NULL == session->client_mq)
+    return; /* no client left to be notified */
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Sending session-end notification with status %d to client for session %s\n",
               session->status,
index 7341317b78a6d2df2163beecdb0314b8f3a9a056..d0a622a36a3d9567675793fe217a50b49b99f335 100644 (file)
@@ -460,6 +460,8 @@ prepare_client_end_notification (struct BobServiceSession *session)
   struct ClientResponseMessage *msg;
   struct GNUNET_MQ_Envelope *e;
 
+  if (NULL == session->client_mq)
+    return; /* no client left to be notified */
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Sending session-end notification with status %d to client for session %s\n",
               session->status,