diff options
author | Mattias Andrée <maandree@kth.se> | 2021-04-06 02:10:01 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2021-04-06 02:10:01 +0200 |
commit | 9ecffbb7ef588390688544bde30a747e06d3a729 (patch) | |
tree | a6d0a0c4ed294041c79eeebfcbbc318a920d023a | |
parent | Fix memory leak in list-contacts (diff) | |
download | contacts-9ecffbb7ef588390688544bde30a747e06d3a729.tar.gz contacts-9ecffbb7ef588390688544bde30a747e06d3a729.tar.bz2 contacts-9ecffbb7ef588390688544bde30a747e06d3a729.tar.xz |
Fix filtering based on block status
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r-- | list-contacts.c | 4 |
1 files 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) |