From 199f8359ca5b5677c561fe471e733b454bdfaf53 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Mon, 7 Apr 2003 20:29:47 +0000 Subject: [PATCH] Change spelling of cancelled git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@430 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/dird/msgchan.c | 2 +- bacula/src/filed/backup.c | 2 +- bacula/src/filed/restore.c | 2 +- bacula/src/filed/verify.c | 2 +- bacula/src/filed/verify_vol.c | 4 ++-- bacula/src/findlib/find.c | 2 +- bacula/src/findlib/find_one.c | 2 +- bacula/src/jcr.h | 6 ------ bacula/src/lib/bnet.c | 2 +- bacula/src/stored/acquire.c | 8 ++++---- bacula/src/stored/append.c | 4 ++-- bacula/src/stored/askdir.c | 12 ++++++------ bacula/src/stored/btape.c | 4 ++-- bacula/src/stored/mount.c | 4 ++-- bacula/src/stored/read.c | 2 +- bacula/src/stored/read_record.c | 2 +- 16 files changed, 27 insertions(+), 33 deletions(-) diff --git a/bacula/src/dird/msgchan.c b/bacula/src/dird/msgchan.c index cdaad12cff..a17c8413b5 100644 --- a/bacula/src/dird/msgchan.c +++ b/bacula/src/dird/msgchan.c @@ -266,7 +266,7 @@ void wait_for_storage_daemon_termination(JCR *jcr) timeout.tv_sec = tv.tv_sec + 10; /* wait 10 seconds */ Dmsg0(300, "I'm waiting for message thread termination.\n"); pthread_cond_timedwait(&jcr->term_wait, &jcr->mutex, &timeout); - if (job_cancelled(jcr)) { + if (job_canceled(jcr)) { cancel_count++; } /* Give SD 30 seconds to clean up after cancel */ diff --git a/bacula/src/filed/backup.c b/bacula/src/filed/backup.c index ee1f22ea0d..480fac4b90 100644 --- a/bacula/src/filed/backup.c +++ b/bacula/src/filed/backup.c @@ -107,7 +107,7 @@ static int save_file(FF_PKT *ff_pkt, void *ijcr) JCR *jcr = (JCR *)ijcr; POOLMEM *msgsave; - if (job_cancelled(jcr)) { + if (job_canceled(jcr)) { return 0; } diff --git a/bacula/src/filed/restore.c b/bacula/src/filed/restore.c index 35e2497175..c2e1e503d4 100644 --- a/bacula/src/filed/restore.c +++ b/bacula/src/filed/restore.c @@ -93,7 +93,7 @@ void do_restore(JCR *jcr) * or c. Possibly MD5 or SHA1 record * 3. Repeat step 1 */ - while (bnet_recv(sd) >= 0 && !job_cancelled(jcr)) { + while (bnet_recv(sd) >= 0 && !job_canceled(jcr)) { /* * First we expect a Stream Record Header */ diff --git a/bacula/src/filed/verify.c b/bacula/src/filed/verify.c index 3bff5a1d51..0af6a2bd4b 100644 --- a/bacula/src/filed/verify.c +++ b/bacula/src/filed/verify.c @@ -74,7 +74,7 @@ static int verify_file(FF_PKT *ff_pkt, void *pkt) BSOCK *dir; JCR *jcr = (JCR *)pkt; - if (job_cancelled(jcr)) { + if (job_canceled(jcr)) { return 0; } diff --git a/bacula/src/filed/verify_vol.c b/bacula/src/filed/verify_vol.c index 59f7a7533b..ea12a055c1 100644 --- a/bacula/src/filed/verify_vol.c +++ b/bacula/src/filed/verify_vol.c @@ -75,7 +75,7 @@ void do_verify_volume(JCR *jcr) /* * Get a record from the Storage daemon */ - while (bnet_recv(sd) >= 0 && !job_cancelled(jcr)) { + while (bnet_recv(sd) >= 0 && !job_canceled(jcr)) { /* * First we expect a Stream Record Header */ @@ -89,7 +89,7 @@ void do_verify_volume(JCR *jcr) /* * Now we expect the Stream Data */ - if (bnet_recv(sd) < 0 && !job_cancelled(jcr)) { + if (bnet_recv(sd) < 0 && !job_canceled(jcr)) { Jmsg1(jcr, M_FATAL, 0, _("Data record error. ERR=%s\n"), bnet_strerror(sd)); goto bail_out; } diff --git a/bacula/src/findlib/find.c b/bacula/src/findlib/find.c index 17de805ee7..1afeec0f5b 100644 --- a/bacula/src/findlib/find.c +++ b/bacula/src/findlib/find.c @@ -107,7 +107,7 @@ find_files(JCR *jcr, FF_PKT *ff, int callback(FF_PKT *ff_pkt, void *hpkt), void char *file; struct s_included_file *inc = NULL; - while (!job_cancelled(jcr) && (inc = get_next_included_file(ff, inc))) { + while (!job_canceled(jcr) && (inc = get_next_included_file(ff, inc))) { file = inc->fname; strcpy(ff->VerifyOpts, inc->VerifyOpts); /* Copy options for this file */ Dmsg1(50, "find_files: file=%s\n", file); diff --git a/bacula/src/findlib/find_one.c b/bacula/src/findlib/find_one.c index 39a58ccff1..68525dc1ef 100755 --- a/bacula/src/findlib/find_one.c +++ b/bacula/src/findlib/find_one.c @@ -310,7 +310,7 @@ find_one_file(JCR *jcr, FF_PKT *ff_pkt, int handle_file(FF_PKT *ff, void *hpkt), */ rtn_stat = 1; entry = (struct dirent *)malloc(sizeof(struct dirent) + name_max + 100); - for ( ; !job_cancelled(jcr); ) { + for ( ; !job_canceled(jcr); ) { char *p, *q; int i; diff --git a/bacula/src/jcr.h b/bacula/src/jcr.h index 5df133ccdc..2a672c461e 100644 --- a/bacula/src/jcr.h +++ b/bacula/src/jcr.h @@ -60,7 +60,6 @@ #define JS_Error 'e' /* Non-fatal error */ #define JS_FatalError 'f' /* Fatal error */ #define JS_Differences 'D' /* Verify differences */ -#define JS_Cancelled 'A' /* cancelled by user */ #define JS_Canceled 'A' /* canceled by user */ #define JS_WaitFD 'F' /* waiting on File daemon */ #define JS_WaitSD 'S' /* waiting on the Storage daemon */ @@ -71,11 +70,6 @@ #define JS_WaitClientRes 'c' /* Waiting for Client resource */ #define JS_WaitMaxJobs 'd' /* Waiting for maximum jobs */ -#define job_cancelled(jcr) \ - (jcr->JobStatus == JS_Canceled || \ - jcr->JobStatus == JS_ErrorTerminated || \ - jcr->JobStatus == JS_FatalError) - #define job_canceled(jcr) \ (jcr->JobStatus == JS_Canceled || \ jcr->JobStatus == JS_ErrorTerminated || \ diff --git a/bacula/src/lib/bnet.c b/bacula/src/lib/bnet.c index 080b3a4bd6..4bd77416a0 100644 --- a/bacula/src/lib/bnet.c +++ b/bacula/src/lib/bnet.c @@ -506,7 +506,7 @@ bnet_connect(void *vjcr, int retry_interval, int max_retry_time, char *name, int fatal = 0; for (i=0; (bsock = bnet_open(jcr, name, host, service, port, &fatal)) == NULL; i -= retry_interval) { - if (fatal || (jcr && job_cancelled(jcr))) { + if (fatal || (jcr && job_canceled(jcr))) { return NULL; } Dmsg4(100, "Unable to connect to %s on %s:%d. ERR=%s\n", diff --git a/bacula/src/stored/acquire.c b/bacula/src/stored/acquire.c index a2971c17b3..744633cc24 100644 --- a/bacula/src/stored/acquire.c +++ b/bacula/src/stored/acquire.c @@ -51,14 +51,14 @@ int acquire_device_for_read(JCR *jcr, DEVICE *dev, DEV_BLOCK *block) tape_previously_mounted = (dev->state & ST_READ) || (dev->state & ST_APPEND); if (dev->state & ST_READ || dev->num_writers > 0) { - Jmsg1(jcr, M_FATAL, 0, _("Device %s is busy. Job cancelled.\n"), dev_name(dev)); + Jmsg1(jcr, M_FATAL, 0, _("Device %s is busy. Job canceled.\n"), dev_name(dev)); goto get_out; } /* Find next Volume, if any */ vol = jcr->VolList; if (!vol) { - Jmsg(jcr, M_FATAL, 0, _("No volumes specified. Job cancelled.\n")); + Jmsg(jcr, M_FATAL, 0, _("No volumes specified. Job canceled.\n")); goto get_out; } jcr->CurVolume++; @@ -68,8 +68,8 @@ int acquire_device_for_read(JCR *jcr, DEVICE *dev, DEV_BLOCK *block) pm_strcpy(&jcr->VolumeName, vol->VolumeName); for (int i=0; i<5; i++) { - if (job_cancelled(jcr)) { - Mmsg0(&dev->errmsg, _("Job cancelled.\n")); + if (job_canceled(jcr)) { + Mmsg0(&dev->errmsg, _("Job canceled.\n")); goto get_out; /* error return */ } /* diff --git a/bacula/src/stored/append.c b/bacula/src/stored/append.c index 307b1becae..27650e7915 100644 --- a/bacula/src/stored/append.c +++ b/bacula/src/stored/append.c @@ -110,7 +110,7 @@ int do_append_data(JCR *jcr) */ jcr->VolFirstFile = 0; time(&jcr->run_time); /* start counting time for rates */ - for (last_file_index = 0; ok && !job_cancelled(jcr); ) { + for (last_file_index = 0; ok && !job_canceled(jcr); ) { char info[100]; /* Read Stream header from the File daemon. @@ -154,7 +154,7 @@ int do_append_data(JCR *jcr) /* Read data stream from the File daemon. * The data stream is just raw bytes */ - while ((n=bget_msg(ds)) > 0 && !job_cancelled(jcr)) { + while ((n=bget_msg(ds)) > 0 && !job_canceled(jcr)) { rec.VolSessionId = jcr->VolSessionId; rec.VolSessionTime = jcr->VolSessionTime; diff --git a/bacula/src/stored/askdir.c b/bacula/src/stored/askdir.c index e3a51fbc2d..971dc96975 100644 --- a/bacula/src/stored/askdir.c +++ b/bacula/src/stored/askdir.c @@ -269,8 +269,8 @@ int dir_ask_sysop_to_mount_next_volume(JCR *jcr, DEVICE *dev) ASSERT(dev->dev_blocked); wait_sec = min_wait; for ( ;; ) { - if (job_cancelled(jcr)) { - Mmsg(&dev->errmsg, _("Job %s cancelled while waiting for mount on Storage Device \"%s\".\n"), + if (job_canceled(jcr)) { + Mmsg(&dev->errmsg, _("Job %s canceled while waiting for mount on Storage Device \"%s\".\n"), jcr->Job, jcr->dev_name); Jmsg(jcr, M_FATAL, 0, "%s", dev->errmsg); return 0; @@ -318,7 +318,7 @@ Please use the \"label\" command to create a new Volume for:\n\ jcr->JobStatus = jstat; dir_send_job_status(jcr); - for ( ;!job_cancelled(jcr); ) { + for ( ;!job_canceled(jcr); ) { Dmsg1(190, "I'm going to sleep on device %s\n", dev->dev_name); stat = pthread_cond_timedwait(&dev->wait_next_vol, &dev->mutex, &timeout); if (dev->dev_blocked == BST_WAITING_FOR_SYSOP) { @@ -416,8 +416,8 @@ int dir_ask_sysop_to_mount_volume(JCR *jcr, DEVICE *dev) ASSERT(dev->dev_blocked); wait_sec = min_wait; for ( ;; ) { - if (job_cancelled(jcr)) { - Mmsg(&dev->errmsg, _("Job %s cancelled while waiting for mount on Storage Device \"%s\".\n"), + if (job_canceled(jcr)) { + Mmsg(&dev->errmsg, _("Job %s canceled while waiting for mount on Storage Device \"%s\".\n"), jcr->Job, jcr->dev_name); return 0; } @@ -440,7 +440,7 @@ int dir_ask_sysop_to_mount_volume(JCR *jcr, DEVICE *dev) jcr->JobStatus = JS_WaitMount; dir_send_job_status(jcr); - for ( ;!job_cancelled(jcr); ) { + for ( ;!job_canceled(jcr); ) { Dmsg1(190, "I'm going to sleep on device %s\n", dev->dev_name); stat = pthread_cond_timedwait(&dev->wait_next_vol, &dev->mutex, &timeout); if (dev->dev_blocked == BST_WAITING_FOR_SYSOP) { diff --git a/bacula/src/stored/btape.c b/bacula/src/stored/btape.c index d2ee892822..c3e961b445 100644 --- a/bacula/src/stored/btape.c +++ b/bacula/src/stored/btape.c @@ -1157,7 +1157,7 @@ This may take a long time. I.e. hours! ...\n\n"); */ jcr->VolFirstFile = 0; time(&jcr->run_time); /* start counting time for rates */ - for (file_index = 0; ok && !job_cancelled(jcr); ) { + for (file_index = 0; ok && !job_canceled(jcr); ) { uint64_t *lp; rec.VolSessionId = jcr->VolSessionId; rec.VolSessionTime = jcr->VolSessionTime; @@ -1223,7 +1223,7 @@ This may take a long time. I.e. hours! ...\n\n"); if (stop > 0) { Dmsg0(000, "Write_end_session_label()\n"); /* Create Job status for end of session label */ - if (!job_cancelled(jcr) && ok) { + if (!job_canceled(jcr) && ok) { set_jcr_job_status(jcr, JS_Terminated); } else if (!ok) { set_jcr_job_status(jcr, JS_ErrorTerminated); diff --git a/bacula/src/stored/mount.c b/bacula/src/stored/mount.c index a8b0e69828..39a6fbc907 100644 --- a/bacula/src/stored/mount.c +++ b/bacula/src/stored/mount.c @@ -56,8 +56,8 @@ mount_next_vol: dev_name(dev)); return 0; } - if (job_cancelled(jcr)) { - Jmsg(jcr, M_FATAL, 0, _("Job cancelled.\n")); + if (job_canceled(jcr)) { + Jmsg(jcr, M_FATAL, 0, _("Job canceled.\n")); return 0; } recycle = ask = autochanger = 0; diff --git a/bacula/src/stored/read.c b/bacula/src/stored/read.c index f48489ddfe..d59f5418f7 100644 --- a/bacula/src/stored/read.c +++ b/bacula/src/stored/read.c @@ -114,7 +114,7 @@ int do_read_data(JCR *jcr) * matched. */ for ( ;ok && !done; ) { - if (job_cancelled(jcr)) { + if (job_canceled(jcr)) { ok = FALSE; break; } diff --git a/bacula/src/stored/read_record.c b/bacula/src/stored/read_record.c index 7658784174..7e25a43ebe 100644 --- a/bacula/src/stored/read_record.c +++ b/bacula/src/stored/read_record.c @@ -50,7 +50,7 @@ int read_records(JCR *jcr, DEVICE *dev, block = new_block(dev); rec = new_record(); for ( ;ok && !done; ) { - if (job_cancelled(jcr)) { + if (job_canceled(jcr)) { ok = FALSE; break; } -- 2.39.5