diff options
author | Olivier Blin <oblin@mandriva.com> | 2008-05-17 11:23:40 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2008-05-17 11:23:40 +0000 |
commit | cbde16f7efa8d6ac711f379c06c082d4e18744fa (patch) | |
tree | 441db4b62697c8df7f1ed8c7fa22e84984eb7afd /lib | |
parent | 83b3b4aefb9de56d2441b2c9d07c5666ba944f4c (diff) | |
download | drakx-net-cbde16f7efa8d6ac711f379c06c082d4e18744fa.tar drakx-net-cbde16f7efa8d6ac711f379c06c082d4e18744fa.tar.gz drakx-net-cbde16f7efa8d6ac711f379c06c082d4e18744fa.tar.bz2 drakx-net-cbde16f7efa8d6ac711f379c06c082d4e18744fa.tar.xz drakx-net-cbde16f7efa8d6ac711f379c06c082d4e18744fa.zip |
add infrastructure to use a control device different from the tty device
Diffstat (limited to 'lib')
-rw-r--r-- | lib/network/connection/cellular_card.pm | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/network/connection/cellular_card.pm b/lib/network/connection/cellular_card.pm index 1bbb23e..3be4edb 100644 --- a/lib/network/connection/cellular_card.pm +++ b/lib/network/connection/cellular_card.pm @@ -59,12 +59,17 @@ sub get_tty_device { "/dev/ttyUSB0"; } +sub get_control_device { + my ($self) = @_; + $self->get_tty_device; +} + sub network_scan_is_slow() { 1 } sub check_hardware_is_slow() { 1 } sub get_networks { my ($self) = @_; - my $cmd = 'comgt -d ' . $self->get_tty_device; + my $cmd = 'comgt -d ' . $self->get_control_device; my ($network, $state) = `$cmd reg` =~ /^Registered on \w+ network: "(.*)",(\d+)$/m; my ($strength) = `$cmd sig` =~ /^Signal Quality:\s+(\d+),\d+$/; $self->{networks} = $network && { @@ -171,7 +176,7 @@ sub check_hardware { require c; use POSIX qw(:errno_h); - my $pid = IPC::Open2::open2(my $cmd_out, my $cmd_in, 'comgt', '-d', $self->get_tty_device); + my $pid = IPC::Open2::open2(my $cmd_out, my $cmd_in, 'comgt', '-d', $self->get_control_device); common::nonblock($cmd_out); my $selector = IO::Select->new($cmd_out); my $already_entered_pin; |