]> git.sur5r.net Git - bacula/bacula/commitdiff
kes Add Slot if it is non-zero to writing bsr file after a
authorKern Sibbald <kern@sibbald.com>
Wed, 3 Sep 2008 19:13:35 +0000 (19:13 +0000)
committerKern Sibbald <kern@sibbald.com>
Wed, 3 Sep 2008 19:13:35 +0000 (19:13 +0000)
     backup.
kes  Change a number of bnet_fsend() into class method calls.
kes  Begin audit of 2.4 branch to trunk code changes

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

bacula/src/dird/backup.c
bacula/src/dird/job.c
bacula/src/filed/job.c
bacula/src/version.h
bacula/technotes-2.5

index ae3ee7e88ee4370edfb0517664ad2d84d33fa073..5219780c41229031149ffbf9353ed19087e5515d 100644 (file)
@@ -651,6 +651,9 @@ void update_bootstrap_file(JCR *jcr)
             /* Write the record */
             fprintf(fd, "Volume=\"%s\"\n", VolParams[i].VolumeName);
             fprintf(fd, "MediaType=\"%s\"\n", VolParams[i].MediaType);
+            if (VolParams[i].Slot > 0) {
+               fprintf(fd, "Slot=%d\n", VolParams[i].Slot);
+            }
             fprintf(fd, "VolSessionId=%u\n", jcr->VolSessionId);
             fprintf(fd, "VolSessionTime=%u\n", jcr->VolSessionTime);
             fprintf(fd, "VolFile=%u-%u\n", VolParams[i].StartFile,
index 74ec03e80c1a5d87be6dfc142d92bf5dbf143878..e34eb335ec6499d9924c27cf429a363a2c0ebd66 100644 (file)
@@ -399,12 +399,12 @@ bool cancel_job(UAContext *ua, JCR *jcr)
          }
          Dmsg0(200, "Connected to file daemon\n");
          fd = ua->jcr->file_bsock;
-         bnet_fsend(fd, "cancel Job=%s\n", jcr->Job);
-         while (bnet_recv(fd) >= 0) {
+         fd->fsend("cancel Job=%s\n", jcr->Job);
+         while (fd->recv() >= 0) {
             ua->send_msg("%s", fd->msg);
          }
-         bnet_sig(fd, BNET_TERMINATE);
-         bnet_close(fd);
+         fd->signal(BNET_TERMINATE);
+         fd->close();
          ua->jcr->file_bsock = NULL;
       }
 
