many others, a complete list can be found in the file AUTHORS.
This program is Free Software; you can redistribute it and/or
modify it under the terms of version two of the GNU General Public
- License as published by the Free Software Foundation plus additions
- that are listed in the file LICENSE.
+ License as published by the Free Software Foundation and included
+ in the file LICENSE.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
edit_uint64_with_commas(sm_buffers, b4),
edit_uint64_with_commas(sm_max_buffers, b5));
sendit(msg, len, arg);
+ len = Mmsg(msg, "Sizes: boffset_t=%d size_t=%d int32_t=%d int64_t=%d\n",
+ (int)sizeof(boffset_t), (int)sizeof(size_t), (int)sizeof(int32_t),
+ (int)sizeof(int64_t));
+ sendit(msg, len, arg);
/*
* List running jobs
dev = device->dev;
if (dev && dev->is_open()) {
if (dev->is_labeled()) {
- len = Mmsg(msg, _("Device %s is mounted with Volume=\"%s\" Pool=\"%s\"\n"),
- dev->print_name(), dev->VolHdr.VolumeName,
- dev->pool_name[0]?dev->pool_name:"*unknown*");
+ len = Mmsg(msg, _("Device %s is mounted with:\n"
+ " Volume: %s\n"
+ " Pool: %s\n"
+ " Media type: %s\n"),
+ dev->print_name(),
+ dev->VolHdr.VolumeName,
+ dev->pool_name[0]?dev->pool_name:"*unknown*",
+ dev->device->media_type);
sendit(msg, len, arg);
} else {
len = Mmsg(msg, _("Device %s open but no Bacula volume is currently mounted.\n"),
#ifdef xxx
if (debug_level > 10) {
- bnet_fsend(user, _("====\n\n"));
+ user->fsend(_("====\n\n"));
dump_resource(R_DEVICE, resources[R_DEVICE-r_first].res_head, sendit, user);
- bnet_fsend(user, _("====\n\n"));
+ user->fsend(_("====\n\n"));
}
#endif
if (dcrs != NULL) {
DCR *dcr;
-
for (dcr = (DCR *)dcrs->first(); dcr != NULL; dcr = (DCR *)dcrs->next(dcr)) {
if (dcr->jcr->JobStatus == JS_WaitMount) {
- len = Mmsg(msg, _(" Device is BLOCKED waiting for mount of volume \"%s\".\n"),
- dcr->VolumeName);
+ len = Mmsg(msg, _(" Device is BLOCKED waiting for mount of volume \"%s\",\n"
+ " Pool: %s\n"
+ " Media type: %s\n"),
+ dcr->VolumeName,
+ dcr->pool_name,
+ dcr->media_type);
+ sendit(msg, len, arg);
+ found_jcr = true;
+ } else if (dcr->jcr->JobStatus == JS_WaitMedia) {
+ len = Mmsg(msg, _(" Device is BLOCKED waiting to create a volume for:\n"
+ " Pool: %s\n"
+ " Media type: %s\n"),
+ dcr->pool_name,
+ dcr->media_type);
sendit(msg, len, arg);
found_jcr = true;
}
len = Mmsg(msg, _(" FDReadSeqNo=%s in_msg=%u out_msg=%d fd=%d\n"),
edit_uint64_with_commas(jcr->file_bsock->read_seqno, b1),
jcr->file_bsock->in_msg_no, jcr->file_bsock->out_msg_no,
- jcr->file_bsock->fd);
+ jcr->file_bsock->m_fd);
sendit(msg, len, arg);
} else {
len = Mmsg(msg, _(" FDSocket closed\n"));
/*
* Send to Director
*/
-static void bsock_sendit(const char *msg, int len, void *arg)
+static void dir_sendit(const char *msg, int len, void *arg)
{
BSOCK *user = (BSOCK *)arg;
memcpy(user->msg, msg, len+1);
user->msglen = len+1;
- bnet_send(user);
+ user->send();
}
/*
{
BSOCK *user = jcr->dir_bsock;
- bnet_fsend(user, "\n");
- output_status(bsock_sendit, (void *)user);
+ user->fsend("\n");
+ output_status(dir_sendit, (void *)user);
- bnet_sig(user, BNET_EOD);
+ user->signal(BNET_EOD);
return 1;
}
if (sscanf(dir->msg, qstatus, time.c_str()) != 1) {
pm_strcpy(jcr->errmsg, dir->msg);
Jmsg1(jcr, M_FATAL, 0, _("Bad .status command: %s\n"), jcr->errmsg);
- bnet_fsend(dir, _("3900 Bad .status command, missing argument.\n"));
- bnet_sig(dir, BNET_EOD);
+ dir->fsend(_("3900 Bad .status command, missing argument.\n"));
+ dir->signal(BNET_EOD);
return false;
}
unbash_spaces(time);
if (strcmp(time.c_str(), "current") == 0) {
- bnet_fsend(dir, OKqstatus, time.c_str());
+ dir->fsend(OKqstatus, time.c_str());
foreach_jcr(njcr) {
if (njcr->JobId != 0) {
- bnet_fsend(dir, DotStatusJob, njcr->JobId, njcr->JobStatus, njcr->JobErrors);
+ dir->fsend(DotStatusJob, njcr->JobId, njcr->JobStatus, njcr->JobErrors);
}
}
endeach_jcr(njcr);
} else if (strcmp(time.c_str(), "last") == 0) {
- bnet_fsend(dir, OKqstatus, time.c_str());
+ dir->fsend(OKqstatus, time.c_str());
if ((last_jobs) && (last_jobs->size() > 0)) {
job = (s_last_job*)last_jobs->last();
- bnet_fsend(dir, DotStatusJob, job->JobId, job->JobStatus, job->Errors);
+ dir->fsend(DotStatusJob, job->JobId, job->JobStatus, job->Errors);
}
} else {
pm_strcpy(jcr->errmsg, dir->msg);
Jmsg1(jcr, M_FATAL, 0, _("Bad .status command: %s\n"), jcr->errmsg);
- bnet_fsend(dir, _("3900 Bad .status command, wrong argument.\n"));
- bnet_sig(dir, BNET_EOD);
+ dir->fsend(_("3900 Bad .status command, wrong argument.\n"));
+ dir->signal(BNET_EOD);
return false;
}
- bnet_sig(dir, BNET_EOD);
+ dir->signal(BNET_EOD);
return true;
}