-
Notifications
You must be signed in to change notification settings - Fork 1
/
webpagetest-software-update.patch
37 lines (36 loc) · 1.64 KB
/
webpagetest-software-update.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
diff --git a/agent/wptdriver/software_update.cc b/agent/wptdriver/software_update.cc
index d734c95..69bcdbb 100644
--- a/agent/wptdriver/software_update.cc
+++ b/agent/wptdriver/software_update.cc
@@ -43,6 +43,11 @@ void SoftwareUpdate::LoadSettings(CString settings_ini) {
buff, _countof(buff), settings_ini)) {
_software_url = buff;
}
+
+ _software_update_interval_minutes = GetPrivateProfileInt(_T("WebPagetest"),
+ _T("software_update_interval_minutes"),
+ SOFTWARE_UPDATE_INTERVAL_MINUTES,
+ settings_ini);
if (GetPrivateProfileSectionNames(sections, _countof(sections),
settings_ini)) {
TCHAR * section = sections;
@@ -305,7 +310,7 @@ bool SoftwareUpdate::TimeToCheck(void) {
} else {
DWORD elapsed = (DWORD)((now.QuadPart - _last_update_check.QuadPart)
/ _perf_frequency_minutes.QuadPart);
- if (elapsed >= SOFTWARE_UPDATE_INTERVAL_MINUTES) {
+ if (elapsed >= _software_update_interval_minutes) {
should_check = true;
}
}
diff --git a/agent/wptdriver/software_update.h b/agent/wptdriver/software_update.h
index f9be79e..e455fc2 100644
--- a/agent/wptdriver/software_update.h
+++ b/agent/wptdriver/software_update.h
@@ -32,6 +32,7 @@ protected:
CString _directory;
LARGE_INTEGER _last_update_check;
LARGE_INTEGER _perf_frequency_minutes;
+ DWORD _software_update_interval_minutes;
WptStatus &_status;
bool UpdateBrowsers(void);