summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTiago Salem Herrmann <salem@mandriva.com.br>2008-03-11 20:12:51 +0000
committerTiago Salem Herrmann <salem@mandriva.com.br>2008-03-11 20:12:51 +0000
commit7fc3efcf1cc09fe28ab4f728a9b12dd52d9010a4 (patch)
treea181cdaefad3e0c42d4fbaeb4574ad12f90ee8fe
parent5d05527de82c6c954365fa87f94591e4733253df (diff)
downloaddrakx-7fc3efcf1cc09fe28ab4f728a9b12dd52d9010a4.tar
drakx-7fc3efcf1cc09fe28ab4f728a9b12dd52d9010a4.tar.gz
drakx-7fc3efcf1cc09fe28ab4f728a9b12dd52d9010a4.tar.bz2
drakx-7fc3efcf1cc09fe28ab4f728a9b12dd52d9010a4.tar.xz
drakx-7fc3efcf1cc09fe28ab4f728a9b12dd52d9010a4.zip
- fixing crash when installing parallel scanner (#36387, #37039)
-rw-r--r--perl-install/NEWS1
-rw-r--r--perl-install/scanner.pm7
-rwxr-xr-xperl-install/standalone/scannerdrake8
3 files changed, 9 insertions, 7 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index 75b4e2525..cd381b16d 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -1,5 +1,6 @@
- draksound:
o enable to set 5.1 channels (#38796)
+- scannerdrake: fix undefined variable $in (#36387, #37039)
Version 10.11 - 11 March 2008
diff --git a/perl-install/scanner.pm b/perl-install/scanner.pm
index dd42cbb7e..239520c01 100644
--- a/perl-install/scanner.pm
+++ b/perl-install/scanner.pm
@@ -123,7 +123,8 @@ sub installfirmware {
return $firmware;
}
-sub configured() {
+sub configured {
+ my ($in) = @_;
my @res;
my $parportscannerfound = 0;
# Run "scanimage -L", to find the scanners which are already working
@@ -160,7 +161,7 @@ sub configured() {
}
close LIST;
# We have a parallel port scanner, make it working for non-root users
- nonroot_access_for_parport($parportscannerfound);
+ nonroot_access_for_parport($parportscannerfound, $in);
return @res;
}
@@ -175,7 +176,7 @@ sub nonroot_access_for_parport {
# http://www.linuxprinting.org/download/digitalimage/Scanning-as-Normal-User-on-Wierd-Scanner-Mini-HOWTO.txt
# Desired state of this facility: 1: Enable, 0: Disable
- my ($enable) = @_;
+ my ($enable, $in) = @_;
# Is saned running?
my $sanedrunning = services::starts_on_boot("saned");
# Is the "net" SANE backend active
diff --git a/perl-install/standalone/scannerdrake b/perl-install/standalone/scannerdrake
index e120d2f78..9b2b1f800 100755
--- a/perl-install/standalone/scannerdrake
+++ b/perl-install/standalone/scannerdrake
@@ -65,7 +65,7 @@ Do you want to install the SANE packages?"))) {
if ($::Manual) { manual(); quit() }
my $wait = $in->wait_message(N("Please wait"),
N("Searching for configured scanners..."));
-my @c = scanner::configured();
+my @c = scanner::configured($in);
$wait = undef;
$wait = $in->wait_message(N("Please wait"),
N("Searching for new scanners..."));
@@ -77,7 +77,7 @@ if ($changed) {
my $_wait =
$in->wait_message(N("Please wait"),
N("Re-generating list of configured scanners..."));
- @c = scanner::configured();
+ @c = scanner::configured($in);
}
mainwindow(@c);
quit();
@@ -504,7 +504,7 @@ sub mainwindow {
my $wait =
$in->wait_message(N("Please wait"),
N("Searching for configured scanners..."));
- @configured = scanner::configured();
+ @configured = scanner::configured($in);
$wait =
$in->wait_message(N("Please wait"),
N("Searching for new scanners..."));
@@ -530,7 +530,7 @@ sub mainwindow {
my $_wait =
$in->wait_message(N("Please wait"),
N("Re-generating list of configured scanners..."));
- @configured = scanner::configured();
+ @configured = scanner::configured($in);
}
} else {
# Cancel clicked