correctly unregister IKE_SA at the bus
authorMartin Willi <martin@strongswan.org>
Sat, 15 Mar 2008 14:08:43 +0000 (14:08 -0000)
committerMartin Willi <martin@strongswan.org>
Sat, 15 Mar 2008 14:08:43 +0000 (14:08 -0000)
src/charon/sa/ike_sa_manager.c

index f004f07..03fc156 100644 (file)
@@ -778,6 +778,7 @@ static status_t checkin_and_destroy(private_ike_sa_manager_t *this, ike_sa_t *ik
        
        ike_sa_id = ike_sa->get_id(ike_sa);
        DBG2(DBG_MGR, "checkin and destroy IKE_SA");
+       charon->bus->set_sa(charon->bus, NULL);
 
        pthread_mutex_lock(&(this->mutex));
 
@@ -798,7 +799,6 @@ static status_t checkin_and_destroy(private_ike_sa_manager_t *this, ike_sa_t *ik
        }
        
        pthread_mutex_unlock(&(this->mutex));
-       charon->bus->set_sa(charon->bus, ike_sa);
        return retval;
 }