on 15 November 2006.
Trademark:
-The name Bacula is a registered trademark.
+The name Bacula is a registered trademark of Kern Sibbald.
===================================
bEventRestoreCommand = 10,
bEventLevel = 11,
bEventSince = 12,
+ bEventCancelCommand = 13,
} bEventType;
typedef struct s_bEvent {
jcr->last_fname = get_pool_memory(PM_FNAME);
jcr->last_fname[0] = 0;
jcr->client_name = get_memory(strlen(my_name) + 1);
- new_plugins(jcr); /* instantiate plugins for this jcr */
pm_strcpy(jcr->client_name, my_name);
jcr->crypto.pki_sign = me->pki_sign;
jcr->crypto.pki_encrypt = me->pki_encrypt;
/**********FIXME******* add command handler error code */
for (quit=false; !quit;) {
-
/* Read command */
if (dir->recv() < 0) {
break; /* connection terminated */
cjcr->store_bsock->set_terminated();
pthread_kill(cjcr->my_thread_id, TIMEOUT_SIGNAL);
}
+ generate_plugin_event(cjcr, bEventCancelCommand, NULL);
set_jcr_job_status(cjcr, JS_Canceled);
free_jcr(cjcr);
dir->fsend(_("2001 Job %s marked to be canceled.\n"), Job);
free_pool_memory(sd_auth_key);
Dmsg2(120, "JobId=%d Auth=%s\n", jcr->JobId, jcr->sd_auth_key);
Mmsg(jcr->errmsg, "JobId=%d Job=%s", jcr->JobId, jcr->Job);
+ new_plugins(jcr); /* instantiate plugins for this jcr */
generate_plugin_event(jcr, bEventJobStart, (void *)jcr->errmsg);
return dir->fsend(OKjob, VERSION, LSMDATE, HOST_OS, DISTNAME, DISTVER);
}
void set_jcr_job_status(JCR *jcr, int JobStatus)
{
- bool set_waittime=false;
+ bool set_waittime = false;
+ int oldJobStatus = jcr->JobStatus;
+
Dmsg2(800, "set_jcr_job_status(%s, %c)\n", jcr->Job, JobStatus);
/* if wait state is new, we keep current time for watchdog MaxWaitTime */
switch (JobStatus) {
jcr->wait_time = time(NULL);
}
}
- Dmsg3(200, "jid=%u leave set_jcr_job_status=%c set=%c\n", (uint32_t)jcr->JobId,
- jcr->JobStatus, JobStatus);
+ if (oldJobStatus != jcr->JobStatus) {
+ Dmsg3(200, "jid=%u leave set_old_job_status=%c new_set=%c\n", (uint32_t)jcr->JobId,
+ oldJobStatus, JobStatus);
+// generate_plugin_event(jcr, bEventStatusChange, NULL);
+ }
}
#ifdef TRACE_JCR_CHAIN
*/
#undef VERSION
-#define VERSION "2.5.7"
-#define BDATE "28 September 2008"
-#define LSMDATE "28Sep08"
+#define VERSION "2.5.8"
+#define BDATE "29 September 2008"
+#define LSMDATE "29Sep08"
#define PROG_COPYRIGHT "Copyright (C) %d-2008 Free Software Foundation Europe e.V.\n"
#define BYEAR "2008" /* year for copyright messages in progs */
remove reader/writer in FOPTS????
General:
+29Sep08
+kes Create plugin instance only when FD job starts.
+kes Add new FD plugin event: bEventCancelCommand when
+ a cancel command is issued to the FD.
28Sep08
kes Add cmd_plugin flag to jcr so we can globally know if a
command plugin is running.