diff options
Diffstat (limited to 'src/cadet')
-rw-r--r-- | src/cadet/gnunet-service-cadet_connection.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/cadet/gnunet-service-cadet_connection.c b/src/cadet/gnunet-service-cadet_connection.c index 8b7ff9d8b..b6a03c2ad 100644 --- a/src/cadet/gnunet-service-cadet_connection.c +++ b/src/cadet/gnunet-service-cadet_connection.c | |||
@@ -460,6 +460,12 @@ connection_get (const struct GNUNET_CADET_Hash *cid) | |||
460 | } | 460 | } |
461 | 461 | ||
462 | 462 | ||
463 | /** | ||
464 | * Change the connection state. Cannot change a connection marked as destroyed. | ||
465 | * | ||
466 | * @param c Connection to change. | ||
467 | * @param state New state to set. | ||
468 | */ | ||
463 | static void | 469 | static void |
464 | connection_change_state (struct CadetConnection* c, | 470 | connection_change_state (struct CadetConnection* c, |
465 | enum CadetConnectionState state) | 471 | enum CadetConnectionState state) |
@@ -2135,6 +2141,16 @@ GCC_handle_confirm (void *cls, | |||
2135 | return GNUNET_OK; | 2141 | return GNUNET_OK; |
2136 | } | 2142 | } |
2137 | 2143 | ||
2144 | if (GNUNET_NO != c->destroy) | ||
2145 | { | ||
2146 | GNUNET_assert (CADET_CONNECTION_DESTROYED != c->state); | ||
2147 | LOG (GNUNET_ERROR_TYPE_DEBUG, | ||
2148 | "connection %s being destroyed, ignoring confirm\n", | ||
2149 | GCC_2s (c)); | ||
2150 | GCC_check_connections (); | ||
2151 | return GNUNET_OK; | ||
2152 | } | ||
2153 | |||
2138 | oldstate = c->state; | 2154 | oldstate = c->state; |
2139 | LOG (GNUNET_ERROR_TYPE_DEBUG, " via peer %s\n", GNUNET_i2s (peer)); | 2155 | LOG (GNUNET_ERROR_TYPE_DEBUG, " via peer %s\n", GNUNET_i2s (peer)); |
2140 | pi = GCP_get (peer, GNUNET_YES); | 2156 | pi = GCP_get (peer, GNUNET_YES); |