]> git.sur5r.net Git - bacula/bacula/commitdiff
- Modify the depend section of each Makefile.in to reference
authorKern Sibbald <kern@sibbald.com>
Fri, 24 Sep 2004 12:30:34 +0000 (12:30 +0000)
committerKern Sibbald <kern@sibbald.com>
Fri, 24 Sep 2004 12:30:34 +0000 (12:30 +0000)
  instead of  -- bug 118
- Remove the word restore from the Volumes needed message in
  dird/bsr.c since the message is used for Restore and Verify.
- Fix initialization and copying of the storage resource when
  starting jobs (and in jobq.c when restarting). In some cases
  jcr->store was not set causing a segfault -- bug 116

git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1612 91ce42f0-d328-0410-95d8-f526ca767f89

15 files changed:
bacula/src/cats/Makefile.in
bacula/src/console/Makefile.in
bacula/src/dird/Makefile.in
bacula/src/dird/bsr.c
bacula/src/dird/job.c
bacula/src/dird/jobq.c
bacula/src/dird/protos.h
bacula/src/dird/verify.c
bacula/src/filed/Makefile.in
bacula/src/findlib/Makefile.in
bacula/src/gnome2-console/Makefile.in
bacula/src/stored/Makefile.in
bacula/src/tools/Makefile.in
bacula/src/tray-monitor/Makefile.in
bacula/src/wx-console/Makefile.in

index 0ef1320723c932fea335132fa1adb33ebf8a9572..1301e8c94c93d15c6ba624af7087cbd6e7593425 100644 (file)
@@ -64,20 +64,20 @@ clean:
 realclean: clean
        $(RMF) tags
 
-       $(RMF) create_bacula_database      update_bacula_tables     make_bacula_tables
-       $(RMF) grant_bacula_privileges     drop_bacula_tables       drop_bacula_database
+       $(RMF) create_bacula_database      update_bacula_tables     make_bacula_tables
+       $(RMF) grant_bacula_privileges     drop_bacula_tables       drop_bacula_database
 
-       $(RMF) create_bdb_database         update_bdb_tables        make_bdb_tables
-       $(RMF) grant_bdb_privileges        drop_bdb_tables          drop_bdb_database
+       $(RMF) create_bdb_database         update_bdb_tables        make_bdb_tables
+       $(RMF) grant_bdb_privileges        drop_bdb_tables          drop_bdb_database
 
-       $(RMF) create_mysql_database       update_mysql_tables      make_mysql_tables
-       $(RMF) grant_mysql_privileges      drop_mysql_tables        drop_mysql_database
+       $(RMF) create_mysql_database       update_mysql_tables      make_mysql_tables
+       $(RMF) grant_mysql_privileges      drop_mysql_tables        drop_mysql_database
 
        $(RMF) create_postgresql_database  update_postgresql_tables make_postgresql_tables
        $(RMF) grant_postgresql_privileges drop_postgresql_tables   drop_postgresql_database
 
-       $(RMF) create_sqlite_database      update_sqlite_tables     make_sqlite_tables
-       $(RMF) grant_sqlite_privileges     drop_sqlite_tables       drop_sqlite_database
+       $(RMF) create_sqlite_database      update_sqlite_tables     make_sqlite_tables
+       $(RMF) grant_sqlite_privileges     drop_sqlite_tables       drop_sqlite_database
 
        $(RMF) mysql sqlite
        $(RMF) make_catalog_backup delete_catalog_backup
@@ -136,7 +136,7 @@ depend:
        @$(MV) Makefile Makefile.bak
        @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
        @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
-       @$(CC) -S -M $(CPPFLAGS) $(XINC) -I$(srcdir) -I$(basedir) $(SQL_INC) *.c >> Makefile
+       @$(CXX) -S -M $(CPPFLAGS) $(XINC) -I$(srcdir) -I$(basedir) $(SQL_INC) *.c >> Makefile
        @if test -f Makefile ; then \
            $(RMF) Makefile.bak; \
        else \
index e3b44e6f3c7dc22f6624d7fc36efb87d6019ad0c..838e0a8b83d5c823d7b4046ea313490e2b228d49 100644 (file)
@@ -114,7 +114,7 @@ depend:
        @$(MV) Makefile Makefile.bak
        @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
        @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
-       @$(CC) -S -M $(CPPFLAGS) $(CONS_INC) -I$(srcdir) -I$(basedir) *.c >> Makefile
+       @$(CXX) -S -M $(CPPFLAGS) $(CONS_INC) -I$(srcdir) -I$(basedir) *.c >> Makefile
        @if test -f Makefile ; then \
            $(RMF) Makefile.bak; \
        else \
index 704d1c2f777b638a9b5b76bbb5dfd80319dd9019..cd24084c5069c6a5a04fa82d5a342ebb46889a6b 100644 (file)
@@ -132,7 +132,7 @@ depend:
        @$(MV) Makefile Makefile.bak
        @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
        @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
