2 ===================================================================
3 --- src/filed/job.c (revision 5235)
4 +++ src/filed/job.c (working copy)
6 bnet_sig(jcr->store_bsock, BNET_TERMINATE);
9 - /* Run the after job */
10 - run_scripts(jcr, jcr->RunScripts, "ClientAfterJob");
12 generate_daemon_event(jcr, "JobEnd");
14 dequeue_messages(jcr); /* send any queued messages */
15 @@ -1321,7 +1318,25 @@
16 return bnet_fsend(dir, OKstore);
19 +static void job_end(JCR *jcr)
21 + char ed1[50], ed2[50];
23 + /* Inform Storage daemon that we are done */
24 + if (jcr->store_bsock) {
25 + bnet_sig(jcr->store_bsock, BNET_TERMINATE);
28 + /* Run the after job */
29 + run_scripts(jcr, jcr->RunScripts, "ClientAfterJob");
31 + bnet_fsend(jcr->dir_bsock, EndJob, jcr->JobStatus, jcr->JobFiles,
32 + edit_uint64(jcr->ReadBytes, ed1),
33 + edit_uint64(jcr->JobBytes, ed2), jcr->Errors, (int)jcr->VSS,
35 + Dmsg1(110, "End FD msg: %s\n", jcr->dir_bsock->msg);
41 @@ -1331,15 +1346,13 @@
42 BSOCK *sd = jcr->store_bsock;
45 - char ed1[50], ed2[50];
46 - bool bDoVSS = false;
48 #if defined(WIN32_VSS)
49 // capture state here, if client is backed up by multiple directors
50 // and one enables vss and the other does not then enable_vss can change
51 // between here and where its evaluated after the job completes.
52 - bDoVSS = g_pVSSClient && enable_vss;
54 + jcr->VSS = g_pVSSClient && enable_vss;
56 /* Run only one at a time */
61 #if defined(WIN32_VSS)
62 /* START VSS ON WIN 32 */
65 if (g_pVSSClient->InitializeForBackup()) {
66 /* tell vss which drives to snapshot */
67 char szWinDriveLetters[27];
69 #if defined(WIN32_VSS)
70 /* STOP VSS ON WIN 32 */
71 /* tell vss to close the backup session */
74 if (g_pVSSClient->CloseBackup()) {
75 /* inform user about writer states */
76 for (int i=0; i<(int)g_pVSSClient->GetWriterCount(); i++) {
77 @@ -1504,12 +1517,8 @@
81 - bnet_fsend(dir, EndJob, jcr->JobStatus, jcr->JobFiles,
82 - edit_uint64(jcr->ReadBytes, ed1),
83 - edit_uint64(jcr->JobBytes, ed2), jcr->Errors, (int)bDoVSS,
85 - Dmsg1(110, "End FD msg: %s\n", dir->msg);
89 return 0; /* return and stop command loop */
92 @@ -1585,12 +1594,7 @@
94 bnet_sig(dir, BNET_EOD);
96 - /* Send termination status back to Dir */
97 - bnet_fsend(dir, EndJob, jcr->JobStatus, jcr->JobFiles,
98 - edit_uint64(jcr->ReadBytes, ed1),
99 - edit_uint64(jcr->JobBytes, ed2), jcr->Errors, 0,
101 - Dmsg1(110, "End FD msg: %s\n", dir->msg);
104 /* Inform Director that we are done */
105 bnet_sig(dir, BNET_TERMINATE);
106 @@ -1696,13 +1700,9 @@
108 set_jcr_job_status(jcr, JS_ErrorTerminated);
110 - /* Send termination status back to Dir */
111 - bnet_fsend(dir, EndJob, jcr->JobStatus, jcr->JobFiles,
112 - edit_uint64(jcr->ReadBytes, ed1),
113 - edit_uint64(jcr->JobBytes, ed2), jcr->Errors, 0,
115 - Dmsg1(110, "End FD msg: %s\n", dir->msg);
119 /* Inform Director that we are done */
120 bnet_sig(dir, BNET_TERMINATE);
123 ===================================================================
124 --- src/jcr.h (revision 5235)
125 +++ src/jcr.h (working copy)
127 int32_t pki_session_encoded_size; /* Size of DER-encoded pki_session */
128 POOLMEM *crypto_buf; /* Encryption/Decryption buffer */
129 DIRRES* director; /* Director resource */
130 + bool VSS; /* VSS used by FD */
131 #endif /* FILE_DAEMON */