From: Eric Bollengier Date: Thu, 22 May 2014 15:17:52 +0000 (+0200) Subject: Fix copy/migration to second SD X-Git-Tag: Release-7.0.4~5 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=68b3b64ba03ec741db05f5ad200e7c0faf91ff3d;p=bacula%2Fbacula Fix copy/migration to second SD --- diff --git a/bacula/src/dird/mac.c b/bacula/src/dird/mac.c index da25e0a447..49de6df01e 100644 --- a/bacula/src/dird/mac.c +++ b/bacula/src/dird/mac.c @@ -472,10 +472,6 @@ bool do_mac(JCR *jcr) wjcr->jr.Name, (int)wjcr->jr.JobId, wjcr->jr.JobType, wjcr->jr.JobLevel); - store = wjcr->wstore; - if (store->SDDport == 0) { - store->SDDport = store->SDport; - } if (jcr->sd_calls_client) { /* @@ -486,6 +482,11 @@ bool do_mac(JCR *jcr) goto bail_out; } + /* Setup the storage address and port */ + store = wjcr->wstore; + if (store->SDDport == 0) { + store->SDDport = store->SDport; + } store_address = store->address; /* note: store points to wstore */ Dmsg2(200, "Start write message thread jid=%d Job=%s\n", wjcr->JobId, wjcr->Job); @@ -518,6 +519,10 @@ bool do_mac(JCR *jcr) * * Send Storage daemon address to the writing SD */ + store = jcr->rstore; + if (store->SDDport == 0) { + store->SDDport = store->SDport; + } store_address = get_storage_address(jcr->client, store); store_port = store->SDDport;