two fixes in tnccs_11
authorAndreas Steffen <andreas.steffen@strongswan.org>
Tue, 2 Nov 2010 09:46:30 +0000 (10:46 +0100)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Tue, 2 Nov 2010 09:46:30 +0000 (10:46 +0100)
src/libcharon/plugins/tnccs_11/tnccs_11.c

index 704bf64..b321c26 100644 (file)
@@ -242,7 +242,8 @@ METHOD(tls_t, is_complete, bool,
        ike_sa_t *ike_sa;
        auth_cfg_t *auth;
        
-       if (libtnc_tncs_HaveRecommendation(this->tncs_connection, &rec, &eval) ==
+       if (this->is_server &&
+               libtnc_tncs_HaveRecommendation(this->tncs_connection, &rec, &eval) ==
                TNC_RESULT_SUCCESS)
        {
                switch (rec)
@@ -299,7 +300,6 @@ METHOD(tls_t, destroy, void,
                {
                        libtnc_tncc_DeleteConnection(this->tncc_connection);
                }
-               libtnc_tncc_Terminate();
        }
        free(this);
 }