return false;
}
sd = jcr->store_bsock;
- jcr->sd_calls_client = jcr->client->sd_calls_client;
+ if (jcr->client) {
+ jcr->sd_calls_client = jcr->client->sd_calls_client;
+ }
/*
* Note startup sequence of SD/FD is different depending on
* whether the SD listens (normal) or the SD calls the FD.
JOB_DBR jr;
int i;
USTORE store;
+ CLIENT *client;
if (!jcr->client) {
memset(&cr, 0, sizeof(cr));
}
if (acl_access_ok(ua, Client_ACL, cr.Name)) {
- jcr->client = (CLIENT *)GetResWithName(R_CLIENT, cr.Name);
+ client = (CLIENT *)GetResWithName(R_CLIENT, cr.Name);
+ if (client) {
+ jcr->client = client;
+ } else {
+ Jmsg1(jcr, M_FATAL, 0, _("Client resource \"%s\" does not exist.\n"), cr.Name);
+ goto bail_out;
+ }
+ } else {
+ goto bail_out;
}
}
copy_rwstorage(jcr, job->pool->storage, _("Pool resource"));
}
jcr->client = job->client;
+ ASSERT2(jcr->client, "jcr->client==NULL!!!");
if (!jcr->client_name) {
jcr->client_name = get_pool_memory(PM_NAME);
}