summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS2
-rwxr-xr-xmdkapplet12
2 files changed, 4 insertions, 10 deletions
diff --git a/NEWS b/NEWS
index e5ed510f..a0069595 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,5 @@
+- simplify network detection
+
Version 2.36 - 14 March 2008, Thierry Vignaud
- mdkapplet:
diff --git a/mdkapplet b/mdkapplet
index c5318e2e..db27cd01 100755
--- a/mdkapplet
+++ b/mdkapplet
@@ -413,7 +413,8 @@ sub setLastTime() {
}
sub checkNetwork() {
- if (!isNetwork()) {
+ require network::tools;
+ if (!network::tools::has_network_connection()) {
# do not notify if already done:
return if member($state_global, qw(disconnected));
logIt(N_("Checking Network: seems disabled\n"));
@@ -434,15 +435,6 @@ sub go2State {
$state_global = $state;
}
-sub isNetwork() {
- require network::network;
- require network::tools;
- my $net = {};
- network::network::read_net_conf($net);
- my ($_gw_intf, $_is_up, $gw_address, $_dns_server) = network::tools::get_internet_connection($net);
- to_bool($gw_address);
-}
-
sub shouldStart() {
my %p = getVarsFromSh($localfile);
to_bool($p{AUTOSTART} ne 'FALSE');