From: Denis Kenzior <denkenz@gmail.com>
To: ofono@lists.linux.dev
Cc: Denis Kenzior <denkenz@gmail.com>
Subject: [PATCH v2 12/14] provision: Add support for provision filter tags
Date: Wed, 3 Apr 2024 11:05:35 -0500 [thread overview]
Message-ID: <20240403160557.2828145-12-denkenz@gmail.com> (raw)
In-Reply-To: <20240403160557.2828145-1-denkenz@gmail.com>
oFono main.conf configuration file can now contain an entry with group
'Provision' and key 'TagsFilter'. This entry is treated as a comma
separated list of all tags that are accepted during context
auto-provisioning. This can help to filter duplicate context entries
from the provisioning database such that context auto-provisioning is
successful without user intervention.
---
src/provision.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/provision.c b/src/provision.c
index 22413d2ccde6..0530386f61c1 100644
--- a/src/provision.c
+++ b/src/provision.c
@@ -28,12 +28,17 @@ bool __ofono_provision_get_settings(const char *mcc,
int r;
size_t i;
uint32_t type;
+ _auto_(l_strv_free) char **tags_filter = NULL;
if (mcc == NULL || strlen(mcc) == 0 || mnc == NULL || strlen(mnc) == 0)
return false;
- r = provision_db_lookup(pdb, mcc, mnc, spn, NULL,
- &contexts, &n_contexts);
+ tags_filter = l_settings_get_string_list(__ofono_get_config(),
+ "Provision",
+ "TagsFilter", ',');
+
+ r = provision_db_lookup(pdb, mcc, mnc, spn, tags_filter,
+ &contexts, &n_contexts);
if (r < 0)
return false;
--
2.43.0
next prev parent reply other threads:[~2024-04-03 16:06 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-03 16:05 [PATCH v2 01/14] simutil: Convert eons APIs to use ell Denis Kenzior
2024-04-03 16:05 ` [PATCH v2 02/14] sim: Simplify SPN management logic Denis Kenzior
2024-04-03 16:05 ` [PATCH v2 03/14] data: Remove AweSIM entry Denis Kenzior
2024-04-03 16:05 ` [PATCH v2 04/14] data: Mark some MVNOs via the "spn" attribute Denis Kenzior
2024-04-03 16:05 ` [PATCH v2 05/14] data: Remove outdated T-mobile settings Denis Kenzior
2024-04-03 16:05 ` [PATCH v2 06/14] data: Remove RESELLER settings from AT&T Denis Kenzior
2024-04-03 16:05 ` [PATCH v2 07/14] provisiontool: Add support for context tags Denis Kenzior
2024-04-03 16:05 ` [PATCH v2 08/14] provisiondb: Add tags_filter support Denis Kenzior
2024-04-03 16:05 ` [PATCH v2 09/14] tools: lookup-apn: add support for optional tags filter Denis Kenzior
2024-04-03 16:05 ` [PATCH v2 10/14] data: Add tags for AT&T and T-Mobile contexts Denis Kenzior
2024-04-03 16:05 ` [PATCH v2 11/14] ofono: Add support for ofono main.conf settings Denis Kenzior
2024-04-03 16:05 ` Denis Kenzior [this message]
2024-04-03 16:05 ` [PATCH v2 13/14] examples: Fix use after free and resource leaks Denis Kenzior
2024-04-03 16:05 ` [PATCH v2 14/14] unit: Add test cases with tags_filter provided Denis Kenzior
2024-04-03 17:00 ` [PATCH v2 01/14] simutil: Convert eons APIs to use ell patchwork-bot+ofono
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240403160557.2828145-12-denkenz@gmail.com \
--to=denkenz@gmail.com \
--cc=ofono@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.