From: Eric Bollengier Date: Tue, 8 Feb 2011 16:25:14 +0000 (+0100) Subject: Rename ua->err to ua->errmsg X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=69e192c8832ebb79d7972df8a9f9f72c14984261;p=bacula%2Fbacula Rename ua->err to ua->errmsg --- diff --git a/bacula/src/dird/ua.h b/bacula/src/dird/ua.h index bd116985f5..e6ad35bb09 100644 --- a/bacula/src/dird/ua.h +++ b/bacula/src/dird/ua.h @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2001-2007 Free Software Foundation Europe e.V. + Copyright (C) 2001-2011 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. @@ -30,7 +30,6 @@ * * Kern Sibbald, August MMI * - * Version $Id$ */ #ifndef __UA_H_ @@ -46,7 +45,7 @@ public: CONRES *cons; /* console resource */ POOLMEM *cmd; /* return command/name buffer */ POOLMEM *args; /* command line arguments */ - POOLMEM *err; /* store error message */ + POOLMEM *errmsg; /* store error message */ char *argk[MAX_CMD_ARGS]; /* argument keywords */ char *argv[MAX_CMD_ARGS]; /* argument values */ int argc; /* number of arguments */ diff --git a/bacula/src/dird/ua_restore.c b/bacula/src/dird/ua_restore.c index 2802cc5a8a..67f4f3fa72 100644 --- a/bacula/src/dird/ua_restore.c +++ b/bacula/src/dird/ua_restore.c @@ -371,8 +371,8 @@ static int get_client_name(UAContext *ua, RESTORE_CTX *rx) i = find_arg_with_value(ua, NT_("backupclient")); } if (i >= 0) { - if (!is_name_valid(ua->argv[i], &ua->err)) { - ua->error_msg("%s argument: %s", ua->argk[i], ua->err); + if (!is_name_valid(ua->argv[i], &ua->errmsg)) { + ua->error_msg("%s argument: %s", ua->argk[i], ua->errmsg); return 0; } bstrncpy(rx->ClientName, ua->argv[i], sizeof(rx->ClientName)); @@ -398,8 +398,8 @@ static int get_restore_client_name(UAContext *ua, RESTORE_CTX &rx) /* try command line argument */ int i = find_arg_with_value(ua, NT_("restoreclient")); if (i >= 0) { - if (!is_name_valid(ua->argv[i], &ua->err)) { - ua->error_msg("%s argument: %s", ua->argk[i], ua->err); + if (!is_name_valid(ua->argv[i], &ua->errmsg)) { + ua->error_msg("%s argument: %s", ua->argk[i], ua->errmsg); return 0; } bstrncpy(rx.RestoreClientName, ua->argv[i], sizeof(rx.RestoreClientName)); @@ -1279,7 +1279,7 @@ static bool select_backups_before_date(UAContext *ua, RESTORE_CTX *rx, char *dat memset(&fsr, 0, sizeof(fsr)); i = find_arg_with_value(ua, "FileSet"); - if (i >= 0 && is_name_valid(ua->argv[i], &ua->err)) { + if (i >= 0 && is_name_valid(ua->argv[i], &ua->errmsg)) { bstrncpy(fsr.FileSet, ua->argv[i], sizeof(fsr.FileSet)); if (!db_get_fileset_record(ua->jcr, ua->db, &fsr)) { ua->error_msg(_("Error getting FileSet \"%s\": ERR=%s\n"), fsr.FileSet, @@ -1287,7 +1287,7 @@ static bool select_backups_before_date(UAContext *ua, RESTORE_CTX *rx, char *dat i = -1; } } else if (i >= 0) { /* name is invalid */ - ua->error_msg(_("FileSet argument: %s\n"), ua->err); + ua->error_msg(_("FileSet argument: %s\n"), ua->errmsg); } if (i < 0) { /* fileset not found */ diff --git a/bacula/src/dird/ua_server.c b/bacula/src/dird/ua_server.c index 71b729249f..0be9b9db04 100644 --- a/bacula/src/dird/ua_server.c +++ b/bacula/src/dird/ua_server.c @@ -195,7 +195,7 @@ UAContext *new_ua_context(JCR *jcr) ua->db = jcr->db; ua->cmd = get_pool_memory(PM_FNAME); ua->args = get_pool_memory(PM_FNAME); - ua->err = get_pool_memory(PM_FNAME); + ua->errmsg = get_pool_memory(PM_FNAME); ua->verbose = true; ua->automount = true; return ua; @@ -209,8 +209,8 @@ void free_ua_context(UAContext *ua) if (ua->args) { free_pool_memory(ua->args); } - if (ua->err) { - free_pool_memory(ua->err); + if (ua->errmsg) { + free_pool_memory(ua->errmsg); } if (ua->prompt) { free(ua->prompt);