From 1adaa02bb2bcd72ad6d41b22719dba29fd7d57b7 Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Tue, 14 Oct 2008 08:46:31 +0000 Subject: merging kernel_pfkey plugin back from kernel-interface branch --- src/libstrongswan/utils/linked_list.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/libstrongswan/utils/linked_list.c') 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) { -- cgit v1.2.3