]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/ua_query.c
ebl Modify disk-changer to check if slot contains something before
[bacula/bacula] / bacula / src / dird / ua_query.c
index 83d6cee13daa1b8bbe6ae468a9c3dcd7882ae75a..231e41700b6f7411b3f2b51253f104422f8cfc1b 100644 (file)
@@ -15,8 +15,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
@@ -69,8 +69,9 @@ int querycmd(UAContext *ua, const char *cmd)
       goto bail_out;
    }
    if ((fd=fopen(query_file, "rb")) == NULL) {
+      berrno be;
       ua->error_msg(_("Could not open %s: ERR=%s\n"), query_file,
-         strerror(errno));
+         be.bstrerror());
       goto bail_out;
    }
 
@@ -207,7 +208,7 @@ static POOLMEM *substitute_prompts(UAContext *ua,
                }
                len = strlen(ua->cmd);
                p = (char *)malloc(len * 2 + 1);
-               db_escape_string(p, ua->cmd, len);
+               db_escape_string(ua->jcr, ua->db, p, ua->cmd, len);
                subst[n] = p;
                olen = o - new_query;
                new_query = check_pool_memory_size(new_query, olen + strlen(p) + 10);