From: Grant Erickson <gerickson@nuovations.com>
To: connman@lists.linux.dev
Subject: [PATCH] Move online check settings initialization to service init.
Date: Thu, 19 Oct 2023 15:46:48 -0700 [thread overview]
Message-ID: <63D885EB-FBE7-4C5B-BEA7-84288CF076DA@nuovations.com> (raw)
The connman settings "EnableOnlineToReadyTransition",
"OnlineCheckInitialInterval", and "OnlineCheckMaxInterval" do not vary
across calls to 'start_online_check'. Consequently, they can be read
and set once in '__connman_service_init'.
---
src/service.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/src/service.c b/src/service.c
index 06d02322..55932efc 100644
--- a/src/service.c
+++ b/src/service.c
@@ -1460,12 +1460,6 @@ static void start_online_check(struct connman_service *service,
"Default service remains in READY state.");
return;
}
- enable_online_to_ready_transition =
- connman_setting_get_bool("EnableOnlineToReadyTransition");
- online_check_initial_interval =
- connman_setting_get_uint("OnlineCheckInitialInterval");
- online_check_max_interval =
- connman_setting_get_uint("OnlineCheckMaxInterval");
if (type == CONNMAN_IPCONFIG_TYPE_IPV6 || check_proxy_setup(service)) {
cancel_online_check(service);
@@ -7842,6 +7836,13 @@ int __connman_service_init(void)
remove_unprovisioned_services();
+ enable_online_to_ready_transition =
+ connman_setting_get_bool("EnableOnlineToReadyTransition");
+ online_check_initial_interval =
+ connman_setting_get_uint("OnlineCheckInitialInterval");
+ online_check_max_interval =
+ connman_setting_get_uint("OnlineCheckMaxInterval");
+
return 0;
}
--
2.32.0
next reply other threads:[~2023-10-19 22:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-19 22:46 Grant Erickson [this message]
2023-11-07 15:19 ` [PATCH] Move online check settings initialization to service init Marcel Holtmann
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=63D885EB-FBE7-4C5B-BEA7-84288CF076DA@nuovations.com \
--to=gerickson@nuovations.com \
--cc=connman@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).