Fix #9305 At restore time, show wrong Backup Client when modifying client
There is two values :
Backup Client: this is related to the backup job, then this is immutable as the job already ran
Restore Client: this is related to the restore, this can change
In a "normal" restore, the values that are assigned are as follow :
The value jcr->job->client->hdr.name did not change has expected (it should be immutable) and should be used instead of the conditional for the "Backup Client" value
When doing the mod, the code does
case 4:
/* Client */
{
int32_t jt = rc.job ? rc.job->JobType : JT_SYSTEM;
rc.client = select_client_resource(ua, jt);
if (rc.client) {
jcr->client = rc.client;
goto try_again;
}
}
Then both the rc.client and the jcr->client are modified
I think the right solution is just to use
jcr->job->client->hdr.name
instead of the conditional
rc.client ? rc.client->hdr.name : jcr->job->client->hdr.name