]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/ua_server.c
kes Print the Volume purged message only for real jobs to keep
[bacula/bacula] / bacula / src / dird / ua_server.c
index bc6bf2af6ee879ded6182a3b7eb47fa30e5e1267..689b2056f76c6ae0256074cf65aba1a6ad800802 100644 (file)
@@ -7,11 +7,11 @@
  *    Version $Id$
  */
 /*
  *    Version $Id$
  */
 /*
-   Copyright (C) 2000-2005 Kern Sibbald
+   Copyright (C) 2000-2006 Kern Sibbald
 
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License
 
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License
-   version 2 as ammended with additional clauses defined in the
+   version 2 as amended with additional clauses defined in the
    file LICENSE in the main source directory.
 
    This program is distributed in the hope that it will be useful,
    file LICENSE in the main source directory.
 
    This program is distributed in the hope that it will be useful,
@@ -28,8 +28,6 @@
 extern int r_first;
 extern int r_last;
 extern struct s_res resources[];
 extern int r_first;
 extern int r_last;
 extern struct s_res resources[];
-extern int console_msg_pending;
-extern char my_name[];
 
 
 /* Forward referenced functions */
 
 
 /* Forward referenced functions */
@@ -96,7 +94,7 @@ JCR *new_control_jcr(const char *base_name, int job_type)
    jcr->sched_time = jcr->start_time;
    jcr->JobType = job_type;
    jcr->JobLevel = L_NONE;
    jcr->sched_time = jcr->start_time;
    jcr->JobType = job_type;
    jcr->JobLevel = L_NONE;
-   jcr->JobStatus = JS_Running;
+   set_jcr_job_status(jcr, JS_Running);
    jcr->JobId = 0;
    return jcr;
 }
    jcr->JobId = 0;
    return jcr;
 }
@@ -138,7 +136,7 @@ static void *handle_UA_client_request(void *arg)
                pm_strcpy(ua->cmd, "messages");
                qmessagescmd(ua, ua->cmd);
                ua->user_notified_msg_pending = FALSE;
                pm_strcpy(ua->cmd, "messages");
                qmessagescmd(ua, ua->cmd);
                ua->user_notified_msg_pending = FALSE;
-            } else if (!ua->user_notified_msg_pending && console_msg_pending) {
+            } else if (!ua->gui && !ua->user_notified_msg_pending && console_msg_pending) {
                bsendmsg(ua, _("You have messages.\n"));
                ua->user_notified_msg_pending = TRUE;
             }
                bsendmsg(ua, _("You have messages.\n"));
                ua->user_notified_msg_pending = TRUE;
             }
@@ -176,8 +174,8 @@ UAContext *new_ua_context(JCR *jcr)
    ua->db = jcr->db;
    ua->cmd = get_pool_memory(PM_FNAME);
    ua->args = get_pool_memory(PM_FNAME);
    ua->db = jcr->db;
    ua->cmd = get_pool_memory(PM_FNAME);
    ua->args = get_pool_memory(PM_FNAME);
-   ua->verbose = 1;
-   ua->automount = TRUE;
+   ua->verbose = true;
+   ua->automount = true;
    return ua;
 }
 
    return ua;
 }