Imported Upstream version 3.3.3
[debian/amanda] / perl / Amanda / Taper / Controller.pm
index 1cf014187f7907a3232c5a410011405dcf4e5751..1518f354b08cb849823ab335d1b183f360398862 100644 (file)
@@ -1,8 +1,9 @@
-# Copyright (c) 2009, 2010 Zmanda Inc.  All Rights Reserved.
+# Copyright (c) 2009-2012 Zmanda Inc.  All Rights Reserved.
 #
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 as published
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
 #
 # This program is distributed in the hope that it will be useful, but
 # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
@@ -104,7 +105,7 @@ sub start {
        } else {
            $msg = $params{'error'};
        }
-       log_add($L_ERROR, $msg);
+       log_add($L_ERROR, "$msg");
        print STDERR "$msg\n";
        $self->{'proto'}->send(Amanda::Taper::Protocol::BAD_COMMAND,
            message => $msg);
@@ -114,7 +115,7 @@ sub start {
        tx_fh => *STDOUT,
        message_cb => $message_cb,
        message_obj => $self,
-       debug => $Amanda::Config::debug_taper?'driver/taper':'',
+       debug => $Amanda::Config::debug_taper?'taper/driver':'',
     );
 
     my $changer = Amanda::Changer->new(undef, tapelist => $self->{'tapelist'});
@@ -265,6 +266,14 @@ sub msg_FAILED {
     $worker->FAILED(@_);
 }
 
+sub msg_CLOSE_VOLUME {
+    my $self = shift;
+    my ($msgtype, %params) = @_;
+
+    my $worker = $self->{'worker'}->{$params{'worker_name'}};
+    $worker->CLOSE_VOLUME(@_);
+}
+
 sub msg_TAKE_SCRIBE_FROM {
     my $self = shift;
     my ($msgtype, %params) = @_;