]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/ua_select.c
Ensure that StorageId is updated after write
[bacula/bacula] / bacula / src / dird / ua_select.c
index ed8798be75642f01b2c9ce5d893cf0c7b717156e..23b75b4f1954aaa7140388de0f7a217c9d100518 100644 (file)
@@ -1,7 +1,7 @@
 /*
    Bacula® - The Network Backup Solution
 
-   Copyright (C) 2001-2009 Free Software Foundation Europe e.V.
+   Copyright (C) 2001-2012 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.
@@ -299,7 +299,7 @@ JOB *select_job_resource(UAContext *ua)
 JOB *get_restore_job(UAContext *ua)
 {
    JOB *job;
-   int i = find_arg_with_value(ua, "restore_job");
+   int i = find_arg_with_value(ua, "restorejob");
    if (i >= 0 && acl_access_ok(ua, Job_ACL, ua->argv[i])) {
       job = (JOB *)GetResWithName(R_JOB, ua->argv[i]);
       if (job && job->JobType == JT_RESTORE) {
@@ -602,8 +602,7 @@ int select_media_dbr(UAContext *ua, MEDIA_DBR *mr)
    POOLMEM *err = get_pool_memory(PM_FNAME);
    *err=0;
 
-   memset(mr, 0, sizeof(MEDIA_DBR));
-
+   mr->clear();
    i = find_arg_with_value(ua, "volume");
    if (i >= 0) {
       if (is_name_valid(ua->argv[i], &err)) {