diff options
author | Olivier Blin <oblin@mandriva.com> | 2008-12-15 11:59:08 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2008-12-15 11:59:08 +0000 |
commit | 12903bc3c97a7e39a130ffc9b07631186fb7c9ba (patch) | |
tree | 79719b3ee69a72a9aa5dd6ec392a0771fba58f5a /lib/network/netcenter.pm | |
parent | 78b07f05660628e6d00efe69022c2c1248b79df4 (diff) | |
download | drakx-net-12903bc3c97a7e39a130ffc9b07631186fb7c9ba.tar drakx-net-12903bc3c97a7e39a130ffc9b07631186fb7c9ba.tar.gz drakx-net-12903bc3c97a7e39a130ffc9b07631186fb7c9ba.tar.bz2 drakx-net-12903bc3c97a7e39a130ffc9b07631186fb7c9ba.tar.xz drakx-net-12903bc3c97a7e39a130ffc9b07631186fb7c9ba.zip |
keep wireless wait messages while wpa_supplicant is associating
Diffstat (limited to 'lib/network/netcenter.pm')
-rwxr-xr-x | lib/network/netcenter.pm | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/network/netcenter.pm b/lib/network/netcenter.pm index 5e170d9..a43c52a 100755 --- a/lib/network/netcenter.pm +++ b/lib/network/netcenter.pm @@ -18,6 +18,7 @@ sub build_cmanager { my $cmanager = network::connection_manager->new($in, $net, $w, $pixbufs); $cmanager->set_connection($connection); $cmanager->{gui}{show_unique_network} = $cmanager->{connection}->has_unique_network; + $cmanager->{wait_message_timeout} = 20*1000 if ref($connection) eq 'network::connection::wireless' && $net->{monitor}; if ($connection->can('get_networks')) { $cmanager->create_networks_list; @@ -198,6 +199,15 @@ sub main { if ($msg->get_interface eq 'com.mandriva.monitoring.wireless' && $msg->get_member eq 'Event') { my ($event, $interface) = $msg->get_args_list; print "got wireless event: $event $interface\n"; + my $cmanager = find { $_->{connection}->get_interface eq $interface } @cmanagers; + if ($cmanager && $cmanager->{wait_message}) { + if ($event =~ /CTRL-EVENT-CONNECTED/) { + undef $cmanager->{wait_message}; + } elsif ($event =~ /Authentication with (.+?) timed out/) { + undef $cmanager->{wait_message}; + $cmanager->{in}->ask_warn(N("Error"), N("Connection failed.")); + } + } } }); $dbus->{connection}->add_match("type='signal',interface='com.mandriva.network'"); |