]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/ua_server.c
kes Implement bsr block level checking for disk files. However,
[bacula/bacula] / bacula / src / dird / ua_server.c
index bc9c54e9efba4c9c318a39176e5406e7b6e5d577..34c4b89c6193c5db92f4579cbe968ac998778a02 100644 (file)
@@ -7,8 +7,8 @@
    many others, a complete list can be found in the file AUTHORS.
    This program is Free Software; you can redistribute it and/or
    modify it under the terms of version two of the GNU General Public
-   License as published by the Free Software Foundation plus additions
-   that are listed in the file LICENSE.
+   License as published by the Free Software Foundation and included
+   in the file LICENSE.
 
    This program is distributed in the hope that it will be useful, but
    WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -20,7 +20,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   Bacula® is a registered trademark of John Walker.
+   Bacula® is a registered trademark of Kern Sibbald.
    The licensor of Bacula is the Free Software Foundation Europe
    (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
    Switzerland, email:ftf@fsfeurope.org.
@@ -38,9 +38,6 @@
 #include "dird.h"
 
 /* Imported variables */
-extern int r_first;
-extern int r_last;
-extern struct s_res resources[];
 
 
 /* Forward referenced functions */
@@ -105,8 +102,8 @@ JCR *new_control_jcr(const char *base_name, int job_type)
    jcr->sd_auth_key = bstrdup("dummy"); /* dummy Storage daemon key */
    create_unique_job_name(jcr, base_name);
    jcr->sched_time = jcr->start_time;
-   jcr->JobType = job_type;
-   jcr->JobLevel = L_NONE;
+   jcr->set_JobType(job_type);
+   jcr->set_JobLevel(L_NONE);
    set_jcr_job_status(jcr, JS_Running);
    jcr->JobId = 0;
    return jcr;
@@ -136,16 +133,17 @@ static void *handle_UA_client_request(void *arg)
    }
 
    while (!ua->quit) {
-      if (ua->api) user->signal(BNET_PROMPT);
+      if (ua->api) user->signal(BNET_MAIN_PROMPT);
       stat = user->recv();
       if (stat >= 0) {
          pm_strcpy(ua->cmd, ua->UA_sock->msg);
          parse_ua_args(ua);
          if (ua->argc > 0 && ua->argk[0][0] == '.') {
-            do_a_dot_command(ua, ua->cmd);
+            do_a_dot_command(ua);
          } else {
-            do_a_command(ua, ua->cmd);
+            do_a_command(ua);
          }
+         dequeue_messages(ua->jcr);
          if (!ua->quit) {
             if (console_msg_pending && acl_access_ok(ua, Command_ACL, "messages", 8)) {
                if (ua->auto_display_messages) {