Merge lp:~lemonboy/capnet-assist/check-network-connectivity into lp:~elementary-apps/capnet-assist/trunk

Proposed by The Lemon Man
Status: Merged
Approved by: Corentin Noël
Approved revision: 25
Merged at revision: 25
Proposed branch: lp:~lemonboy/capnet-assist/check-network-connectivity
Merge into: lp:~elementary-apps/capnet-assist/trunk
Diff against target: 29 lines (+9/-1)
2 files modified
src/CaptiveLogin.vala (+8/-0)
src/config.vala (+1/-1)
To merge this branch: bzr merge lp:~lemonboy/capnet-assist/check-network-connectivity
Reviewer Review Type Date Requested Status
Adam Bieńkowski (community) code Approve
Corentin Noël Approve
Review via email: mp+275231@code.launchpad.net

Commit message

Make sure the network is available before checking for connectivity.

To post a comment you must log in.
Revision history for this message
Corentin Noël (tintou) wrote :

Works like a charm here

review: Approve
Revision history for this message
Adam Bieńkowski (donadigo) wrote :

Code: nothing to point out really.

review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/CaptiveLogin.vala'
2--- src/CaptiveLogin.vala 2015-06-06 23:51:51 +0000
3+++ src/CaptiveLogin.vala 2015-10-21 18:58:25 +0000
4@@ -52,6 +52,14 @@
5 }
6
7 public bool isLoggedIn () {
8+ var network_monitor = NetworkMonitor.get_default ();
9+
10+ // No connection is available at the moment, don't bother trying the
11+ // connectivity check
12+ if (!network_monitor.get_network_available ()) {
13+ return true;
14+ }
15+
16 var page = "http://connectivitycheck.android.com/generate_204";
17 debug ("Getting 204 page");
18
19
20=== modified file 'src/config.vala'
21--- src/config.vala 2013-08-22 15:09:15 +0000
22+++ src/config.vala 2015-10-21 18:58:25 +0000
23@@ -15,5 +15,5 @@
24 */
25
26 namespace Constants {
27- public const string VERSION = "0.1";
28+ public const string VERSION = "0.1.1";
29 }

Subscribers

People subscribed via source and target branches

to all changes: