diff options
author | Christian Grothoff <christian@grothoff.org> | 2018-01-13 14:46:26 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2018-01-13 14:46:26 +0100 |
commit | 58e2f8eadb20e527ebcefc04a906fb1f0e856e31 (patch) | |
tree | 846bbed92ee58a8dee98a4d6e02862c16474adb8 /src/cadet | |
parent | 4bd01d03e323377bbbd7609e29d8179bcb682deb (diff) | |
download | gnunet-58e2f8eadb20e527ebcefc04a906fb1f0e856e31.tar.gz gnunet-58e2f8eadb20e527ebcefc04a906fb1f0e856e31.zip |
do not die if client closes port it never opened
Diffstat (limited to 'src/cadet')
-rw-r--r-- | src/cadet/gnunet-service-cadet.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/cadet/gnunet-service-cadet.c b/src/cadet/gnunet-service-cadet.c index c3e99e0eb..20e4c363e 100644 --- a/src/cadet/gnunet-service-cadet.c +++ b/src/cadet/gnunet-service-cadet.c | |||
@@ -75,7 +75,7 @@ struct CadetClient | |||
75 | * Handle to communicate with the client | 75 | * Handle to communicate with the client |
76 | */ | 76 | */ |
77 | struct GNUNET_MQ_Handle *mq; | 77 | struct GNUNET_MQ_Handle *mq; |
78 | 78 | ||
79 | /** | 79 | /** |
80 | * Client handle. | 80 | * Client handle. |
81 | */ | 81 | */ |
@@ -536,6 +536,13 @@ handle_port_close (void *cls, | |||
536 | "Closing port %s as requested by %s\n", | 536 | "Closing port %s as requested by %s\n", |
537 | GNUNET_h2s (&pmsg->port), | 537 | GNUNET_h2s (&pmsg->port), |
538 | GSC_2s (c)); | 538 | GSC_2s (c)); |
539 | if (NULL == c->ports) | ||
540 | { | ||
541 | /* Client closed a port despite _never_ having opened one? */ | ||
542 | GNUNET_break (0); | ||
543 | GNUNET_SERVICE_client_drop (c->client); | ||
544 | return; | ||
545 | } | ||
539 | op = GNUNET_CONTAINER_multihashmap_get (c->ports, | 546 | op = GNUNET_CONTAINER_multihashmap_get (c->ports, |
540 | &pmsg->port); | 547 | &pmsg->port); |
541 | if (NULL == op) | 548 | if (NULL == op) |