]> git.sur5r.net Git - bacula/bacula/commitdiff
Update
authorKern Sibbald <kern@sibbald.com>
Wed, 26 Sep 2007 14:49:50 +0000 (14:49 +0000)
committerKern Sibbald <kern@sibbald.com>
Wed, 26 Sep 2007 14:49:50 +0000 (14:49 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@5655 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/dird/backup.c
bacula/src/dird/fd_cmds.c
bacula/src/dird/verify.c
bacula/src/filed/job.c
bacula/src/lib/btimers.c

index ba1bdfe00d76a4c7037340b1ba3ec551d3e8b5d1..8c7a3cef46981e498abe855c8042422366fcf203 100644 (file)
@@ -200,7 +200,7 @@ bool do_backup(JCR *jcr)
       }
    }
 
-   bnet_fsend(fd, storaddr, store->address, store->SDDport, tls_need);
+   fd->fsend(storaddr, store->address, store->SDDport, tls_need);
    if (!response(jcr, fd, OKstore, "Storage", DISPLAY_ERROR)) {
       goto bail_out;
    }
@@ -226,7 +226,7 @@ bool do_backup(JCR *jcr)
    }
 
    /* Send backup command */
-   bnet_fsend(fd, backupcmd);
+   fd->fsend(backupcmd);
    if (!response(jcr, fd, OKbackup, "backup", DISPLAY_ERROR)) {
       goto bail_out;
    }
@@ -293,7 +293,7 @@ int wait_for_job_termination(JCR *jcr)
       Jmsg(jcr, M_FATAL, 0, _("Network error with FD during %s: ERR=%s\n"),
           job_type_to_str(jcr->JobType), fd->bstrerror());
    }
-   bnet_sig(fd, BNET_TERMINATE);   /* tell Client we are terminating */
+   fd->signal(BNET_TERMINATE);   /* tell Client we are terminating */
 
    /* Force cancel in SD if failing */
    if (job_canceled(jcr) || !fd_ok) {
@@ -388,7 +388,7 @@ void backup_cleanup(JCR *jcr, int TermCode)
          term_msg = _("*** Backup Error ***");
          msg_type = M_ERROR;          /* Generate error message */
          if (jcr->store_bsock) {
-            bnet_sig(jcr->store_bsock, BNET_TERMINATE);
+            jcr->store_bsock->signal(BNET_TERMINATE);
             if (jcr->SD_msg_chan) {
                pthread_cancel(jcr->SD_msg_chan);
             }
@@ -397,7 +397,7 @@ void backup_cleanup(JCR *jcr, int TermCode)
       case JS_Canceled:
          term_msg = _("Backup Canceled");
          if (jcr->store_bsock) {
-            bnet_sig(jcr->store_bsock, BNET_TERMINATE);
+            jcr->store_bsock->signal(BNET_TERMINATE);
             if (jcr->SD_msg_chan) {
                pthread_cancel(jcr->SD_msg_chan);
             }
index 36824c0ddada6ccc32d11dbbf9d4a7a60edd2461..7272325f8d476d55ba58d3b0367bd01f29925f9e 100644 (file)
@@ -442,7 +442,7 @@ bool send_include_list(JCR *jcr)
 {
    BSOCK *fd = jcr->file_bsock;
    if (jcr->fileset->new_include) {
-      bnet_fsend(fd, filesetcmd, jcr->fileset->enable_vss ? " vss=1" : "");
+      fd->fsend(filesetcmd, jcr->fileset->enable_vss ? " vss=1" : "");
       return send_fileset(jcr);
    }
    return true;
@@ -484,11 +484,11 @@ bool send_bootstrap_file(JCR *jcr, BSOCK *sock)
       set_jcr_job_status(jcr, JS_ErrorTerminated);
       return false;
    }
-   bnet_fsend(sock, bootstrap);
+   sock->fsend(bootstrap);
    while (fgets(buf, sizeof(buf), bs)) {
-      bnet_fsend(sock, "%s", buf);
+      sock->fsend("%s", buf);
    }
-   bnet_sig(sock, BNET_EOD);
+   sock->signal(BNET_EOD);
    fclose(bs);
    if (jcr->unlink_bsr) {
       unlink(jcr->RestoreBootstrap);
@@ -550,11 +550,11 @@ int send_runscripts_commands(JCR *jcr)
                result = send_runscript_with_old_proto(jcr, cmd->when, msg);
 
             } else {
-               bnet_fsend(fd, runscript, cmd->on_success, 
-                                         cmd->on_failure,
-                                         cmd->fail_on_error,
-                                         cmd->when,
-                                         msg);
+               fd->fsend(runscript, cmd->on_success, 
+                                    cmd->on_failure,
+                                    cmd->fail_on_error,
+                                    cmd->when,
+                                    msg);
 
                result = response(jcr, fd, OKRunScript, "RunScript", DISPLAY_ERROR);
                launch_before_cmd = true;
@@ -575,7 +575,7 @@ int send_runscripts_commands(JCR *jcr)
 
    /* Tell the FD to execute the ClientRunBeforeJob */
    if (launch_before_cmd) {
-      bnet_fsend(fd, runbeforenow);
+      fd->fsend(runbeforenow);
       if (!response(jcr, fd, OKRunBeforeNow, "RunBeforeNow", DISPLAY_ERROR)) {
         goto bail_out;
       }
index 0981b104b7d62297922044bb4575e4813be19a8e..8562add9dbac565703d48c362e3699f8f9042c2d 100644 (file)
@@ -193,7 +193,7 @@ bool do_verify(JCR *jcr)
       if (!start_storage_daemon_job(jcr, jcr->rstorage, NULL)) {
          return false;
       }
-      if (!bnet_fsend(jcr->store_bsock, "run")) {
+      if (!jcr->store_bsock->fsend("run")) {
          return false;
       }
       /*
index 561297044b7fe73d9257a9f5079106fb28f549d9..d2f5097102cebd50951f933b29f917c71c0bd66e 100644 (file)
@@ -1316,7 +1316,7 @@ static int storage_cmd(JCR *jcr)
 
    jcr->store_bsock = sd;
 
-   bnet_fsend(sd, "Hello Start Job %s\n", jcr->Job);
+   sd->fsend("Hello Start Job %s\n", jcr->Job);
    if (!authenticate_storagedaemon(jcr)) {
       Jmsg(jcr, M_FATAL, 0, _("Failed to authenticate Storage daemon.\n"));
       return 0;
@@ -1324,7 +1324,7 @@ static int storage_cmd(JCR *jcr)
    Dmsg0(110, "Authenticated with SD.\n");
 
    /* Send OK to Director */
-   return bnet_fsend(dir, OKstore);
+   return dir->fsend(OKstore);
 }
 
 
index 4c44922f38234ee3feb42573595df4a83e70f5c5..28aba10bfd93900226509b2d8c7e181cfc4813e5 100644 (file)
@@ -231,8 +231,9 @@ static void callback_thread_timer(watchdog_t *self)
    if (wid->type == TYPE_BSOCK && wid->bsock) {
       wid->bsock->set_timed_out();
    }
+   Jmsg(wid->jcr, M_INFO, 0, _("Thread timer expired. Thread for JobId=%u interrupted.\n"),
+        get_jobid_from_tid(wid->tid));
    pthread_kill(wid->tid, TIMEOUT_SIGNAL);
-   Jmsg(wid->jcr, M_INFO, 0, _("Thread timer expired. Thread interrupted.\n"));
 }
 
 static btimer_t *btimer_start_common(uint32_t wait)