summaryrefslogtreecommitdiffstats
path: root/lib/network/connection/wireless.pm
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-10-02 17:56:19 +0000
committerOlivier Blin <oblin@mandriva.com>2008-10-02 17:56:19 +0000
commitd1acb2b6dee32b5d8fcf8c7302dba455ca2ca50f (patch)
tree6c8c328899d4683d508744bfbc800cffe8010c05 /lib/network/connection/wireless.pm
parent54353dc0276a47bf8f065f405661858ec01113c8 (diff)
downloaddrakx-net-d1acb2b6dee32b5d8fcf8c7302dba455ca2ca50f.tar
drakx-net-d1acb2b6dee32b5d8fcf8c7302dba455ca2ca50f.tar.gz
drakx-net-d1acb2b6dee32b5d8fcf8c7302dba455ca2ca50f.tar.bz2
drakx-net-d1acb2b6dee32b5d8fcf8c7302dba455ca2ca50f.tar.xz
drakx-net-d1acb2b6dee32b5d8fcf8c7302dba455ca2ca50f.zip
extract network_id variable (for next commit)
Diffstat (limited to 'lib/network/connection/wireless.pm')
-rw-r--r--lib/network/connection/wireless.pm7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/network/connection/wireless.pm b/lib/network/connection/wireless.pm
index 4653b79..20ebd8d 100644
--- a/lib/network/connection/wireless.pm
+++ b/lib/network/connection/wireless.pm
@@ -704,12 +704,13 @@ sub connect {
if ($self->{control}{roaming}) {
refresh_roaming_ids($self);
my $network = $self->get_selected_network;
- if ($network && defined $network->{id}) {
+ my $network_id = $network->{id} if $network && defined $network->{id};
+ if (defined $network_id) {
if ($net->{monitor}) {
- eval { $net->{monitor}->select_network($network->{id}) };
+ eval { $net->{monitor}->select_network($network_id) };
return !$@;
} else {
- run_program::run('/usr/sbin/wpa_cli', 'select_network', $network->{id});
+ run_program::run('/usr/sbin/wpa_cli', 'select_network', $network_id);
}
}
}