aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan/utils/linked_list.c
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2008-10-14 08:46:31 +0000
committerTobias Brunner <tobias@strongswan.org>2008-10-14 08:46:31 +0000
commit1adaa02bb2bcd72ad6d41b22719dba29fd7d57b7 (patch)
tree03324c1a74ce2f7fff3c0f740ae44b5b06207582 /src/libstrongswan/utils/linked_list.c
parent9257c3a287ac873a75b5386295e2a06439c66886 (diff)
downloadstrongswan-1adaa02bb2bcd72ad6d41b22719dba29fd7d57b7.tar.bz2
strongswan-1adaa02bb2bcd72ad6d41b22719dba29fd7d57b7.tar.xz
merging kernel_pfkey plugin back from kernel-interface branch
Diffstat (limited to 'src/libstrongswan/utils/linked_list.c')
-rw-r--r--src/libstrongswan/utils/linked_list.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libstrongswan/utils/linked_list.c b/src/libstrongswan/utils/linked_list.c
index cd755c4c0..9508e9ae7 100644
--- a/src/libstrongswan/utils/linked_list.c
+++ b/src/libstrongswan/utils/linked_list.c
@@ -632,7 +632,8 @@ static status_t find_first(private_linked_list_t *this, linked_list_match_t matc
while (current)
{
- if (match(current->value, d1, d2, d3, d4, d5))
+ if ((match && match(current->value, d1, d2, d3, d4, d5)) ||
+ (!match && item && current->value == *item))
{
if (item != NULL)
{
@@ -655,7 +656,8 @@ static status_t find_last(private_linked_list_t *this, linked_list_match_t match
while (current)
{
- if (match(current->value, d1, d2, d3, d4, d5))
+ if ((match && match(current->value, d1, d2, d3, d4, d5)) ||
+ (!match && item && current->value == *item))
{
if (item != NULL)
{