]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/newvol.c
Keep the same keywords as in previous version
[bacula/bacula] / bacula / src / dird / newvol.c
index d9f274e2cb580061d7fece2427055da272aaf18a..cac986ccd9386969d06c854f71eb983dab95ac0e 100644 (file)
@@ -6,7 +6,7 @@
    The main author of Bacula is Kern Sibbald, with contributions from
    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
+   modify it under the terms of version three of the GNU Affero General Public
    License as published by the Free Software Foundation and included
    in the file LICENSE.
 
@@ -15,7 +15,7 @@
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Affero General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
@@ -71,8 +71,9 @@ bool newVolume(JCR *jcr, MEDIA_DBR *mr)
       set_pool_dbr_defaults_in_media_dbr(mr, &pr);
       jcr->VolumeName[0] = 0;
       bstrncpy(mr->MediaType, jcr->wstore->media_type, sizeof(mr->MediaType));
-      if (generate_job_event(jcr, "NewVolume") == 1 && jcr->VolumeName[0] &&
-          is_volume_name_legal(NULL, jcr->VolumeName)) {
+      generate_job_event(jcr, "NewVolume"); /* return bool */
+      generate_plugin_event(jcr, bEventNewVolume); /* return void... */
+      if (jcr->VolumeName[0] && is_volume_name_legal(NULL, jcr->VolumeName)) {
          bstrncpy(mr->VolumeName, jcr->VolumeName, sizeof(mr->VolumeName));
       /* Check for special characters */
       } else if (pr.LabelFormat[0] && pr.LabelFormat[0] != '*') {