-       @$(CC) -S -M $(CPPFLAGS) $(XINC) -I$(srcdir) -I$(basedir) $(SQL_INC) *.c >> Makefile
+       @$(CXX) -S -M $(CPPFLAGS) $(XINC) -I$(srcdir) -I$(basedir) $(SQL_INC) *.c >> Makefile
        @if test -f Makefile ; then \
            $(RMF) Makefile.bak; \
        else \
index 664bf4fe8b4468b25f568c0e361afa73c865d666..a9c582c41d7c6662ed528ab131bd032f7882e161 100644 (file)
@@ -200,7 +200,7 @@ int write_bsr_file(UAContext *ua, RBSR *bsr)
 
    /* Tell the user what he will need to mount */
    bsendmsg(ua, "\n");
-   bsendmsg(ua, _("The restore job will require the following Volumes:\n"));
+   bsendmsg(ua, _("The job will require the following Volumes:\n"));
    /* Create Unique list of Volumes using prompt list */
    start_prompt(ua, "");
    for (RBSR *nbsr=bsr; nbsr; nbsr=nbsr->next) {
index 33935436d76bae0f8c2b6c9eed44c2299fc2f7e9..05bd0dcd5dd8b8be03c1148504d01a7aa76c4667 100644 (file)
@@ -747,6 +747,9 @@ void set_jcr_defaults(JCR *jcr, JOB *job)
    for (int i=0; i<MAX_STORE; i++) {
       jcr->storage[i] = job->storage[i];
    }
+   if (jcr->storage[0]) {
+      jcr->store = (STORE *)jcr->storage[0]->first();
+   }
    jcr->client = job->client;
    if (!jcr->client_name) {
       jcr->client_name = get_pool_memory(PM_NAME);
@@ -786,3 +789,24 @@ void set_jcr_defaults(JCR *jcr, JOB *job)
       }
    }
 }
+
+/* 
+ * copy the storage definitions from an old JCR to a new one
+ */
+void copy_storage(JCR *new_jcr, JCR *old_jcr)  
+{
+   for (int i=0; i < MAX_STORE; i++) {
+      if (old_jcr->storage[i]) {
+        STORE *st;
+        new_jcr->storage[i] = New(alist(10, not_owned_by_alist));
+        foreach_alist(st, old_jcr->storage[i]) {
+           new_jcr->storage[i]->append(st);
+        }
+      }
+      if (old_jcr->store) {
+        new_jcr->store = old_jcr->store;
+      } else if (new_jcr->storage[0]) {
+        new_jcr->store = (STORE *)new_jcr->storage[0]->first();
+      }
+   }
+}
index 35438cfcf7b3d940954ba5f400c9ba5dee20d47a..12e2c434c190b562aceded4f769ae6d34d513f29 100755 (executable)
@@ -500,8 +500,7 @@ void *jobq_server(void *arg)
            njcr->reschedule_count = jcr->reschedule_count;
            njcr->JobLevel = jcr->JobLevel;
            njcr->JobStatus = jcr->JobStatus;
-           njcr->pool = jcr->pool;
-           njcr->store = jcr->store;
+           copy_storage(njcr, jcr);
            njcr->messages = jcr->messages;
             Dmsg0(300, "Call to run new job\n");
            V(jq->mutex);
index f021ea54cb7fe5d169a08c8d739242008060dbcc..203596c1c647cbdb83c3e23ba718e4898ab21f7a 100644 (file)
@@ -90,6 +90,7 @@ extern bool get_or_create_fileset_record(JCR *jcr, FILESET_DBR *fsr);
 extern JobId_t run_job(JCR *jcr);
 extern int cancel_job(UAContext *ua, JCR *jcr);
 extern void init_jcr_job_record(JCR *jcr);
+extern void copy_storage(JCR *new_jcr, JCR *old_jcr);
 
 /* mountreq.c */
 extern void mount_request(JCR *jcr, BSOCK *bs, char *buf);
index efa2f7ea01473904d2c51d725f1021089446edd6..6843f5f2891bf5e943afc25a374ce38ec664564b 100644 (file)
@@ -59,10 +59,10 @@ static int missing_handler(void *ctx, int num_fields, char **row);
 /* 
  * Do a verification of the specified files against the Catlaog
  *    
- *  Returns:  0 on failure
- *           1 on success
+ *  Returns:  false on failure
+ *           true  on success
  */
