- $xfer_src = $xfer->get_source();
- $xfer_src->set_callback(sub {
- my ($src, $xmsg, $xfer) = @_;
- if ($xmsg->{type} == $Amanda::Xfer::XMSG_ERROR) {
- $got_error = $xmsg->{message};
- }
- if ($xfer->get_status() == $Amanda::Xfer::XFER_DONE) {
- Amanda::MainLoop::quit();
- }
- });
-