Imported Upstream version 3.3.1
[debian/amanda] / device-src / xfer-source-recovery.c
index 4f736a21a61e4684477be2c8bb215a30c759f7d9..16673e0d1932abecda5f1ba130320e81bf797b81 100644 (file)
@@ -115,7 +115,7 @@ _xsr_dbg(const char *fmt, ...)
     arglist_start(argp, fmt);
     g_vsnprintf(msg, sizeof(msg), fmt, argp);
     arglist_end(argp);
-    g_debug("XSR thd-%p: %s", g_thread_self(), msg);
+    g_debug("XSR: %s", msg);
 }
 
 /*
@@ -407,8 +407,9 @@ pull_buffer_impl(
                    _("error reading from %s: %s"),
                    self->device->device_name,
                    device_error_or_status(self->device));
+               g_mutex_unlock(self->start_part_mutex);
                wait_until_xfer_cancelled(elt->xfer);
-                goto error;
+                goto error_unlocked;
            }
 
            /* the device has signalled EOF (really end-of-part), so clean up instance
@@ -463,6 +464,7 @@ pull_buffer_impl(
     return buf;
 error:
     g_mutex_unlock(self->start_part_mutex);
+error_unlocked:
     *size = 0;
     return NULL;
 }