index 5025a9a32a3a5d0b328d67ad57bd68f388a3867a..b685a971d4dfab67be9f145005cfaa301a3ba5d0 100644 (file)
@@ -229,7 +229,7 @@ void *handle_client_request(void *dirp)
    for (quit=false; !quit;) {
 
       /* Read command */
-      if (bnet_recv(dir) < 0) {
+      if (dir->recv() < 0) {
          break;               /* connection terminated */
       }
       dir->msg[dir->msglen] = 0;
@@ -239,14 +239,14 @@ void *handle_client_request(void *dirp)
          if (strncmp(cmds[i].cmd, dir->msg, strlen(cmds[i].cmd)) == 0) {
             found = true;         /* indicate command found */
             if (!jcr->authenticated && cmds[i].func != hello_cmd) {
-               bnet_fsend(dir, no_auth);
-               bnet_sig(dir, BNET_EOD);
+               dir->fsend(no_auth);
+               dir->signal(BNET_EOD);
                break;
             }
             if ((jcr->authenticated) && (!cmds[i].monitoraccess) && (jcr->director->monitor)) {
                Dmsg1(100, "Command \"%s\" is invalid.\n", cmds[i].cmd);
-               bnet_fsend(dir, invalid_cmd);
-               bnet_sig(dir, BNET_EOD);
+               dir->fsend(invalid_cmd);
+               dir->signal(BNET_EOD);
                break;
             }
             Dmsg1(100, "Executing %s command.\n", cmds[i].cmd);
@@ -258,7 +258,7 @@ void *handle_client_request(void *dirp)
          }
       }
       if (!found) {              /* command not found */
-         bnet_fsend(dir, errmsg);
+         dir->fsend(errmsg);
          quit = true;
          break;
       }
@@ -266,7 +266,7 @@ void *handle_client_request(void *dirp)
 
    /* Inform Storage daemon that we are done */
    if (jcr->store_bsock) {
-      bnet_sig(jcr->store_bsock, BNET_TERMINATE);
+      jcr->store_bsock->signal(BNET_TERMINATE);
    }
 
    /* Run the after job */
@@ -275,7 +275,7 @@ void *handle_client_request(void *dirp)
    if (jcr->JobId) {            /* send EndJob if running a job */
       char ed1[50], ed2[50];
       /* Send termination status back to Dir */
-      bnet_fsend(dir, EndJob, jcr->JobStatus, jcr->JobFiles,
+      dir->fsend(EndJob, jcr->JobStatus, jcr->JobFiles,
                  edit_uint64(jcr->ReadBytes, ed1),
                  edit_uint64(jcr->JobBytes, ed2), jcr->Errors, jcr->VSS,
                  jcr->crypto.pki_encrypt);
@@ -1348,7 +1348,7 @@ static int session_cmd(JCR *jcr)
       return 0;
    }
 
-   return bnet_fsend(dir, OKsession);
+   return dir->fsend(OKsession);
 }
 
 /*
@@ -1778,7 +1778,7 @@ static int open_sd_read_session(JCR *jcr)
    /*
     * Open Read Session with Storage daemon
     */
-   bnet_fsend(sd, read_open, "DummyVolume",
+   sd->fsend(read_open, "DummyVolume",
       jcr->VolSessionId, jcr->VolSessionTime, jcr->StartFile, jcr->EndFile,
       jcr->StartBlock, jcr->EndBlock);
    Dmsg1(110, ">stored: %s", sd->msg);
@@ -1805,7 +1805,7 @@ static int open_sd_read_session(JCR *jcr)
    /*
     * Start read of data with Storage daemon
     */
-   bnet_fsend(sd, read_data, jcr->Ticket);
+   sd->fsend(read_data, jcr->Ticket);
    Dmsg1(110, ">stored: %s", sd->msg);
 
    /*
@@ -1824,7 +1824,7 @@ static int open_sd_read_session(JCR *jcr)
 static void filed_free_jcr(JCR *jcr)
 {
    if (jcr->store_bsock) {
-      bnet_close(jcr->store_bsock);
+      jcr->store_bsock->close();
    }
    free_bootstrap(jcr);
    if (jcr->last_fname) {
@@ -1891,12 +1891,12 @@ static int send_bootstrap_file(JCR *jcr)
       goto bail_out;
    }
    sd->msglen = pm_strcpy(sd->msg, bootstrap);
-   bnet_send(sd);
+   sd->send();
    while (fgets(buf, sizeof(buf), bs)) {
       sd->msglen = Mmsg(sd->msg, "%s", buf);
-      bnet_send(sd);
+      sd->send();
    }
-   bnet_sig(sd, BNET_EOD);
+   sd->signal(BNET_EOD);
    fclose(bs);
    if (!response(jcr, sd, OKSDbootstrap, "Bootstrap")) {
       set_jcr_job_status(jcr, JS_ErrorTerminated);
index 8171ec097f4b7299a70d18eec7b2b23db68a3ab4..0153028c76f4ae9cdf92e3b5a52b6af280148935 100644 (file)
@@ -4,8 +4,8 @@
 
 #undef  VERSION
 #define VERSION "2.5.3"
-#define BDATE   "30 Aug 2008"
-#define LSMDATE "30Aug08"
+#define BDATE   "03 September 2008"
+#define LSMDATE "3Sep08"
 
 #define PROG_COPYRIGHT "Copyright (C) %d-2008 Free Software Foundation Europe e.V.\n"
 #define BYEAR "2008"       /* year for copyright messages in progs */
index 4accf9d0d31581aad6ad1279c42da21d5ffce6e2..9be8a02c8dc6783370cc439e5bda2f916adce9ec 100644 (file)
@@ -30,10 +30,42 @@ Add long term statistics job table
 *vtape driver
 *Ignore Dir
 separator in console (!$%&'()*+,-/:;<>?[]^`{|}~)
-Copy jobs
+*Copy jobs
+examples/database/dbcheck.sql
+dbi database driver
+  --enable-libdb
+  dbdriver in bacula-dir.conf
+--with-db-port
+support for Ubuntu
+status_slots???
+spoolSize by Job???
+recyclepool in dird/ua_select.co???
+enhancement to wait command: wait mount  ...
+parse config
+plugindirectory
+dbport
+dbdriver
+maxrunschedtime???
+fullmaxwaittime???
+incrementalmaxwaittime???
+differentialmaxwaittime???
+fullmaxruntime???
+differentialmaxruntime???
+incrementalmaxruntime???
+optimizejobscheduling???
+spoolsize???
+usestatistics???
+pluginoptions
+plugin
 
+remove reader/writer in FOPTS????
 
 General:
+03Sep08
+kes  Add Slot if it is non-zero to writing bsr file after a
+     backup.
+kes  Change a number of bnet_fsend() into class method calls.
+kes  Begin audit of diff of 2.4 branch to trunk code.
 01Sep08
 ebl  Fix the mysql creation script that double-created an 
      index of the same field on the Media table.