]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/tools/testls.c
Tweak mutex order for SD
[bacula/bacula] / bacula / src / tools / testls.c
index 22d9a78a6601a712fd4cd24e0f5f2c919e320653..d09b5d0db25aaae2e14d718ac05f7537fe3fc6a1 100644 (file)
@@ -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.
@@ -47,7 +47,7 @@ int attrs = 0;
 static JCR *jcr;
 
 
-static int print_file(FF_PKT *ff, void *pkt, bool);
+static int print_file(JCR *jcr, FF_PKT *ff, bool);
 static void print_ls_output(char *fname, char *link, int type, struct stat *statp);
 
 static void usage()
@@ -88,6 +88,7 @@ main (int argc, char *const *argv)
    setlocale(LC_ALL, "");
    bindtextdomain("bacula", LOCALEDIR);
    textdomain("bacula");
+   lmgr_init_thread();
 
    while ((ch = getopt(argc, argv, "ad:e:i:?")) != -1) {
       switch (ch) {
@@ -165,18 +166,19 @@ main (int argc, char *const *argv)
       }
       fclose(fd);
    }
-   match_files(jcr, ff, print_file, NULL);
+   match_files(jcr, ff, print_file);
    term_include_exclude_files(ff);
    hard_links = term_find_files(ff);
 
    free_jcr(jcr);
    term_last_jobs_list();             /* free jcr chain */
    close_memory_pool();
+   lmgr_cleanup_main();
    sm_dump(false);
    exit(0);
 }
 
-static int print_file(FF_PKT *ff, void *pkt, bool top_level) 
+static int print_file(JCR *jcr, FF_PKT *ff, bool top_level) 
 {
 
    switch (ff->type) {