Closed
Bug 1053118
Opened 10 years ago
Closed 8 years ago
Sntp.jsm should not hardcode default NTP server names, since they are already set in b2g.js
Categories
(Firefox OS Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: emorley, Unassigned)
References
Details
Broken out from bug 874771 - this is a review comment that wasn't fixed before landing & is now impacting bug 1052016.
Sntp.jsm does:
http://mxr.mozilla.org/mozilla-central/source/toolkit/modules/Sntp.jsm#288
288 // Sntp servers.
289 _pools: [
290 "0.pool.ntp.org",
291 "1.pool.ntp.org",
292 "2.pool.ntp.org",
293 "3.pool.ntp.org"
294 ],
However in b2g.js we already have:
http://mxr.mozilla.org/mozilla-central/source/b2g/app/b2g.js#882
882 // SNTP preferences.
883 pref("network.sntp.maxRetryCount", 10);
884 pref("network.sntp.refreshPeriod", 86400); // In seconds.
885 pref("network.sntp.pools", // Servers separated by ';'.
886 "0.pool.ntp.org;1.pool.ntp.org;2.pool.ntp.org;3.pool.ntp.org");
887 pref("network.sntp.port", 123);
888 pref("network.sntp.timeout", 30); // In seconds.
And notably the latter can be overridden by the user if desired, and by automation for things like bug 1052016.
Also in the review comments for bug:
(In reply to Andreas Gal :gal from comment #42)
> @@ +1985,5 @@
> > + // Number of seconds between Jan 1, 1900 and Jan 1, 1970.
> > + // 70 years plus 17 leap days.
> > + let OFFSET_1900_TO_1970 = ((365 * 70) + 17) * 24 * 60 * 60;
> > + let NTP_PORT = 123;
> > + let NTP_POOLS = [
>
> please make port and domain names a pref in b2g.js
Reporter | ||
Comment 1•10 years ago
|
||
I misread Sntp.jsm; these are just the defaults that are then optionally overridden in the constructor. I think we should make the passing in the server name mandatory, since at present we're just duplicating what's in B2G.js
Summary: Sntp.jsm should not hardcode prefs that are already in b2g.js → Sntp.jsm should not hardcode default prefs that are already set in b2g.js
Reporter | ||
Updated•10 years ago
|
Severity: major → minor
Summary: Sntp.jsm should not hardcode default prefs that are already set in b2g.js → Sntp.jsm should not hardcode default NTP server names, since they are already set in b2g.js
Reporter | ||
Updated•8 years ago
|
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•