        if (g_pVSSClient->InitializeForBackup()) {   
          /* tell vss which drives to snapshot */   
          char szWinDriveLetters[27];   
-@@ -1488,7 +1501,7 @@
+@@ -1488,7 +1496,7 @@
  #if defined(WIN32_VSS)
     /* STOP VSS ON WIN 32 */
     /* tell vss to close the backup session */

Index: src/filed/job.c
===================================================================
--- src/filed/job.c	(revision 5235)
+++ src/filed/job.c	(working copy)
@@ -266,9 +266,6 @@
       bnet_sig(jcr->store_bsock, BNET_TERMINATE);
    }
 
-   /* Run the after job */
-   run_scripts(jcr, jcr->RunScripts, "ClientAfterJob");
-
    generate_daemon_event(jcr, "JobEnd");
 
    dequeue_messages(jcr);             /* send any queued messages */
@@ -1321,7 +1318,25 @@
    return bnet_fsend(dir, OKstore);
 }
 
+static void job_end(JCR *jcr)
+{   
+   char ed1[50], ed2[50];
 
+   /* Inform Storage daemon that we are done */
+   if (jcr->store_bsock) {
+      bnet_sig(jcr->store_bsock, BNET_TERMINATE);
+   }
+
+   /* Run the after job */
+   run_scripts(jcr, jcr->RunScripts, "ClientAfterJob");
+
+   bnet_fsend(jcr->dir_bsock, EndJob, jcr->JobStatus, jcr->JobFiles,
+	      edit_uint64(jcr->ReadBytes, ed1),
+	      edit_uint64(jcr->JobBytes, ed2), jcr->Errors, (int)jcr->VSS, 
+	      jcr->pki_encrypt);
+   Dmsg1(110, "End FD msg: %s\n", jcr->dir_bsock->msg);
+}
+
 /*
  * Do a backup.
  */
@@ -1331,15 +1346,13 @@
    BSOCK *sd = jcr->store_bsock;
    int ok = 0;
    int SDJobStatus;

-      jcr->pki_encrypt);
-   Dmsg1(110, "End FD msg: %s\n", dir->msg);
-   
    return 0;                          /* return and stop command loop */
 }
 
@@ -1521,7 +1523,7 @@
 {
    BSOCK *dir = jcr->dir_bsock;
    BSOCK *sd  = jcr->store_bsock;
-   char level[100], ed1[50], ed2[50];
+   char level[100];
 
    jcr->JobType = JT_VERIFY;
    if (sscanf(dir->msg, verifycmd, level) != 1) {
@@ -1585,15 +1587,6 @@
 
    bnet_sig(dir, BNET_EOD);
 
