From ff41a40b57d72cd0247cd71ad2239156e9f9eecc Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 12 Apr 2021 14:10:07 +0200 Subject: Fix parsing of block data MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- libcontacts_parse_contact.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libcontacts_parse_contact.c b/libcontacts_parse_contact.c index ead729a..f16ee94 100644 --- a/libcontacts_parse_contact.c +++ b/libcontacts_parse_contact.c @@ -407,13 +407,13 @@ libcontacts_parse_contact(char *data, struct libcontacts_contact *contact) if (TEST(unindent(p), "SRV") && !contact->blocks[i]->service) { if (!(contact->blocks[i]->service = strdup(getstr(p)))) goto fail; - } else if (!strcmp(p, "OFF") && !contact->blocks[i]->shadow_block) { + } else if (!strcmp(unindent(p), "OFF") && !contact->blocks[i]->shadow_block) { contact->blocks[i]->shadow_block = LIBCONTACTS_BLOCK_OFF; - } else if (!strcmp(p, "BUSY") && !contact->blocks[i]->shadow_block) { + } else if (!strcmp(unindent(p), "BUSY") && !contact->blocks[i]->shadow_block) { contact->blocks[i]->shadow_block = LIBCONTACTS_BLOCK_BUSY; - } else if (!strcmp(p, "IGNORE") && !contact->blocks[i]->shadow_block) { + } else if (!strcmp(unindent(p), "IGNORE") && !contact->blocks[i]->shadow_block) { contact->blocks[i]->shadow_block = LIBCONTACTS_BLOCK_IGNORE; - } else if (!strcmp(p, "EXPLICIT")) { + } else if (!strcmp(unindent(p), "EXPLICIT")) { contact->blocks[i]->explicit = 1; } else if (TEST(unindent(p), "ASK") && !contact->blocks[i]->soft_unblock && (t = gettime(p))) { contact->blocks[i]->soft_unblock = t; -- cgit v1.2.3-70-g09d2