]> 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 c28b4c40074c8709dd7cba4026feb4ba1e83081e..d09b5d0db25aaae2e14d718ac05f7537fe3fc6a1 100644 (file)
@@ -1,13 +1,7 @@
-/*
- * Test program for listing files during regression testing
- *
- *  Kern Sibbald, MM
- *
- */
 /*
    Bacula® - The Network Backup Solution
 
-   Copyright (C) 2000-2006 Free Software Foundation Europe e.V.
+   Copyright (C) 2000-2008 Free Software Foundation Europe e.V.
 
    The main author of Bacula is Kern Sibbald, with contributions from
    many others, a complete list can be found in the file AUTHORS.
    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.
 */
+/*
+ * Test program for listing files during regression testing
+ *
+ *  Kern Sibbald, MM
+ *
+ */
 
 #include "bacula.h"
 #include "findlib/find.h"
@@ -38,6 +38,7 @@
 /* Dummy functions */
 int generate_daemon_event(JCR *jcr, const char *event) { return 1; }
 int generate_job_event(JCR *jcr, const char *event) { return 1; }
+void generate_plugin_event(JCR *jcr, bEventType eventType, void *value) { }
 
 
 /* Global variables */
@@ -46,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()
@@ -87,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) {
@@ -164,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) {