-int do_verify(JCR *jcr) 
+bool do_verify(JCR *jcr) 
 {
    const char *level, *Name;
    BSOCK   *fd;
@@ -345,11 +345,11 @@ int do_verify(JCR *jcr)
 
    stat = wait_for_job_termination(jcr);
    verify_cleanup(jcr, stat);
-   return 1;
+   return true;
 
 bail_out:
    verify_cleanup(jcr, JS_ErrorTerminated);
-   return 0;
+   return false;
 }
 
 /*
index ea8260bd68c8b65251e89bc2e1ed56c939c33861..3909c4a7846169999eef9adfbf4094fb8ea6c989 100755 (executable)
@@ -141,7 +141,7 @@ depend:
        @$(MV) Makefile Makefile.bak
        @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
        @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
-       @$(CC) -S -M $(CPPFLAGS) $(XINC) -I$(srcdir) -I$(basedir) $(SQL_INC) *.c >> Makefile
+       @$(CXX) -S -M $(CPPFLAGS) $(XINC) -I$(srcdir) -I$(basedir) $(SQL_INC) *.c >> Makefile
        @if test -f Makefile ; then \
            $(RMF) Makefile.bak; \
        else \
index 409a71474df6e2132a3fec5a4886f1bb4da3eb3f..7d2c71b5d1fd7e0aaaf4db815c7efae209e56884 100644 (file)
@@ -81,7 +81,7 @@ depend:
        @$(MV) Makefile Makefile.bak
        @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
        @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
-       @$(CC) -S -M $(CPPFLAGS) $(XINC) -I$(srcdir) -I$(basedir) $(SQL_INC) *.c >> Makefile
+       @$(CXX) -S -M $(CPPFLAGS) $(XINC) -I$(srcdir) -I$(basedir) $(SQL_INC) *.c >> Makefile
        @if test -f Makefile ; then \
            $(RMF) Makefile.bak; \
        else \
index 07dc409607171df6016c876dfe883c30fb6b0391..14bd4f762bace04505c7a4199e06d8c845bae385 100644 (file)
@@ -122,7 +122,7 @@ depend:
        @$(MV) Makefile Makefile.bak
        @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
        @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
-       @$(CC) -S -M $(CPPFLAGS) $(XINC) -I$(srcdir) -I$(basedir) $(GNOME_INCLUDEDIR) $(SQL_INC) *.c >> Makefile
+       @$(CXX) -S -M $(CPPFLAGS) $(XINC) -I$(srcdir) -I$(basedir) $(GNOME_INCLUDEDIR) $(SQL_INC) *.c >> Makefile
        @if test -f Makefile ; then \
            $(RMF) Makefile.bak; \
        else \
index de69c1cdcc5ecb168e0aef455d80d86450599e43..cccbc58ce906f2fc0d4524ac28480c62c7a15cde 100644 (file)
@@ -178,7 +178,7 @@ depend:
        @$(MV) Makefile Makefile.bak
        @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
        @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
-       @$(CC) -S -M $(CPPFLAGS) $(XINC) -I$(srcdir) -I$(basedir) $(SQL_INC) *.c >> Makefile
+       @$(CXX) -S -M $(CPPFLAGS) $(XINC) -I$(srcdir) -I$(basedir) $(SQL_INC) *.c >> Makefile
        @if test -f Makefile ; then \
            $(RMF) Makefile.bak; \
        else \
index 41bebb8eca354a2d9c083ba799a39967991c26ff..64dffb6b6c42717669049d52f8034344b930fc03 100644 (file)
@@ -96,7 +96,7 @@ depend:
        @$(MV) Makefile Makefile.bak
        @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
        @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
-       @$(CC) -S -M $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(SQL_INC) *.c >> Makefile
+       @$(CXX) -S -M $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(SQL_INC) *.c >> Makefile
        @if test -f Makefile ; then \
            $(RMF) Makefile.bak; \
        else \
index 5d820f2e11894065ab8c82c583cd533225e80316..04e05108a4bb3eb5a3bdb0dbc73f80bfbc81513c 100644 (file)
@@ -91,7 +91,7 @@ depend:
        @$(MV) Makefile Makefile.bak
        @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
        @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
-       @$(CC) -S -M $(CPPFLAGS) $(MONITOR_CPPFLAGS) -I$(srcdir) -I$(basedir) *.c >> Makefile
+       @$(CXX) -S -M $(CPPFLAGS) $(MONITOR_CPPFLAGS) -I$(srcdir) -I$(basedir) *.c >> Makefile
        @if test -f Makefile ; then \
            $(RMF) Makefile.bak; \
        else \
index 0457717cbac1845818f841ce19b1ccbeb301e607..0cdd6121937071b79bd73886963f0ea741f55635 100644 (file)
@@ -69,7 +69,7 @@ all: Makefile wx-console $(MACOSXAPP)
 # See http://216.239.59.104/search?q=cache:a61SGKgoHSQJ:wiki.wxwidgets.org/wiki.pl%3FWxMac_Issues+wxmac+%22application+bundle%22&hl=fr
 
 wx-console.app: wx-console
-       -mkdir wx-console.app    
+       -mkdir wx-console.app    
        -mkdir wx-console.app/Contents
        -mkdir wx-console.app/Contents/MacOS
        -mkdir wx-console.app/Contents/Resources
@@ -123,7 +123,7 @@ depend:
        @$(MV) Makefile Makefile.bak
        @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
        @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
-       @$(CC) -S -M $(CPPFLAGS) $(CONS_CPPFLAGS) -I$(srcdir) -I$(basedir) $(CONSSRCS) >> Makefile
+       @$(CXX) -S -M $(CPPFLAGS) $(CONS_CPPFLAGS) -I$(srcdir) -I$(basedir) $(CONSSRCS) >> Makefile
        @if test -f Makefile ; then \
            $(RMF) Makefile.bak; \
        else \