diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-06-27 13:52:31 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-06-27 13:52:31 +0000 |
commit | 7ee0ec4b90a2096226f4dc23f9129fdda1c71488 (patch) | |
tree | 9c0e24ac1b1791ef808bca142039f8d9be601823 /src/scalarproduct | |
parent | beae62bfc73edc1784efbcbb8efd74c07a057865 (diff) | |
download | gnunet-7ee0ec4b90a2096226f4dc23f9129fdda1c71488.tar.gz gnunet-7ee0ec4b90a2096226f4dc23f9129fdda1c71488.zip |
-handle disconnect case more nicely
Diffstat (limited to 'src/scalarproduct')
4 files changed, 8 insertions, 0 deletions
diff --git a/src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c b/src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c index 7485d5de1..196bdbeeb 100644 --- a/src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c +++ b/src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c | |||
@@ -311,6 +311,8 @@ prepare_client_end_notification (struct AliceServiceSession *session) | |||
311 | struct ClientResponseMessage *msg; | 311 | struct ClientResponseMessage *msg; |
312 | struct GNUNET_MQ_Envelope *e; | 312 | struct GNUNET_MQ_Envelope *e; |
313 | 313 | ||
314 | if (NULL == session->client_mq) | ||
315 | return; /* no client left to be notified */ | ||
314 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 316 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
315 | "Sending session-end notification with status %d to client for session %s\n", | 317 | "Sending session-end notification with status %d to client for session %s\n", |
316 | session->status, | 318 | session->status, |
diff --git a/src/scalarproduct/gnunet-service-scalarproduct-ecc_bob.c b/src/scalarproduct/gnunet-service-scalarproduct-ecc_bob.c index 4a1e9cbd0..9d0bf57b1 100644 --- a/src/scalarproduct/gnunet-service-scalarproduct-ecc_bob.c +++ b/src/scalarproduct/gnunet-service-scalarproduct-ecc_bob.c | |||
@@ -419,6 +419,8 @@ prepare_client_end_notification (struct BobServiceSession *session) | |||
419 | struct ClientResponseMessage *msg; | 419 | struct ClientResponseMessage *msg; |
420 | struct GNUNET_MQ_Envelope *e; | 420 | struct GNUNET_MQ_Envelope *e; |
421 | 421 | ||
422 | if (NULL == session->client_mq) | ||
423 | return; /* no client left to be notified */ | ||
422 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 424 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
423 | "Sending session-end notification with status %d to client for session %s\n", | 425 | "Sending session-end notification with status %d to client for session %s\n", |
424 | session->status, | 426 | session->status, |
diff --git a/src/scalarproduct/gnunet-service-scalarproduct_alice.c b/src/scalarproduct/gnunet-service-scalarproduct_alice.c index d6da754f4..76aee54e3 100644 --- a/src/scalarproduct/gnunet-service-scalarproduct_alice.c +++ b/src/scalarproduct/gnunet-service-scalarproduct_alice.c | |||
@@ -331,6 +331,8 @@ prepare_client_end_notification (struct AliceServiceSession *session) | |||
331 | struct ClientResponseMessage *msg; | 331 | struct ClientResponseMessage *msg; |
332 | struct GNUNET_MQ_Envelope *e; | 332 | struct GNUNET_MQ_Envelope *e; |
333 | 333 | ||
334 | if (NULL == session->client_mq) | ||
335 | return; /* no client left to be notified */ | ||
334 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 336 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
335 | "Sending session-end notification with status %d to client for session %s\n", | 337 | "Sending session-end notification with status %d to client for session %s\n", |
336 | session->status, | 338 | session->status, |
diff --git a/src/scalarproduct/gnunet-service-scalarproduct_bob.c b/src/scalarproduct/gnunet-service-scalarproduct_bob.c index 7341317b7..d0a622a36 100644 --- a/src/scalarproduct/gnunet-service-scalarproduct_bob.c +++ b/src/scalarproduct/gnunet-service-scalarproduct_bob.c | |||
@@ -460,6 +460,8 @@ prepare_client_end_notification (struct BobServiceSession *session) | |||
460 | struct ClientResponseMessage *msg; | 460 | struct ClientResponseMessage *msg; |
461 | struct GNUNET_MQ_Envelope *e; | 461 | struct GNUNET_MQ_Envelope *e; |
462 | 462 | ||
463 | if (NULL == session->client_mq) | ||
464 | return; /* no client left to be notified */ | ||
463 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 465 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
464 | "Sending session-end notification with status %d to client for session %s\n", | 466 | "Sending session-end notification with status %d to client for session %s\n", |
465 | session->status, | 467 | session->status, |