]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Adjust some Daemon Event/Error codes
authorEric Bollengier <eric@baculasystems.com>
Mon, 21 Nov 2022 10:05:14 +0000 (11:05 +0100)
committerEric Bollengier <eric@baculasystems.com>
Thu, 14 Sep 2023 11:57:00 +0000 (13:57 +0200)
17 files changed:
bacula/src/dird/authenticate.c
bacula/src/dird/backup.c
bacula/src/dird/fd_cmds.c
bacula/src/dird/getmsg.c
bacula/src/dird/job.c
bacula/src/dird/msgchan.c
bacula/src/dird/ua_collect.c
bacula/src/dird/ua_status.c
bacula/src/filed/authenticate.c
bacula/src/filed/hello.c
bacula/src/lib/authenticatebase.cc
bacula/src/lib/bnet.c
bacula/src/lib/bsockcore.c
bacula/src/lib/tls.c
bacula/src/stored/block.c
bacula/src/stored/dircmd.c
bacula/src/stored/init_dev.c

index 5137633a1120d09d6ba26bcc06a29440e4790f44..f20b6861bf260542fbb0bae612049e0b555f0b33 100644 (file)
@@ -102,7 +102,7 @@ bool DIRAuthenticateSD::authenticate_storage_daemon(STORE *store)
    /* Sent Hello SD: Bacula Director <dirname> calling <version> */
    if (!sd->fsend(hello, "SD: Bacula ", dirname, DIR_VERSION, tlspsk_local_need)) {
       status = M_FATAL;
-      MmsgD3(dbglvl, errmsg, _("[DE0011] Error sending Hello to Storage daemon at \"%s:%d\". ERR=%s\n"),
+      MmsgD3(dbglvl, errmsg, _("[DE0031] Error sending Hello to Storage daemon at \"%s:%d\". ERR=%s\n"),
              sd->host(), sd->port(), sd->bstrerror());
       return false;
    }
@@ -119,7 +119,7 @@ bool DIRAuthenticateSD::authenticate_storage_daemon(STORE *store)
    Dmsg1(116, ">stored: %s", sd->msg);
    if (sd->recv() <= 0) {
       status = M_FATAL;
-      Mmsg(errmsg, _("[DE0011] bdird<stored: \"%s:%s\" bad response to Hello command: ERR=%s\n"),
+      Mmsg(errmsg, _("[DE0031] bdird<stored: \"%s:%s\" bad response to Hello command: ERR=%s\n"),
            sd->who(), sd->host(), sd->bstrerror());
       return 0;
    }
@@ -129,7 +129,7 @@ bool DIRAuthenticateSD::authenticate_storage_daemon(STORE *store)
        strncmp(sd->msg, OKhello, sizeof(OKhello)) != 0)
    {
       status = M_FATAL;
-      MmsgD2(dbglvl, errmsg, _("[DE0011] Storage daemon at \"%s:%d\" rejected Hello command\n"),
+      MmsgD2(dbglvl, errmsg, _("[DE0031] Storage daemon at \"%s:%d\" rejected Hello command\n"),
              sd->host(), sd->port());
       return 0;
    }
@@ -142,7 +142,7 @@ bool DIRAuthenticateSD::authenticate_storage_daemon(STORE *store)
    }
    if (jcr->SDVersion < SD_VERSION) {
       status = M_FATAL;
-      Mmsg(errmsg, _("[DE0011] Older Storage daemon at \"%s:%d\" incompatible with this Director.\n"),
+      Mmsg(errmsg, _("[DE0031] Older Storage daemon at \"%s:%d\" incompatible with this Director.\n"),
            sd->host(), sd->port());
       return 0;
    }
@@ -191,7 +191,7 @@ int DIRAuthenticateFD::authenticate_file_daemon()
    StartAuthTimeout();
    if (!fd->fsend(hello, "", dirname, DIR_VERSION, tlspsk_local_need)) {
       status = M_FATAL;
-      MmsgD3(dbglvl, errmsg, _("[DE0011] Error sending Hello to File daemon at \"%s:%d\". ERR=%s\n"),
+      MmsgD3(dbglvl, errmsg, _("[DE0031] Error sending Hello to File daemon at \"%s:%d\". ERR=%s\n"),
            fd->host(), fd->port(), fd->bstrerror());
       return false;
    }
@@ -208,7 +208,7 @@ int DIRAuthenticateFD::authenticate_file_daemon()
    Dmsg1(116, ">filed: %s", fd->msg);
    if (fd->recv() <= 0) {
       status = M_FATAL;
-      MmsgD3(dbglvl, errmsg, _("[DE0011] Bad response from File daemon at \"%s:%d\" to Hello command: ERR=%s\n"),
+      MmsgD3(dbglvl, errmsg, _("[DE0031] Bad response from File daemon at \"%s:%d\" to Hello command: ERR=%s\n"),
              fd->host(), fd->port(), fd->bstrerror());
       return 0;
    }
@@ -219,7 +219,7 @@ int DIRAuthenticateFD::authenticate_file_daemon()
        sscanf(fd->msg, FDOKnewHello, &jcr->FDVersion) != 1)
    {
       status = M_FATAL;
-      MmsgD2(dbglvl, errmsg, _("[DE0011] File daemon at \"%s:%d\" rejected Hello command\n"),
+      MmsgD2(dbglvl, errmsg, _("[DE0031] File daemon at \"%s:%d\" rejected Hello command\n"),
              fd->host(), fd->port());
       return 0;
    }
@@ -274,7 +274,7 @@ int UAAuthenticate::authenticate_user_agent()
 
    if (ua->msglen < 16 || ua->msglen >= MAX_NAME_LENGTH + 15) {
       status = M_SECURITY;
-      Mmsg(errmsg, _("[DE0011] UA Hello from %s:%s is invalid. Len=%d\n"), ua->who(),
+      Mmsg(errmsg, _("[DE0031] UA Hello from %s:%s is invalid. Len=%d\n"), ua->who(),
            ua->host(), ua->msglen);
       sleep(5);
       return 0;
@@ -289,7 +289,7 @@ int UAAuthenticate::authenticate_user_agent()
    {
       ua->msg[100] = 0;               /* terminate string */
       status = M_SECURITY;
-      Mmsg(errmsg, _("[DE0011] UA Hello from %s:%s is invalid. Got: %s\n"), ua->who(),
+      Mmsg(errmsg, _("[DE0031] UA Hello from %s:%s is invalid. Got: %s\n"), ua->who(),
            ua->host(), ua->msg);
       sleep(5);
       return 0;
@@ -374,7 +374,7 @@ auth_done:
    if (!auth_success) {
       ua->fsend("%s", _(Dir_sorry));
       status = M_SECURITY;
-      Mmsg(errmsg, _("[DE0015] Unable to authenticate console \"%s\" at %s:%s:%d.\n"),
+      Mmsg(errmsg, _("[DE0020] Unable to authenticate console \"%s\" at %s:%s:%d.\n"),
            name, ua->who(), ua->host(), ua->port());
       sleep(5);
       return 0;
@@ -423,7 +423,7 @@ bool UAAuthenticate::authenticate_with_plugin(CONRES * cons)
    if (authData == NULL)
    {
       status = M_FATAL;
-      Mmsg(errmsg, "[DE0011] Incorrect authentication plugin initialization\n");
+      Mmsg(errmsg, "[DE0031] Incorrect authentication plugin initialization\n");
       return false;
    }
 
@@ -435,13 +435,13 @@ bool UAAuthenticate::authenticate_with_plugin(CONRES * cons)
    // We require to have TLS setup to use authentication plugins
    if (!tls_started) {
       status = M_FATAL;
-      MmsgD0(dbglvl, errmsg, _("[DE0011] Unable to use Plugin Authentication because TLS is not available\n"));
+      MmsgD0(dbglvl, errmsg, _("[DE0031] Unable to use Plugin Authentication because TLS is not available\n"));
       return false;
    }
    // send auth plugin start packet and optional welcome string to console
    if (!bsock->fsend("auth interactive %s\n", NPRTB(authData->welcome))) {
       status = M_FATAL;
-      MmsgD1(dbglvl, errmsg, "[DE0011] Send interactive start comm error. ERR=%s\n", bsock->bstrerror());
+      MmsgD1(dbglvl, errmsg, "[DE0031] Send interactive start comm error. ERR=%s\n", bsock->bstrerror());
       return false;
    }
 
@@ -452,14 +452,14 @@ bool UAAuthenticate::authenticate_with_plugin(CONRES * cons)
       Dmsg1(dbglvl, "bDirAuthenticationData step %d\n", i);
       if (dir_authplugin_do_interaction(uac->jcr, bsock, authData->name, (void *)&data[i]) != bRC_OK){
          status = M_FATAL;
-         Mmsg(errmsg, "[DE0011] Invalid authentication protocol\n");
+         Mmsg(errmsg, "[DE0031] Invalid authentication protocol\n");
          return false;
       }
    }
 
    if (dir_authplugin_authenticate(uac->jcr, bsock, authData->name) != bRC_OK){
       status = M_FATAL;
-      Mmsg(errmsg, "[DE0015] Authorization failed\n");
+      Mmsg(errmsg, "[DE0020] Authorization failed\n");
       bsock->fsend(_("1999 Authorization failed !!!.\n"));
       bmicrosleep(5, 0);
       return false;
index 2c53973ca3024f6d6ec4837e2699515987c014b9..33f5e66eb15a654f6e72420dfc2f9feb8b9f6fa9 100644 (file)
@@ -94,7 +94,7 @@ bool do_backup_init(JCR *jcr)
    jcr->jr.PoolId = get_or_create_pool_record(jcr, jcr->pool->name());
    if (jcr->jr.PoolId == 0) {
       Dmsg1(100, "JobId=%d no PoolId\n", (int)jcr->JobId);
-      Jmsg(jcr, M_FATAL, 0, _("[DE0008] Could not get or create a Pool record.\n"));
+      Jmsg(jcr, M_FATAL, 0, _("[DE0028] Could not get or create a Pool record.\n"));
       return false;
    }
 
@@ -319,19 +319,19 @@ bool send_accurate_current_files(JCR *jcr)
    jcr->file_bsock->fsend("accurate files=%s\n", nb.list);
 
    if (!db_open_batch_connection(jcr, jcr->db)) {
-      Jmsg0(jcr, M_FATAL, 0, "[DE0008] Can't get batch sql connection");
+      Jmsg0(jcr, M_FATAL, 0, "[DE0028] Can't get batch sql connection");
       return false;  /* Fail */
    }
 
    if (jcr->HasBase) {
       jcr->nb_base_files = str_to_int64(nb.list);
       if (!db_create_base_file_list(jcr, jcr->db, jobids.list)) {
-         Jmsg1(jcr, M_FATAL, 0, "[DE0008] %s", db_strerror(jcr->db));
+         Jmsg1(jcr, M_FATAL, 0, "[DE0028] %s", db_strerror(jcr->db));
          return false;
       }
       if (!db_get_base_file_list(jcr, jcr->db, jcr->use_accurate_chksum,
                             accurate_list_handler, (void *)jcr)) {
-         Jmsg1(jcr, M_FATAL, 0, "[DE0008] %s", db_strerror(jcr->db));
+         Jmsg1(jcr, M_FATAL, 0, "[DE0028] %s", db_strerror(jcr->db));
          return false;
       }
 
@@ -340,7 +340,7 @@ bool send_accurate_current_files(JCR *jcr)
       if (!db_get_file_list(jcr, jcr->db_batch,
                        jobids.list, opts,
                        accurate_list_handler, (void *)jcr)) {
-         Jmsg1(jcr, M_FATAL, 0, "[DE0008] %s", db_strerror(jcr->db_batch));
+         Jmsg1(jcr, M_FATAL, 0, "[DE0028] %s", db_strerror(jcr->db_batch));
          return false;
       }
    }
@@ -484,7 +484,7 @@ bool do_backup(JCR *jcr)
    jcr->setJobStatus(JS_Running);
    Dmsg2(100, "JobId=%d JobLevel=%c\n", jcr->jr.JobId, jcr->jr.JobLevel);
    if (!db_update_job_start_record(jcr, jcr->db, &jcr->jr)) {
-      Jmsg(jcr, M_FATAL, 0, "[DE0008] %s", db_strerror(jcr->db));
+      Jmsg(jcr, M_FATAL, 0, "[DE0028] %s", db_strerror(jcr->db));
       return false;
    }
 
@@ -496,17 +496,17 @@ bool do_backup(JCR *jcr)
          Jmsg(jcr, M_INFO, 0, _("Found %ld files from prior incomplete Job.\n"),
             (int32_t)job.value);
       } else {
-         Jmsg(jcr, M_FATAL, 0, "[DE0008] %s", db_strerror(jcr->db));
+         Jmsg(jcr, M_FATAL, 0, "[DE0028] %s", db_strerror(jcr->db));
          return false;
       }
       Mmsg(buf, "SELECT max(LastIndex) FROM JobMedia WHERE JobId=%s", ed1);
       if (!db_sql_query(jcr->db, buf.c_str(), db_int64_handler, &last)) {
-         Jmsg(jcr, M_FATAL, 0, "[DE0008] %s", db_strerror(jcr->db));
+         Jmsg(jcr, M_FATAL, 0, "[DE0028] %s", db_strerror(jcr->db));
          return false;
       }
       Mmsg(buf, "SELECT max(FirstIndex) FROM JobMedia WHERE JobId=%s", ed1);
       if (!db_sql_query(jcr->db, buf.c_str(), db_int64_handler, &first)) {
-         Jmsg(jcr, M_FATAL, 0, "[DE0008] %s", db_strerror(jcr->db));
+         Jmsg(jcr, M_FATAL, 0, "[DE0028] %s", db_strerror(jcr->db));
          return false;
       }
       /* We skip the last FileIndex (MAX) and the one after (MAX+1), can be
@@ -517,13 +517,13 @@ bool do_backup(JCR *jcr)
       Dmsg1(100, "==== FI=%ld\n", jcr->JobFiles);
       Mmsg(buf, "SELECT VolSessionId FROM Job WHERE JobId=%s", ed1);
       if (!db_sql_query(jcr->db, buf.c_str(), db_int64_handler, &job)) {
-         Jmsg(jcr, M_FATAL, 0, "[DE0008] %s", db_strerror(jcr->db));
+         Jmsg(jcr, M_FATAL, 0, "[DE0028] %s", db_strerror(jcr->db));
          return false;
       }
       jcr->VolSessionId = job.value;
       Mmsg(buf, "SELECT VolSessionTime FROM Job WHERE JobId=%s", ed1);
       if (!db_sql_query(jcr->db, buf.c_str(), db_int64_handler, &job)) {
-         Jmsg(jcr, M_FATAL, 0, "[DE0008] %s", db_strerror(jcr->db));
+         Jmsg(jcr, M_FATAL, 0, "[DE0028] %s", db_strerror(jcr->db));
          return false;
       }
       jcr->VolSessionTime = job.value;
@@ -701,7 +701,7 @@ bool do_backup(JCR *jcr)
 
    if (jcr->sd_calls_client) {
       if (jcr->FDVersion < 10) {
-         Jmsg(jcr, M_FATAL, 0, _("[DE0011] The File daemon does not support SDCallsClient.\n"));
+         Jmsg(jcr, M_FATAL, 0, _("[DE0031] The File daemon does not support SDCallsClient.\n"));
          goto bail_out;
       }
       if (!send_client_addr_to_sd(jcr)) {
@@ -753,7 +753,7 @@ bool do_backup(JCR *jcr)
    bstrncpy(jcr->jr.WriteDevice, jcr->write_dev, sizeof(jcr->jr.WriteDevice));
 
    if (!db_update_job_start_record(jcr, jcr->db, &jcr->jr)) {
-      Jmsg(jcr, M_FATAL, 0, "[DE0008] %s", db_strerror(jcr->db));
+      Jmsg(jcr, M_FATAL, 0, "[DE0028] %s", db_strerror(jcr->db));
    }
 
    /*
@@ -898,7 +898,7 @@ int wait_for_job_termination(JCR *jcr, int timeout)
       jcr->Encrypt = Encrypt;
 
    } else if (!jcr->is_canceled()) {
-      Jmsg(jcr, M_FATAL, 0, _("[DE0011] No Job status returned from FD\n"));
+      Jmsg(jcr, M_FATAL, 0, _("[DE0031] No Job status returned from FD\n"));
    }
 
    /* Return the first error status we find Dir, FD, or SD */
@@ -939,7 +939,7 @@ void incomplete_cleanup(JCR *jcr)
    /* Get the last valid FileIndex */
    Mmsg(buf, "SELECT max(FileIndex) FROM File WHERE JobId=%s", ed1);
    if (!db_sql_query(jcr->db, buf.c_str(), db_int64_handler, &job)) {
-      Jmsg(jcr, M_FATAL, 0, "[DE0008] %s", db_strerror(jcr->db));
+      Jmsg(jcr, M_FATAL, 0, "[DE0028] %s", db_strerror(jcr->db));
       return;
    }
 
@@ -948,7 +948,7 @@ void incomplete_cleanup(JCR *jcr)
         "AND (FirstIndex > %lld OR LastIndex > %lld)",
         ed1, job.value, job.value);
    if (!db_sql_query(jcr->db, buf.c_str(), db_string_list_handler, &pids)) {
-      Jmsg(jcr, M_FATAL, 0, "[DE0008] %s", db_strerror(jcr->db));
+      Jmsg(jcr, M_FATAL, 0, "[DE0028] %s", db_strerror(jcr->db));
       return;
    }
    /* Nothing to fix */
@@ -999,7 +999,7 @@ void incomplete_cleanup(JCR *jcr)
 bail_out:
    if (!ok) {
       db_sql_query(jcr->db, "ROLLBACK", NULL, NULL);
-      Jmsg(jcr, M_FATAL, 0, _("[DE0008] Unable to cleanup JobMedia records\n"));
+      Jmsg(jcr, M_FATAL, 0, _("[DE0028] Unable to cleanup JobMedia records\n"));
    }
    db_end_transaction(jcr, jcr->db);
    db_unlock(jcr->db);
index 4d4d3524c5419b60dd8957bbece7a0f38c547500..dd1daab166e61ed54bb0076269f27ce8d2a407a7 100644 (file)
@@ -89,7 +89,7 @@ int connect_to_file_daemon(JCR *jcr, int retry_interval, int max_retry_time,
    int status;
 
    if (!jcr->client) {
-      Mmsg(jcr->errmsg, _("[DE0017] File daemon not defined for current Job\n"));
+      Mmsg(jcr->errmsg, _("[DE0037] File daemon not defined for current Job\n"));
       Dmsg0(10, "No Client defined for the job.\n");
       return 0;
    }
@@ -117,7 +117,7 @@ int connect_to_file_daemon(JCR *jcr, int retry_interval, int max_retry_time,
             job_end_push(jcr, delete_bsock_end_cb, (void *)jcr->file_bsock);
          }
          if (!fd) {
-            Mmsg(jcr->errmsg, "[DE0010] No socket found of the client\n");
+            Mmsg(jcr->errmsg, "[DE0030] No socket found of the client\n");
             return 0;
          }
          jcr->file_bsock = fd;
@@ -169,7 +169,7 @@ int connect_to_file_daemon(JCR *jcr, int retry_interval, int max_retry_time,
    if (bget_dirmsg(jcr, fd, BSOCK_TYPE_FD) > 0) {
        Dmsg1(110, "<filed: %s", fd->msg);
        if (strncmp(fd->msg, OKjob, strlen(OKjob)) != 0) {
-          Mmsg(jcr->errmsg, _("[DE0011] File daemon \"%s\" rejected Job command: %s\n"),
+          Mmsg(jcr->errmsg, _("[DE0031] File daemon \"%s\" rejected Job command: %s\n"),
              jcr->client->hdr.name, fd->msg);
           return 0;
 
@@ -190,12 +190,12 @@ int connect_to_file_daemon(JCR *jcr, int retry_interval, int max_retry_time,
           bstrncpy(cr.Uname, fd->msg+strlen(OKjob)+1, sizeof(cr.Uname));
 
           if (!db_update_client_record(jcr, jcr->db, &cr)) {
-             Jmsg(jcr, M_WARNING, 0, _("[DE0008] Error updating Client record. ERR=%s\n"),
+             Jmsg(jcr, M_WARNING, 0, _("[DE0028] Error updating Client record. ERR=%s\n"),
                   db_strerror(jcr->db));
           }
        }
    } else {
-      Mmsg(jcr->errmsg, _("[DE0011] FD gave bad response to JobId command: %s\n"),
+      Mmsg(jcr->errmsg, _("[DE0031] FD gave bad response to JobId command: %s\n"),
          fd->bstrerror());
       return 0;
    }
index 54d8a1e1be8742ee765d49574598d827afca3f14..45f136ef59a83f614992c0d548252313b3103970 100644 (file)
@@ -416,12 +416,12 @@ bool response(JCR *jcr, BSOCK *bs, BSOCK_CLIENT_TYPE role, const char *resp, con
          return true;
       }
       if (prtmsg == DISPLAY_ERROR) {
-         Jmsg(jcr, M_FATAL, 0, _("[DE0011] Bad response to %s command: wanted %s, got %s\n"),
+         Jmsg(jcr, M_FATAL, 0, _("[DE0031] Bad response to %s command: wanted %s, got %s\n"),
             cmd, resp, bs->msg);
       }
       return false;
    }
-   Jmsg(jcr, M_FATAL, 0, _("[DE0018] Socket error on %s command: ERR=%s\n"),
+   Jmsg(jcr, M_FATAL, 0, _("[DE0038] Socket error on %s command: ERR=%s\n"),
          cmd, bs->bstrerror());
    return false;
 }
index b5b838b723705e36deb0c4d5a4a9e9b64ef2fb69..1c935adfb667d31b44d96b70c91ee5524e6e70ff 100644 (file)
@@ -131,7 +131,7 @@ bool setup_job(JCR *jcr)
                               jcr->catalog->disable_batch_insert);
 
    if (!jcr->db || !db_open_database(jcr, jcr->db)) {
-      Jmsg(jcr, M_FATAL, 0, _("[DE0008] Could not open database \"%s\".\n"),
+      Jmsg(jcr, M_FATAL, 0, _("[DE0028] Could not open database \"%s\".\n"),
                  jcr->catalog->db_name);
       if (jcr->db) {
          Jmsg(jcr, M_FATAL, 0, "%s", db_strerror(jcr->db));
@@ -170,7 +170,7 @@ bool setup_job(JCR *jcr)
    }
 
    if (!db_create_job_record(jcr, jcr->db, &jcr->jr)) {
-      Jmsg(jcr, M_FATAL, 0, "[DE0008] %s", db_strerror(jcr->db));
+      Jmsg(jcr, M_FATAL, 0, "[DE0028] %s", db_strerror(jcr->db));
       goto bail_out;
    }
    jcr->JobId = jcr->jr.JobId;
@@ -297,7 +297,7 @@ static bool setup_resume_job(JCR *jcr, JOB_DBR *jr)
                               jcr->catalog->mult_db_connections,
                               jcr->catalog->disable_batch_insert);
    if (!jcr->db || !db_open_database(jcr, jcr->db)) {
-      Jmsg(jcr, M_FATAL, 0, _("[DE0008] Could not open database \"%s\".\n"),
+      Jmsg(jcr, M_FATAL, 0, _("[DE0028] Could not open database \"%s\".\n"),
                  jcr->catalog->db_name);
       if (jcr->db) {
          Jmsg(jcr, M_FATAL, 0, "%s", db_strerror(jcr->db));
@@ -444,7 +444,7 @@ static void *job_thread(void *arg)
    }
 
    if (!db_update_job_start_record(jcr, jcr->db, &jcr->jr)) {
-      Jmsg(jcr, M_FATAL, 0, "[DE0008] %s", db_strerror(jcr->db));
+      Jmsg(jcr, M_FATAL, 0, "[DE0028] %s", db_strerror(jcr->db));
    }
 
    /* Run any script BeforeJob on dird */
@@ -463,7 +463,7 @@ static void *job_thread(void *arg)
    jcr->start_time = time(NULL);
    jcr->jr.StartTime = jcr->start_time;
    if (!db_update_job_start_record(jcr, jcr->db, &jcr->jr)) {
-      Jmsg(jcr, M_FATAL, 0, "[DE0008] %s", db_strerror(jcr->db));
+      Jmsg(jcr, M_FATAL, 0, "[DE0028] %s", db_strerror(jcr->db));
    }
    generate_plugin_event(jcr, bDirEventJobRun);
 
@@ -1373,7 +1373,7 @@ bool get_or_create_client_record(JCR *jcr)
    }
    pm_strcpy(jcr->client_name, jcr->client->hdr.name);
    if (!db_create_client_record(jcr, jcr->db, &cr)) {
-      Jmsg(jcr, M_FATAL, 0, _("[DE0008] Could not create Client record. ERR=%s\n"),
+      Jmsg(jcr, M_FATAL, 0, _("[DE0028] Could not create Client record. ERR=%s\n"),
          db_strerror(jcr->db));
       return false;
    }
@@ -1993,7 +1993,7 @@ bool flush_file_records(JCR *jcr)
    if (jcr->cached_attribute) {
       Dmsg0(400, "Flush last cached attribute.\n");
       if (!db_create_attributes_record(jcr, jcr->db, jcr->ar)) {
-         Jmsg1(jcr, M_FATAL, 0, _("[DE0008] Attribute create error. %s"), jcr->db->bdb_strerror());
+         Jmsg1(jcr, M_FATAL, 0, _("[DE0028] Attribute create error. %s"), jcr->db->bdb_strerror());
       }
       jcr->cached_attribute = false;
    }
index 4da9fec13859d50d0b5ddef7ab852a97b1e87161..52f381963abbc4a37c687ad74edc7426a2e07627 100644 (file)
@@ -115,7 +115,7 @@ bool connect_to_storage_daemon(JCR *jcr, int retry_interval,
    }
 
    if (!store) {
-      MmsgD1(100, jcr->errmsg, "[DE0017] No storage resource found in jcr for JobId: %d!\n", jcr->JobId);
+      MmsgD1(100, jcr->errmsg, "[DE0037] No storage resource found in jcr for JobId: %d!\n", jcr->JobId);
       return false;
    }
 
index bcc198e9d1c9580fe9dce47d963486d4331d27c0..69951919dd403569e621ff111a4320267b886dbc 100644 (file)
@@ -354,7 +354,7 @@ void do_collect_client(UAContext *ua, CLIENT *client, bool doall, display_format
    POOL_MEM buf;
 
    if (!acl_access_client_ok(ua, client->name(), JT_BACKUP_RESTORE)) {
-      ua->error_msg(_("[DE0016] No authorization for Client \"%s\"\n"), client->name());
+      ua->error_msg(_("[DE0021] No authorization for Client \"%s\"\n"), client->name());
       return;
    }
    /* Connect to File daemon */
@@ -425,7 +425,7 @@ void do_collect_storage(UAContext *ua, STORE *store, bool doall, display_format_
     */
    if (have_restricted_acl(ua, Client_ACL) ||
        have_restricted_acl(ua, Job_ACL)) {
-      ua->error_msg(_("[DE0016] Restricted Client or Job does not permit access to  Storage daemons\n"));
+      ua->error_msg(_("[DE0021] Restricted Client or Job does not permit access to  Storage daemons\n"));
       return;
    }
 
index 924e402aff37a972ef59a402484db98cfc6f2334..e454ad9faefdeb0dd02a9451a23d2b1d37cfb7ba 100644 (file)
@@ -644,7 +644,7 @@ static void do_client_status(UAContext *ua, CLIENT *client, char *cmd)
    int i;
 
    if (!acl_access_client_ok(ua, client->name(), JT_BACKUP_RESTORE)) {
-      ua->error_msg(_("[DE0016] No authorization for Client \"%s\"\n"), client->name());
+      ua->error_msg(_("[DE0021] No authorization for Client \"%s\"\n"), client->name());
       return;
    }
 
index 9f6cbbc3765832114e052ffef9fdd314a9cb5fb4..4165906b7dbf1d48aa18df74238d37bcd90768ae 100644 (file)
@@ -97,7 +97,7 @@ bool FDAuthenticateDIR::validate_dir_hello()
    if (!director) {
       char addr[64];
       char *who = dir->get_peer(addr, sizeof(addr)) ? dir->who() : addr;
-      Jmsg2(jcr, M_FATAL, 0, _("[FE0016] Connection from unknown Director %s at %s rejected.\n"),
+      Jmsg2(jcr, M_FATAL, 0, _("[FE0027] Connection from unknown Director %s at %s rejected.\n"),
             dirname, who);
       goto auth_fatal;
    }
index e03bcaa388fc33df1f897ba8bb27e1d32bf71a35..021c24c1634af598fc9a09c298fcd17af2fa243f 100644 (file)
@@ -180,7 +180,7 @@ bool recv_sdcaps(JCR *jcr)
    stat = sd->recv();
    if (stat <= 0) {
       berrno be;
-      Jmsg1(jcr, M_FATAL, 0, _("[FE0011] Recv caps from SD failed. ERR=%s\n"),
+      Jmsg1(jcr, M_FATAL, 0, _("[FE0031] Recv caps from SD failed. ERR=%s\n"),
          be.bstrerror());
       Dmsg1(050, _("Recv caps from SD failed. ERR=%s\n"), be.bstrerror());
       return false;
@@ -266,7 +266,7 @@ bool FDUAAuthenticateDir::authenticate_director(const char *name, DIRINFO *dir,
     */
    Dmsg1(dbglvl, ">dird: %s", UA_sock->msg);
    if (UA_sock->recv() <= 0) {
-      Mmsg(errmsg, _("[FE0011] Bad response to Hello command: ERR=%s\n"),
+      Mmsg(errmsg, _("[FE0031] Bad response to Hello command: ERR=%s\n"),
            UA_sock->bstrerror());
       return false;
    }
@@ -275,7 +275,7 @@ bool FDUAAuthenticateDir::authenticate_director(const char *name, DIRINFO *dir,
    if (strncmp(UA_sock->msg, DirOKhello, sizeof(DirOKhello)-3) == 0) {
       sscanf(UA_sock->msg, DirOKhello, &dir_version);
    } else {
-      Mmsg(errmsg, _("[FE0011] Director rejected Hello command\n"));
+      Mmsg(errmsg, _("[FE0031] Director rejected Hello command\n"));
       return false;
    }
    /* Turn on compression for newer Directors */
index 1e0118a8ada5d8a2eadc9583a59b9bc238c59439..fffe046fc3475e286a52fbf860ac85fbfb8eeb3e 100644 (file)
@@ -348,13 +348,13 @@ bool AuthenticateBase::CheckTLSRequirement()
    switch (TestTLSRequirement()) {
    case TLS_REQ_ERR_LOCAL:
       status = msg_type;
-      Mmsg(errmsg, _("[%cE0017] Authorization problem: %s \"%s:%s\" did not advertise required TLS support.\n"),
+      Mmsg(errmsg, _("[%cE0067] Authorization problem: %s \"%s:%s\" did not advertise required TLS support.\n"),
            component_code, GetLocalClassShortName(), bsock->who(), bsock->host());
       return false;
 
    case TLS_REQ_ERR_REMOTE:
       status = msg_type;
-      Mmsg(errmsg, _("[%cE0017] Authorization problem: %s \"%s:%s\" did not advertise required TLS support.\n"),
+      Mmsg(errmsg, _("[%cE0067] Authorization problem: %s \"%s:%s\" did not advertise required TLS support.\n"),
            component_code, GetRemoteClassShortName(), bsock->who(), bsock->host());
       return false;
    case TLS_REQ_OK:
@@ -379,7 +379,7 @@ bool AuthenticateBase::ClientEarlyTLS()
    if (bsock->recv() <= 0) {
       bmicrosleep(5, 0); // original cram_md5_respond() wait for 5s here
       status = M_FATAL;
-      Mmsg(errmsg, "[%cE0011] Unable to get starttls protocol\n", component_code);
+      Mmsg(errmsg, "[%cE0071] Unable to get starttls protocol\n", component_code);
       return false;
    }
    if (scan_string(bsock->msg, "starttls tlspsk=%d\n", &tlspsk_remote) != EOF) {
@@ -412,7 +412,7 @@ bool AuthenticateBase::ClientCramMD5AuthenticateBase(const char *password)
       if (jcr && job_canceled(jcr)) {
          auth_success = false;
          status = M_FATAL;
-         Mmsg(errmsg, "[DE0019] Job is canceled\n");
+         Mmsg(errmsg, "[DE0069] Job is canceled\n");
          return false;                   /* quick exit */
       }
    }
@@ -423,7 +423,7 @@ bool AuthenticateBase::ClientCramMD5AuthenticateBase(const char *password)
       if (jcr && job_canceled(jcr)) {
          auth_success = false;
          status = M_FATAL;
-         Mmsg(errmsg, "[DE0019] Job is canceled\n");
+         Mmsg(errmsg, "[DE0069] Job is canceled\n");
          return false;                   /* quick exit */
       }
    }
@@ -445,7 +445,7 @@ bool AuthenticateBase::ClientCramMD5AuthenticateBase(const char *password)
          Dmsg2(authdl, "Authorization key rejected by %s at %s.\n",
             GetRemoteClassShortName(), bsock->who());
          status = M_FATAL;
-         Mmsg(errmsg, _("[%cE0015] Authorization key rejected by %s at %s rejected.\n"
+         Mmsg(errmsg, _("[%cE0065] Authorization key rejected by %s at %s rejected.\n"
                         "For help, please see: " MANUAL_AUTH_URL "\n"),
               component_code,
               GetRemoteClassLongName(), bsock->who());
@@ -454,7 +454,7 @@ bool AuthenticateBase::ClientCramMD5AuthenticateBase(const char *password)
                GetLocalClassLongName(), GetRemoteClassLongName());
          status = M_FATAL;
          Mmsg(errmsg,
-              _("[%cE0015] %s unable to authenticate with %s at \"%s:%d\". Possible causes:\n"
+              _("[%cE0065] %s unable to authenticate with %s at \"%s:%d\". Possible causes:\n"
                "Passwords or names not the same or\n"
                "Maximum Concurrent Jobs exceeded on the %s or\n"
                "%s networking messed up (restart daemon).\n"
@@ -487,7 +487,7 @@ bool AuthenticateBase::ServerEarlyTLS()
       if (!bsock->fsend("starttls tlspsk=%d\n", tlspsk_local_need)) {
 // TODO tweak the error message
          status = M_SECURITY;
-         Mmsg(errmsg, _("[%cE0011] Connection with %s:%s starttls comm error. ERR=%s\n"),
+         Mmsg(errmsg, _("[%cE0071] Connection with %s:%s starttls comm error. ERR=%s\n"),
               component_code, bsock->who(), bsock->host(), bsock->bstrerror());
          sleep(5);
          return false;
index 525304ba7797f4de7ce757c43e6b9e9320a86fac..9ff785dcee4bf263e70e6d4fa7d21a790d39c0f2 100644 (file)
@@ -65,13 +65,13 @@ bool bnet_tls_server(TLS_CONTEXT *ctx, BSOCK * bsock, alist *verify_list,
 
    tls = new_tls_connection(ctx, bsock->m_fd);
    if (!tls) {
-      Mmsg(bsock->errmsg, _("[%cE0016] TLS connection initialization failed.\n"), component_code);
+      Mmsg(bsock->errmsg, _("[%cE0066] TLS connection initialization failed.\n"), component_code);
       return false;
    }
 
    if (get_tls_psk_context(ctx)) {
       if (!psk_shared_key || !psk_set_shared_key(tls, psk_shared_key)) {
-         MmsgD1(10, bsock->errmsg, _("[%cE0016] Cannot setup TLS-PSK shared key\n"), component_code);
+         MmsgD1(10, bsock->errmsg, _("[%cE0066] Cannot setup TLS-PSK shared key\n"), component_code);
          goto err;
       }
    }
@@ -80,13 +80,13 @@ bool bnet_tls_server(TLS_CONTEXT *ctx, BSOCK * bsock, alist *verify_list,
 
    /* Initiate TLS Negotiation */
    if (!tls_bsock_accept(bsock)) {
-      Mmsg(bsock->errmsg, _("[%cE0017] TLS Negotiation failed.\n"), component_code);
+      Mmsg(bsock->errmsg, _("[%cE0067] TLS Negotiation failed.\n"), component_code);
       goto err;
    }
    if (!get_tls_psk_context(ctx)) {
       if (verify_list) {
          if (!tls_postconnect_verify_cn(jcr, tls, verify_list)) {
-            Mmsg(bsock->errmsg, _("[%cE0018] TLS certificate verification failed."
+            Mmsg(bsock->errmsg, _("[%cE0068] TLS certificate verification failed."
                                   " Peer certificate did not match a required commonName\n"),
                  component_code);
             goto err;
@@ -115,13 +115,13 @@ bool bnet_tls_client(TLS_CONTEXT *ctx, BSOCK *bsock, alist *verify_list,
 
    tls  = new_tls_connection(ctx, bsock->m_fd);
    if (!tls) {
-      Mmsg(bsock->errmsg, _("[%cE0016] TLS connection initialization failed.\n"), component_code);
+      Mmsg(bsock->errmsg, _("[%cE0066] TLS connection initialization failed.\n"), component_code);
       return false;
    }
 
    if (get_tls_psk_context(ctx)) {
       if (!psk_shared_key || !psk_set_shared_key(tls, psk_shared_key)) {
-         MmsgD1(10, bsock->errmsg, "[%cE0017] Cannot setup TLS-PSK Password\n", component_code);
+         MmsgD1(10, bsock->errmsg, "[%cE0067] Cannot setup TLS-PSK Password\n", component_code);
          goto err;
       }
    }
@@ -137,7 +137,7 @@ bool bnet_tls_client(TLS_CONTEXT *ctx, BSOCK *bsock, alist *verify_list,
        * certificate's CN. Otherwise, we use standard host/CN matching. */
       if (verify_list) {
          if (!tls_postconnect_verify_cn(jcr, tls, verify_list)) {
-            Mmsg(bsock->errmsg, _("[%cE0018] TLS certificate verification failed."
+            Mmsg(bsock->errmsg, _("[%cE0068] TLS certificate verification failed."
                                   " Peer certificate did not match a required commonName\n"), component_code);
             goto err;
          }
@@ -145,7 +145,7 @@ bool bnet_tls_client(TLS_CONTEXT *ctx, BSOCK *bsock, alist *verify_list,
          /* If host is 127.0.0.1, try localhost */
          if (strcmp(bsock->host(), "127.0.0.1") != 0 ||
                 !tls_postconnect_verify_host(jcr, tls, "localhost")) {
-            Mmsg(bsock->errmsg, _("[%cE0018] TLS host certificate verification failed. Host name \"%s\" did not match presented certificate\n"), component_code, bsock->host());
+            Mmsg(bsock->errmsg, _("[%cE0068] TLS host certificate verification failed. Host name \"%s\" did not match presented certificate\n"), component_code, bsock->host());
             goto err;
          }
       }
@@ -163,14 +163,14 @@ err:
 bool bnet_tls_server(TLS_CONTEXT *ctx, BSOCK * bsock, alist *verify_list,
       const char *psk_shared_key)
 {
-   Mmsg(bsock->errmsg, _("[%cE0019] TLS enabled but not configured.\n"), component_code);
+   Mmsg(bsock->errmsg, _("[%cE0069] TLS enabled but not configured.\n"), component_code);
    return false;
 }
 
 bool bnet_tls_client(TLS_CONTEXT *ctx, BSOCK * bsock, alist *verify_list,
       const char *psk_shared_key)
 {
-   Mmsg(bsock->errmsg, _("[%cE0019] TLS enabled but not configured.\n"), component_code);
+   Mmsg(bsock->errmsg, _("[%cE0069] TLS enabled but not configured.\n"), component_code);
    return false;
 }
 
index 51c080365edc1fd0ccdede5e16fdb86be9884880..67b38cd98f14106d5f1f367a9cc0912bf593a61a 100644 (file)
@@ -263,7 +263,7 @@ bool BSOCKCORE::connect(JCR * jcr, int retry_interval, utime_t max_retry_time,
       bmicrosleep(retry_interval, 0);
       now = time(NULL);
       if (begin_time + max_retry_time <= now) {
-         Mmsg(errmsg, _("[%cE0009] Unable to connect to %s on %s:%d. ERR=%s\n"),
+         Mmsg(errmsg, _("[%cE0064] Unable to connect to %s on %s:%d. ERR=%s\n"),
               component_code, name, host, port, be.bstrerror());
          goto bail_out;
       }
@@ -339,7 +339,7 @@ bool BSOCKCORE::open(JCR *jcr, const char *name, char *host, char *service,
     */
    if ((addr_list = bnet_host2ipaddrs(host, 0, &errstr)) == NULL) {
       /* Note errstr is not malloc'ed */
-      MmsgD3(100, errmsg, _("[%cE0012] gethostbyname() for host \"%s\" failed: ERR=%s\n"),
+      MmsgD3(100, errmsg, _("[%cE0060] gethostbyname() for host \"%s\" failed: ERR=%s\n"),
            component_code, host, errstr);
       *fatal = 1;
       return false;
@@ -378,7 +378,7 @@ bool BSOCKCORE::open(JCR *jcr, const char *name, char *host, char *service,
 #endif
          default:
             *fatal = 1;
-            MmsgD4(300, errmsg,  _("[%cE0012] Socket open error. proto=%d port=%d. ERR=%s\n"),
+            MmsgD4(300, errmsg,  _("[%cE0061] Socket open error. proto=%d port=%d. ERR=%s\n"),
                    component_code, ipaddr->get_family(), ipaddr->get_port_host_order(),
                    be.bstrerror());
             break;
@@ -395,7 +395,7 @@ bool BSOCKCORE::open(JCR *jcr, const char *name, char *host, char *service,
             berrno be;
             save_errno = errno;
             *fatal = 1;
-            MmsgD3(300, errmsg, _("[%cE0013] Source address bind error. proto=%d. ERR=%s\n"),
+            MmsgD3(300, errmsg, _("[%cE0062] Source address bind error. proto=%d. ERR=%s\n"),
                    component_code, src_addr->get_family(), be.bstrerror() );
             if (sockfd >= 0) {
                socketClose(sockfd);
@@ -409,7 +409,7 @@ bool BSOCKCORE::open(JCR *jcr, const char *name, char *host, char *service,
        */
       if (setsockopt(sockfd, SOL_SOCKET, SO_KEEPALIVE, (sockopt_val_t)&turnon, sizeof(turnon)) < 0) {
          berrno be;
-         Qmsg2(jcr, M_WARNING, 0, _("[%cW0014] Cannot set SO_KEEPALIVE on socket: %s\n"),
+         Qmsg2(jcr, M_WARNING, 0, _("[%cW0063] Cannot set SO_KEEPALIVE on socket: %s\n"),
                component_code, be.bstrerror());
       }
 #if defined(TCP_KEEPIDLE)
@@ -417,7 +417,7 @@ bool BSOCKCORE::open(JCR *jcr, const char *name, char *host, char *service,
          int opt = heart_beat;
          if (setsockopt(sockfd, SOL_TCP, TCP_KEEPIDLE, (sockopt_val_t)&opt, sizeof(opt)) < 0) {
             berrno be;
-            Qmsg2(jcr, M_WARNING, 0, _("[%cW0014] Cannot set TCP_KEEPIDLE on socket: %s\n"),
+            Qmsg2(jcr, M_WARNING, 0, _("[%cW0063] Cannot set TCP_KEEPIDLE on socket: %s\n"),
                   component_code, be.bstrerror());
          }
       }
@@ -450,7 +450,7 @@ bool BSOCKCORE::open(JCR *jcr, const char *name, char *host, char *service,
     */
    if (setsockopt(sockfd, SOL_SOCKET, SO_KEEPALIVE, (sockopt_val_t)&turnon, sizeof(turnon)) < 0) {
       berrno be;
-      Qmsg2(jcr, M_WARNING, 0, _("[%cW0014] Cannot set SO_KEEPALIVE on socket: %s\n"),
+      Qmsg2(jcr, M_WARNING, 0, _("[%cW0063] Cannot set SO_KEEPALIVE on socket: %s\n"),
             component_code, be.bstrerror());
    }
    fin_init(jcr, sockfd, name, host, port, ipaddr->get_sockaddr());
index 1d15b1662d5e25ed29f881a47a8506918c1b5755..120c2b43d1b2e6378e0ce46b87052a748583d1cb 100644 (file)
@@ -744,7 +744,7 @@ static inline bool openssl_bsock_session_start(BSOCK *bsock, bool server)
          goto cleanup;
       case SSL_ERROR_ZERO_RETURN:
          /* TLS connection was cleanly shut down */
-         Mmsg(bsock->errmsg, _("[%cE0018] TLS Connect failure ERR="), component_code);
+         Mmsg(bsock->errmsg, _("[%cE0064] TLS Connect failure ERR="), component_code);
          openssl_post_errors(&bsock->errmsg);
          stat = false;
          goto cleanup;
@@ -758,7 +758,7 @@ static inline bool openssl_bsock_session_start(BSOCK *bsock, bool server)
          break;
       default:
          /* Socket Error Occurred */
-         Mmsg(bsock->errmsg, _("[%cE0018] TLS Connect failure. Check the passwords. ERR="), component_code);
+         Mmsg(bsock->errmsg, _("[%cE0064] TLS Connect failure. Check the passwords. ERR="), component_code);
          openssl_post_errors(&bsock->errmsg);
          stat = false;
          goto cleanup;
@@ -839,13 +839,13 @@ int tls_bsock_shutdown(BSOCKCORE *bsock)
             break;
          case SSL_ERROR_ZERO_RETURN:
             /* TLS connection was shut down on us via a TLS protocol-level closure */
-            Mmsg(bsock->errmsg, _("[%cW0019] TLS shutdown failure ERR="), component_code);
+            Mmsg(bsock->errmsg, _("[%cW0072] TLS shutdown failure ERR="), component_code);
             openssl_post_errors(&bsock->errmsg);
             err = -1;
             break;
          default:
             /* Socket Error Occurred */
-            Mmsg(bsock->errmsg, _("[%cW0019] TLS shutdown failure ERR="), component_code);
+            Mmsg(bsock->errmsg, _("[%cW0072] TLS shutdown failure ERR="), component_code);
             openssl_post_errors(&bsock->errmsg);
             err = -1;
             break;
index 2c34b69324baad6d19fc42e10dcdddbb5d5c41c4..1e2fca5062bb79505ddd5224826094af47cf4274 100644 (file)
@@ -303,7 +303,7 @@ bool DCR::write_block_to_dev()
             }
             dev->VolCatInfo.VolCatErrors++;
             Jmsg5(jcr, etype, 0, _("%s Write error at %s on device %s Vol=%s. ERR=%s.\n"),
-               etype==M_FATAL?"[SF0208]":"[SE0201]",
+               etype==M_FATAL?"[SF0201]":"[SE0201]",
                dev->print_addr(ed1, sizeof(ed1)), dev->print_name(),
                dev->getVolCatName(), be.bstrerror());
             if (dev->get_tape_alerts(this)) {
@@ -476,7 +476,7 @@ bool DCR::read_block_from_dev(bool check_block_numbers)
       return false;
    }
    if (!dev->enabled) {
-      Mmsg(dev->errmsg, _("[SF0210] Cannot write block. Device is disabled. dev=%s\n"), dev->print_name());
+      Mmsg(dev->errmsg, _("[SF023] Cannot read block. Device is disabled. dev=%s\n"), dev->print_name());
       Jmsg1(jcr, M_FATAL, 0, "%s", dev->errmsg);
       return false;
    }
@@ -490,7 +490,7 @@ bool DCR::read_block_from_dev(bool check_block_numbers)
    looping = 0;
 
    if (!dev->is_open()) {
-      Mmsg4(dev->errmsg, _("[SF0211] Attempt to read closed device: fd=%d at file:blk %u:%u on device %s\n"),
+      Mmsg4(dev->errmsg, _("[SF0206] Attempt to read closed device: fd=%d at file:blk %u:%u on device %s\n"),
          dev->fd(), dev->file, dev->block_num, dev->print_name());
       Jmsg(dcr->jcr, M_FATAL, 0, "%s", dev->errmsg);
       Pmsg4(000, "Fatal: dev=%p dcr=%p adata=%d bytes=%lld\n", dev, dcr, dev->adata,
index cca993583c0016f81fa9819d7e5100dfde836383..0428bbb6974627ef7f2517bb7713e4d6e30e469d 100644 (file)
@@ -226,7 +226,7 @@ void *handle_connection_request(void *arg)
    {
       SDAuthenticateDIR auth(jcr);
       if (!auth.authenticate_director()) {
-         Qmsg(jcr, M_FATAL, 0, _("[SF0100] Unable to authenticate Director\n"));
+         Qmsg(jcr, M_FATAL, 0, _("[SF0065] Unable to authenticate Director\n"));
          goto bail_out;
       }
    }
@@ -325,7 +325,7 @@ static bool client_cmd(JCR *jcr)
       /* destroy() OK because cl is local */
       cl->destroy();
       pm_strcpy(jcr->errmsg, dir->msg);
-      Jmsg(jcr, M_FATAL, 0, _("[SE0011] Bad client command: %s"), jcr->errmsg);
+      Jmsg(jcr, M_FATAL, 0, _("[SF0031] Bad client command: %s"), jcr->errmsg);
       Dmsg1(050, "Bad client command: %s", jcr->errmsg);
       goto bail_out;
    }
@@ -1227,7 +1227,7 @@ static DCR *find_device(JCR *jcr, POOL_MEM &devname,
                if (!device->dev) {
                   Dmsg1(100, "Device %s could not be opened. Skipped\n", devname.c_str());
                   Jmsg(jcr, M_WARNING, 0, _("\n"
-                     "[SW0107] Device \"%s\" in changer \"%s\" requested by DIR could not be opened or does not exist.\n"),
+                     "[SW0106] Device \"%s\" in changer \"%s\" requested by DIR could not be opened or does not exist.\n"),
                        device->hdr.name, devname.c_str());
                   continue;
                }
@@ -1305,7 +1305,7 @@ static DCR *find_any_device(JCR *jcr, POOL_MEM &devname,
                if (!device->dev) {
                   Dmsg1(100, "Device %s could not be opened. Skipped\n", devname.c_str());
                   Jmsg(jcr, M_WARNING, 0, _("\n"
-                     "[SW0109] Device \"%s\" in changer \"%s\" requested by DIR could not be opened or does not exist.\n"),
+                     "[SW0108] Device \"%s\" in changer \"%s\" requested by DIR could not be opened or does not exist.\n"),
                        device->hdr.name, devname.c_str());
                   continue;
                }
index d9cb1d95222f9d2b8b529d487e0b82c1396ee068..769aa5fa5b8c171192e654dec6adeded16d3c2ac 100644 (file)
@@ -144,7 +144,7 @@ DEVICE *init_dev(JCR *jcr, DEVRES *device, bool adata, bstatcollect *statcollect
       /* Check that device is available */
       if (stat(device->device_name, &statp) < 0) {
          berrno be;
-         Jmsg3(jcr, M_ERROR, 0, _("[SE0001] Unable to stat device %s at %s: ERR=%s\n"),
+         Jmsg3(jcr, M_ERROR, 0, _("[SE0017] Unable to stat device %s at %s: ERR=%s\n"),
             device->hdr.name, device->device_name, be.bstrerror());
          goto try_again_later;
       }
@@ -162,7 +162,7 @@ DEVICE *init_dev(JCR *jcr, DEVRES *device, bool adata, bstatcollect *statcollect
          device->dev_type = B_VTAPE_DEV;
 #endif
       } else if (!(device->cap_bits & CAP_REQMOUNT)) {
-         Jmsg2(jcr, M_ERROR, 0, _("[SE0002] %s is an unknown device type. Must be tape or directory."
+         Jmsg2(jcr, M_ERROR, 0, _("[SE0017] %s is an unknown device type. Must be tape or directory."
                " st_mode=%x\n"),
             device->device_name, statp.st_mode);
          goto try_again_later;
@@ -178,7 +178,7 @@ DEVICE *init_dev(JCR *jcr, DEVRES *device, bool adata, bstatcollect *statcollect
 
    /* If invalid dev_type get out */
    if (device->dev_type < 0 || device->dev_type > n_drivers) {
-      Jmsg2(jcr, M_FATAL, 0, _("[SF0001] Invalid device type=%d name=\"%s\"\n"),
+      Jmsg2(jcr, M_FATAL, 0, _("[SF0017] Invalid device type=%d name=\"%s\"\n"),
          device->dev_type, device->hdr.name);
       goto never_try_again;
    }
@@ -221,7 +221,7 @@ DEVICE *init_dev(JCR *jcr, DEVRES *device, bool adata, bstatcollect *statcollect
          break;
 #endif
       default:
-         Jmsg2(jcr, M_FATAL, 0, _("[SF0002] Unknown device type=%d device=\"%s\"\n"),
+         Jmsg2(jcr, M_FATAL, 0, _("[SF0017] Unknown device type=%d device=\"%s\"\n"),
             device->dev_type, device->hdr.name);
          goto never_try_again;
       }