communicate DELETE state to IMCs and IMVs
authorAndreas Steffen <andreas.steffen@strongswan.org>
Sun, 9 Jan 2011 22:27:43 +0000 (23:27 +0100)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Tue, 11 Jan 2011 00:17:40 +0000 (01:17 +0100)
src/libcharon/plugins/tnccs_11/tnccs_11.c
src/libcharon/plugins/tnccs_20/tnccs_20.c

index b950bfa..375f2cc 100644 (file)
@@ -395,6 +395,16 @@ METHOD(tls_t, get_eap_msk, chunk_t,
 METHOD(tls_t, destroy, void,
        private_tnccs_11_t *this)
 {
+       if (this->is_server)
+       {
+               charon->imvs->notify_connection_change(charon->imvs,
+                                                       this->connection_id, TNC_CONNECTION_STATE_DELETE);
+       }
+       else
+       {
+               charon->imcs->notify_connection_change(charon->imcs,
+                                                       this->connection_id, TNC_CONNECTION_STATE_DELETE);
+       }
        charon->tnccs->remove_connection(charon->tnccs, this->connection_id);
        this->mutex->destroy(this->mutex);
        DESTROY_IF(this->batch);
index ede0e4a..7d39dc4 100644 (file)
@@ -626,6 +626,16 @@ METHOD(tls_t, get_eap_msk, chunk_t,
 METHOD(tls_t, destroy, void,
        private_tnccs_20_t *this)
 {
+       if (this->is_server)
+       {
+               charon->imvs->notify_connection_change(charon->imvs,
+                                                       this->connection_id, TNC_CONNECTION_STATE_DELETE);
+       }
+       else
+       {
+               charon->imcs->notify_connection_change(charon->imcs,
+                                                       this->connection_id, TNC_CONNECTION_STATE_DELETE);
+       }
        charon->tnccs->remove_connection(charon->tnccs, this->connection_id);
        this->state_machine->destroy(this->state_machine);
        this->mutex->destroy(this->mutex);