aboutsummaryrefslogtreecommitdiffstats
path: root/src/libhydra/attributes/attribute_manager.c
diff options
context:
space:
mode:
authorMartin Willi <martin@revosec.ch>2012-09-11 10:41:11 +0200
committerMartin Willi <martin@revosec.ch>2012-09-11 16:18:28 +0200
commit594c58e1118e496eadd284647755b16b74665337 (patch)
tree743e0f33a01beffab57e363fe1e154944c63dd01 /src/libhydra/attributes/attribute_manager.c
parentdc7b79d8a5c8104001bba4c52a8b3716a0cf6d88 (diff)
downloadstrongswan-594c58e1118e496eadd284647755b16b74665337.tar.bz2
strongswan-594c58e1118e496eadd284647755b16b74665337.tar.xz
Pass the full list of pools to acquire_address, enumerate in providers
If the provider has access to the full pool list, it can enumerate them twice, for example to search for existing leases first, and only search for new leases in a second step. Fixes lease enumeration in attr-sql using multiple pools.
Diffstat (limited to 'src/libhydra/attributes/attribute_manager.c')
-rw-r--r--src/libhydra/attributes/attribute_manager.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libhydra/attributes/attribute_manager.c b/src/libhydra/attributes/attribute_manager.c
index 64dc9c7c9..e7a687a50 100644
--- a/src/libhydra/attributes/attribute_manager.c
+++ b/src/libhydra/attributes/attribute_manager.c
@@ -60,8 +60,8 @@ typedef struct {
} enum_data_t;
METHOD(attribute_manager_t, acquire_address, host_t*,
- private_attribute_manager_t *this, char *pool, identification_t *id,
- host_t *requested)
+ private_attribute_manager_t *this, linked_list_t *pools,
+ identification_t *id, host_t *requested)
{
enumerator_t *enumerator;
attribute_provider_t *current;
@@ -71,7 +71,7 @@ METHOD(attribute_manager_t, acquire_address, host_t*,
enumerator = this->providers->create_enumerator(this->providers);
while (enumerator->enumerate(enumerator, &current))
{
- host = current->acquire_address(current, pool, id, requested);
+ host = current->acquire_address(current, pools, id, requested);
if (host)
{
break;