From 9ecffbb7ef588390688544bde30a747e06d3a729 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Tue, 6 Apr 2021 02:10:01 +0200 Subject: Fix filtering based on block status MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- list-contacts.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/list-contacts.c b/list-contacts.c index 090de9f..ebb948a 100644 --- a/list-contacts.c +++ b/list-contacts.c @@ -59,7 +59,7 @@ main(int argc, char *argv[]) if (!user) eprintf("getpwuid: %s\n", errno ? strerror(errno) : "user does not exist"); - if (!names && !emergency && !include_men && !include_women && !include_orgs && !include_unspec) { + if (!names && !emergency && !include_men && !include_women && !include_orgs && !include_unspec && !service) { if (libcontacts_list_contacts(&ids, user)) eprintf("libcontacts_list_contacts:"); for (i = 0; ids[i]; i++) { @@ -93,7 +93,7 @@ main(int argc, char *argv[]) if (check_global_blocks && !strcmp(contact->blocks[j]->service, ".global")) break; } - if (!blocked_on == !contact->blocks[j]) + if (!blocked_on != !contact->blocks[j]) goto next; } if (names && contact->name) -- cgit v1.2.3-70-g09d2