}
}
- bnet_fsend(fd, storaddr, store->address, store->SDDport, tls_need);
+ fd->fsend(storaddr, store->address, store->SDDport, tls_need);
if (!response(jcr, fd, OKstore, "Storage", DISPLAY_ERROR)) {
goto bail_out;
}
}
/* Send backup command */
- bnet_fsend(fd, backupcmd);
+ fd->fsend(backupcmd);
if (!response(jcr, fd, OKbackup, "backup", DISPLAY_ERROR)) {
goto bail_out;
}
Jmsg(jcr, M_FATAL, 0, _("Network error with FD during %s: ERR=%s\n"),
job_type_to_str(jcr->JobType), fd->bstrerror());
}
- bnet_sig(fd, BNET_TERMINATE); /* tell Client we are terminating */
+ fd->signal(BNET_TERMINATE); /* tell Client we are terminating */
/* Force cancel in SD if failing */
if (job_canceled(jcr) || !fd_ok) {
term_msg = _("*** Backup Error ***");
msg_type = M_ERROR; /* Generate error message */
if (jcr->store_bsock) {
- bnet_sig(jcr->store_bsock, BNET_TERMINATE);
+ jcr->store_bsock->signal(BNET_TERMINATE);
if (jcr->SD_msg_chan) {
pthread_cancel(jcr->SD_msg_chan);
}
case JS_Canceled:
term_msg = _("Backup Canceled");
if (jcr->store_bsock) {
- bnet_sig(jcr->store_bsock, BNET_TERMINATE);
+ jcr->store_bsock->signal(BNET_TERMINATE);
if (jcr->SD_msg_chan) {
pthread_cancel(jcr->SD_msg_chan);
}
{
BSOCK *fd = jcr->file_bsock;
if (jcr->fileset->new_include) {
- bnet_fsend(fd, filesetcmd, jcr->fileset->enable_vss ? " vss=1" : "");
+ fd->fsend(filesetcmd, jcr->fileset->enable_vss ? " vss=1" : "");
return send_fileset(jcr);
}
return true;
set_jcr_job_status(jcr, JS_ErrorTerminated);
return false;
}
- bnet_fsend(sock, bootstrap);
+ sock->fsend(bootstrap);
while (fgets(buf, sizeof(buf), bs)) {
- bnet_fsend(sock, "%s", buf);
+ sock->fsend("%s", buf);
}
- bnet_sig(sock, BNET_EOD);
+ sock->signal(BNET_EOD);
fclose(bs);
if (jcr->unlink_bsr) {
unlink(jcr->RestoreBootstrap);
result = send_runscript_with_old_proto(jcr, cmd->when, msg);
} else {
- bnet_fsend(fd, runscript, cmd->on_success,
- cmd->on_failure,
- cmd->fail_on_error,
- cmd->when,
- msg);
+ fd->fsend(runscript, cmd->on_success,
+ cmd->on_failure,
+ cmd->fail_on_error,
+ cmd->when,
+ msg);
result = response(jcr, fd, OKRunScript, "RunScript", DISPLAY_ERROR);
launch_before_cmd = true;
/* Tell the FD to execute the ClientRunBeforeJob */
if (launch_before_cmd) {
- bnet_fsend(fd, runbeforenow);
+ fd->fsend(runbeforenow);
if (!response(jcr, fd, OKRunBeforeNow, "RunBeforeNow", DISPLAY_ERROR)) {
goto bail_out;
}
if (!start_storage_daemon_job(jcr, jcr->rstorage, NULL)) {
return false;
}
- if (!bnet_fsend(jcr->store_bsock, "run")) {
+ if (!jcr->store_bsock->fsend("run")) {
return false;
}
/*
jcr->store_bsock = sd;
- bnet_fsend(sd, "Hello Start Job %s\n", jcr->Job);
+ sd->fsend("Hello Start Job %s\n", jcr->Job);
if (!authenticate_storagedaemon(jcr)) {
Jmsg(jcr, M_FATAL, 0, _("Failed to authenticate Storage daemon.\n"));
return 0;
Dmsg0(110, "Authenticated with SD.\n");
/* Send OK to Director */
- return bnet_fsend(dir, OKstore);
+ return dir->fsend(OKstore);
}
if (wid->type == TYPE_BSOCK && wid->bsock) {
wid->bsock->set_timed_out();
}
+ Jmsg(wid->jcr, M_INFO, 0, _("Thread timer expired. Thread for JobId=%u interrupted.\n"),
+ get_jobid_from_tid(wid->tid));
pthread_kill(wid->tid, TIMEOUT_SIGNAL);
- Jmsg(wid->jcr, M_INFO, 0, _("Thread timer expired. Thread interrupted.\n"));
}
static btimer_t *btimer_start_common(uint32_t wait)