Merge lp:~marcustomlinson/unity-scope-youtube/fix_update_config into lp:unity-scope-youtube

Proposed by Marcus Tomlinson
Status: Merged
Merged at revision: 127
Proposed branch: lp:~marcustomlinson/unity-scope-youtube/fix_update_config
Merge into: lp:unity-scope-youtube
Diff against target: 22 lines (+2/-3)
1 file modified
src/youtube/api/client.cpp (+2/-3)
To merge this branch: bzr merge lp:~marcustomlinson/unity-scope-youtube/fix_update_config
Reviewer Review Type Date Requested Status
Pete Woods Pending
Review via email: mp+243671@code.launchpad.net

Commit message

Initialise Config on entry to update_config()

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/youtube/api/client.cpp'
2--- src/youtube/api/client.cpp 2014-12-04 05:58:00 +0000
3+++ src/youtube/api/client.cpp 2014-12-04 14:26:37 +0000
4@@ -176,6 +176,8 @@
5 }
6
7 void update_config() {
8+ config_ = Config();
9+
10 if (getenv("YOUTUBE_SCOPE_APIROOT")) {
11 config_.apiroot = getenv("YOUTUBE_SCOPE_APIROOT");
12 }
13@@ -207,9 +209,6 @@
14 }
15
16 if (!config_.authenticated) {
17- config_.access_token = "";
18- config_.client_id = "";
19- config_.client_secret = "";
20 std::cerr << "YouTube scope is unauthenticated" << std::endl;
21 } else {
22 std::cerr << "YouTube scope is authenticated" << std::endl;

Subscribers

People subscribed via source and target branches