From 49d212baa8f4e9f72a139465202f3d6cba53a90a Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sat, 2 Apr 2005 10:30:29 +0000 Subject: [PATCH] Fix DIR - SD use storage protocol git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1907 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/dird/msgchan.c | 3 ++- bacula/src/stored/job.c | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/bacula/src/dird/msgchan.c b/bacula/src/dird/msgchan.c index 28edd03599..e35a5a46fc 100644 --- a/bacula/src/dird/msgchan.c +++ b/bacula/src/dird/msgchan.c @@ -204,7 +204,8 @@ int start_storage_daemon_job(JCR *jcr, alist *store, int append) bnet_fsend(sd, use_device, device_name.c_str()); Dmsg1(100, ">stored: %s", sd->msg); } - bnet_sig(sd, BNET_EOD); + bnet_sig(sd, BNET_EOD); /* end of Devices */ + bnet_sig(sd, BNET_EOD); /* end of Storages */ if (bget_dirmsg(sd) > 0) { Dmsg1(100, "msg); /* ****FIXME**** save actual device name */ diff --git a/bacula/src/stored/job.c b/bacula/src/stored/job.c index c77d950168..404970bb2a 100644 --- a/bacula/src/stored/job.c +++ b/bacula/src/stored/job.c @@ -304,9 +304,12 @@ static bool use_storage_cmd(JCR *jcr) if (!ok) { return false; } - /* Eat to BNET_EOD */ + /* Eat to BNET_EOD -- end of Devices */ while (bnet_recv(dir) > 0) { } + /* Eat to end of Devices */ + while (bnet_recv(dir) > 0) { + } LockRes(); foreach_res(device, R_DEVICE) { /* Find resource, and make sure we were able to open it */ -- 2.39.5