Merge lp:~marcustomlinson/unity-scopes-api/post_config_stage2_fix into lp:unity-scopes-api/devel

Proposed by Marcus Tomlinson
Status: Superseded
Proposed branch: lp:~marcustomlinson/unity-scopes-api/post_config_stage2_fix
Merge into: lp:unity-scopes-api/devel
Prerequisite: lp:~michihenning/unity-scopes-api/config-fixes-stage2
Diff against target: 22 lines (+2/-10)
1 file modified
src/scopes/internal/ScopeConfig.cpp (+2/-10)
To merge this branch: bzr merge lp:~marcustomlinson/unity-scopes-api/post_config_stage2_fix
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Needs Fixing
Unity Team Pending
Review via email: mp+218922@code.launchpad.net

Commit message

Cleaned up idle_timeout_ initialisation after new config updates

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
329. By Marcus Tomlinson

Merged config-fixes-stage2

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/scopes/internal/ScopeConfig.cpp'
2--- src/scopes/internal/ScopeConfig.cpp 2014-05-09 04:24:50 +0000
3+++ src/scopes/internal/ScopeConfig.cpp 2014-05-09 06:58:05 +0000
4@@ -124,16 +124,8 @@
5 {
6 }
7
8- ///! TODO: replace code below with commented-out line once config-fixes-stage2 lands
9- // idle_timeout_ = get_optional_int(scope_config_group, idle_timeout_key, DFLT_SCOPE_IDLE_TIMEOUT);
10- try
11- {
12- idle_timeout_ = parser()->get_int(scope_config_group, idle_timeout_key);
13- }
14- catch (unity::LogicException const&)
15- {
16- idle_timeout_ = DFLT_SCOPE_IDLE_TIMEOUT;
17- }
18+ idle_timeout_ = get_optional_int(scope_config_group, idle_timeout_key, DFLT_SCOPE_IDLE_TIMEOUT);
19+
20 // Negative values and values greater than max int (once multiplied by 1000 (s to ms)) are illegal
21 const int max_idle_timeout = std::numeric_limits<int>::max() / 1000;
22 if (idle_timeout_ < 0 || idle_timeout_ > max_idle_timeout)

Subscribers

People subscribed via source and target branches

to all changes: