aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcharon/plugins/maemo/maemo_service.c
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2011-02-04 12:36:28 +0100
committerTobias Brunner <tobias@strongswan.org>2011-02-04 18:02:48 +0100
commit56f57e5814ea29ecf80aebf8b1cc50b92ed3c5ac (patch)
tree1129e25b464b00f1f3dbfdce3891289d8213942c /src/libcharon/plugins/maemo/maemo_service.c
parenta90891e6e3d7c13946fc9aaae2a9dd4afdb082d7 (diff)
downloadstrongswan-56f57e5814ea29ecf80aebf8b1cc50b92ed3c5ac.tar.bz2
strongswan-56f57e5814ea29ecf80aebf8b1cc50b92ed3c5ac.tar.xz
maemo: Listen for IKE_SA state changes insted of CHILD_SA state changes.
If the IKE_SA_INIT request fails, there is not yet a CHILD_SA that could trigger state changes.
Diffstat (limited to 'src/libcharon/plugins/maemo/maemo_service.c')
-rw-r--r--src/libcharon/plugins/maemo/maemo_service.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/libcharon/plugins/maemo/maemo_service.c b/src/libcharon/plugins/maemo/maemo_service.c
index 1a1727b3d..0e9fd8ccc 100644
--- a/src/libcharon/plugins/maemo/maemo_service.c
+++ b/src/libcharon/plugins/maemo/maemo_service.c
@@ -115,12 +115,11 @@ METHOD(listener_t, ike_updown, bool,
return TRUE;
}
-METHOD(listener_t, child_state_change, bool,
- private_maemo_service_t *this, ike_sa_t *ike_sa, child_sa_t *child_sa,
- child_sa_state_t state)
+METHOD(listener_t, ike_state_change, bool,
+ private_maemo_service_t *this, ike_sa_t *ike_sa, ike_sa_state_t state)
{
/* this call back is only registered during initiation */
- if (this->ike_sa == ike_sa && state == CHILD_DESTROYING)
+ if (this->ike_sa == ike_sa && state == IKE_DESTROYING)
{
change_status(this, VPN_STATUS_CONNECTION_FAILED);
return FALSE;
@@ -138,7 +137,7 @@ METHOD(listener_t, child_updown, bool,
{
/* disable hooks registered to catch initiation failures */
this->public.listener.ike_updown = NULL;
- this->public.listener.child_state_change = NULL;
+ this->public.listener.ike_state_change = NULL;
change_status(this, VPN_STATUS_CONNECTED);
}
else
@@ -371,7 +370,7 @@ static gboolean initiate_connection(private_maemo_service_t *this,
this->ike_sa = ike_sa;
this->status = VPN_STATUS_CONNECTING;
this->public.listener.ike_updown = _ike_updown;
- this->public.listener.child_state_change = _child_state_change;
+ this->public.listener.ike_state_change = _ike_state_change;
charon->bus->add_listener(charon->bus, &this->public.listener);
if (ike_sa->initiate(ike_sa, child_cfg, 0, NULL, NULL) != SUCCESS)
@@ -464,7 +463,7 @@ maemo_service_t *maemo_service_create()
.public = {
.listener = {
.ike_updown = _ike_updown,
- .child_state_change = _child_state_change,
+ .ike_state_change = _ike_state_change,
.child_updown = _child_updown,
.ike_rekey = _ike_rekey,
},