From: Michael Tremer Date: Sat, 5 Mar 2022 12:04:44 +0000 (+0000) Subject: database: Return something when no filter criteria is configured X-Git-Tag: 0.9.12~44 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=098d871b17533c591d640c0071a83673c185887c;p=location%2Flibloc.git database: Return something when no filter criteria is configured Signed-off-by: Michael Tremer --- diff --git a/src/database.c b/src/database.c index ce3fe3d..e5f779d 100644 --- a/src/database.c +++ b/src/database.c @@ -1168,6 +1168,10 @@ static int loc_database_enumerator_match_network( return 0; } + // Match if no filter criteria is configured + if (!enumerator->countries && !enumerator->asns && !enumerator->flags) + return 1; + // Check if the country code matches if (enumerator->countries && !loc_country_list_empty(enumerator->countries)) { const char* country_code = loc_network_get_country_code(network);