]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/dird.c
kes Ensure that when labelling a tape with Slot=0 that InChanger
[bacula/bacula] / bacula / src / dird / dird.c
index 2f055701533a72befcbe4a878eab4c65da31980e..6f92ba9aeb0d4dd1939923890b531d647f84dad8 100644 (file)
@@ -128,12 +128,12 @@ int main (int argc, char *argv[])
    char *uid = NULL;
    char *gid = NULL;
 
+   start_heap = sbrk(0);
    setlocale(LC_ALL, "");
    bindtextdomain("bacula", LOCALEDIR);
    textdomain("bacula");
 
    init_stack_dump();
-   start_heap = sbrk(0);
    my_name_is(argc, argv, "bacula-dir");
    init_msg(NULL, NULL);              /* initialize message handler */
    init_reload();
@@ -153,7 +153,7 @@ int main (int argc, char *argv[])
          if (debug_level <= 0) {
             debug_level = 1;
          }
-         Dmsg1(0, "Debug level = %d\n", debug_level);
+         Dmsg1(10, "Debug level = %d\n", debug_level);
          break;
 
       case 'f':                    /* run in foreground */
@@ -295,6 +295,14 @@ int main (int argc, char *argv[])
    return 0;
 }
 
+/*
+ * This allows the message handler to operate on the database
+ *   by using a pointer to this function. The pointer is
+ *   needed because the other daemons do not have access
+ *   to the database.  If the pointer is
+ *   not defined (other daemons), then writing the database
+ *   is disabled. 
+ */
 static void dir_sql_query(JCR *jcr, const char *cmd)
 {
    if (!jcr || !jcr->db) {