X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;ds=sidebyside;f=bacula%2Fsrc%2Fdird%2Fua_cmds.c;h=471315ed06c6fb41854704a90a9af1b052ebdb20;hb=f183afa93772e5f5b3951407bce839b951dede96;hp=1cfceb494fa15692995cf730458cb52567596264;hpb=c7d20ca02cf7ed7f16aef472ee5724dc293439df;p=bacula%2Fbacula diff --git a/bacula/src/dird/ua_cmds.c b/bacula/src/dird/ua_cmds.c index 1cfceb494f..471315ed06 100644 --- a/bacula/src/dird/ua_cmds.c +++ b/bacula/src/dird/ua_cmds.c @@ -6,24 +6,18 @@ * * Version $Id$ */ - /* Copyright (C) 2000-2005 Kern Sibbald This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of - the License, or (at your option) any later version. + modify it under the terms of the GNU General Public License + version 2 as ammended with additional clauses defined in the + file LICENSE in the main source directory. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public - License along with this program; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - MA 02111-1307, USA. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + the file LICENSE for additional details. */ @@ -125,7 +119,7 @@ static struct cmdstruct commands[] = { { N_("trace"), trace_cmd, _("turn on/off trace to file")}, { N_("unmount"), unmount_cmd, _("unmount ")}, { N_("umount"), unmount_cmd, _("umount for old-time Unix guys")}, - { N_("update"), update_cmd, _("update Volume or Pool")}, + { N_("update"), update_cmd, _("update Volume, Pool or slots")}, { N_("use"), use_cmd, _("use catalog xxx")}, { N_("var"), var_cmd, _("does variable expansion")}, { N_("version"), version_cmd, _("print Director version")}, @@ -399,33 +393,29 @@ static int cancel_cmd(UAContext *ua, const char *cmd) if (!jcr) { char buf[1000]; /* Count Jobs running */ - lock_jcr_chain(); foreach_jcr(jcr) { if (jcr->JobId == 0) { /* this is us */ - free_locked_jcr(jcr); + free_jcr(jcr); continue; } - free_locked_jcr(jcr); + free_jcr(jcr); njobs++; } - unlock_jcr_chain(); if (njobs == 0) { bsendmsg(ua, _("No Jobs running.\n")); return 1; } start_prompt(ua, _("Select Job:\n")); - lock_jcr_chain(); foreach_jcr(jcr) { if (jcr->JobId == 0) { /* this is us */ - free_locked_jcr(jcr); + free_jcr(jcr); continue; } bsnprintf(buf, sizeof(buf), "JobId=%d Job=%s", jcr->JobId, jcr->Job); add_prompt(ua, buf); - free_locked_jcr(jcr); + free_jcr(jcr); } - unlock_jcr_chain(); if (do_prompt(ua, _("Job"), _("Choose Job to cancel"), buf, sizeof(buf)) < 0) { return 1; @@ -1054,14 +1044,13 @@ static int reload_cmd(UAContext *ua, const char *cmd) * * delete pool= * delete volume pool= volume= - * delete job jobid=xxx + * delete jobid=xxx */ static int delete_cmd(UAContext *ua, const char *cmd) { static const char *keywords[] = { N_("volume"), N_("pool"), - N_("job"), N_("jobid"), NULL}; @@ -1077,7 +1066,6 @@ static int delete_cmd(UAContext *ua, const char *cmd) delete_pool(ua); return 1; case 2: - case 3: int i; while ((i=find_arg(ua, _("jobid"))) > 0) { delete_job(ua); @@ -1357,16 +1345,14 @@ int wait_cmd(UAContext *ua, const char *cmd) bmicrosleep(0, 200000); /* let job actually start */ for (bool running=true; running; ) { running = false; - lock_jcr_chain(); foreach_jcr(jcr) { if (jcr->JobId != 0) { running = true; - free_locked_jcr(jcr); + free_jcr(jcr); break; } - free_locked_jcr(jcr); + free_jcr(jcr); } - unlock_jcr_chain(); if (running) { bmicrosleep(1, 0); }