File: initialise_values.patch

package info (click to toggle)
mon-client 1.2.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 328 kB
  • sloc: perl: 2,381; makefile: 2
file content (25 lines) | stat: -rw-r--r-- 759 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Author: Russell Coker <russell@coker.com.au>
Last-Update: 2016-05-03
Bug-Debian: https://bugs.debian.org/823291
Description: fix the Perl errors and just clearly display the application errors

--- a/Mon/Client.pm
+++ b/Mon/Client.pm
@@ -251,7 +251,7 @@ sub protid {
     my ($r, $l) = _do_cmd ($self->{"HANDLE"}, "protid $p");
 
     if (!defined $r) {
-	$self->{"ERROR"} = "error ($l)";
+	$self->{"ERROR"} = "error";
     	return undef;
     } elsif ($r !~ /^220/) {
 	$self->{"ERROR"} = $r;
@@ -266,7 +266,7 @@ sub disconnect {
 
     undef $self->{"ERROR"};
 
-    if (!defined close ($self->{"HANDLE"})) {
+    if (defined $self->{"HANDLE"} and !defined close ($self->{"HANDLE"})) {
 	$self->{"ERROR"} = "could not close: $!";
     	return undef;
     }