summaryrefslogtreecommitdiff
path: root/src/charon/control/interfaces/dbus_interface.c
diff options
context:
space:
mode:
authorRene Mayrhofer <rene@mayrhofer.eu.org>2007-10-26 14:10:02 +0000
committerRene Mayrhofer <rene@mayrhofer.eu.org>2007-10-26 14:10:02 +0000
commit49104abddf3d71d5abf5cf75dc7f95fa6c55fa63 (patch)
tree28f7a72e5dec4abf908fd7874bdab776281310bc /src/charon/control/interfaces/dbus_interface.c
parent7b0305f59ddab9ea026b202a8c569912e5bf9a90 (diff)
downloadvyos-strongswan-49104abddf3d71d5abf5cf75dc7f95fa6c55fa63.tar.gz
vyos-strongswan-49104abddf3d71d5abf5cf75dc7f95fa6c55fa63.zip
[svn-upgrade] Integrating new upstream version, strongswan (4.1.8)
Diffstat (limited to 'src/charon/control/interfaces/dbus_interface.c')
-rw-r--r--src/charon/control/interfaces/dbus_interface.c55
1 files changed, 3 insertions, 52 deletions
diff --git a/src/charon/control/interfaces/dbus_interface.c b/src/charon/control/interfaces/dbus_interface.c
index d93a5d048..39226aaef 100644
--- a/src/charon/control/interfaces/dbus_interface.c
+++ b/src/charon/control/interfaces/dbus_interface.c
@@ -118,55 +118,6 @@ static child_cfg_t* get_child_from_peer(peer_cfg_t *peer_cfg, char *name)
return found;
}
-/**
- * get a peer configuration by its name, or a name of its children
- */
-static peer_cfg_t *get_peer_cfg_by_name(char *name)
-{
- iterator_t *i1, *i2;
- peer_cfg_t *current, *found = NULL;
- child_cfg_t *child;
-
- i1 = charon->backends->create_iterator(charon->backends);
- while (i1->iterate(i1, (void**)&current))
- {
- /* compare peer_cfgs name first */
- if (streq(current->get_name(current), name))
- {
- found = current;
- found->get_ref(found);
- break;
- }
- /* compare all child_cfg names otherwise */
- i2 = current->create_child_cfg_iterator(current);
- while (i2->iterate(i2, (void**)&child))
- {
- if (streq(child->get_name(child), name))
- {
- found = current;
- found->get_ref(found);
- break;
- }
- }
- i2->destroy(i2);
- if (found)
- {
- break;
- }
- }
- i1->destroy(i1);
- return found;
-}
-
-/**
- * logging dummy
- */
-static bool dbus_log(void *param, signal_t signal, level_t level,
- ike_sa_t *ike_sa, char *format, va_list args)
-{
- return TRUE;
-}
-
/**
* process NetworkManagers startConnection method call
@@ -197,7 +148,7 @@ static bool start_connection(private_dbus_interface_t *this, DBusMessage* msg)
}
set_state(this, NM_VPN_STATE_STARTING);
- peer_cfg = get_peer_cfg_by_name(name);
+ peer_cfg = charon->backends->get_peer_cfg_by_name(charon->backends, name);
if (peer_cfg)
{
free(this->name);
@@ -205,8 +156,8 @@ static bool start_connection(private_dbus_interface_t *this, DBusMessage* msg)
child_cfg = get_child_from_peer(peer_cfg, name);
if (child_cfg)
{
- status = charon->interfaces->initiate(charon->interfaces, peer_cfg,
- child_cfg, dbus_log, NULL);
+ status = charon->interfaces->initiate(charon->interfaces,
+ peer_cfg, child_cfg, interface_manager_cb_empty, NULL);
}
else
{