From 7548c332b90a579dfd05741b8d5600dd8f9eacca Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Fri, 3 Sep 2010 17:24:15 +0200 Subject: [PATCH] Change FD protocol version to avoid error message when sending RestoreObjects --- bacula/src/dird/fd_cmds.c | 8 ++++++++ bacula/src/filed/authenticate.c | 7 +++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/bacula/src/dird/fd_cmds.c b/bacula/src/dird/fd_cmds.c index 57c38ddca8..6c51d03833 100644 --- a/bacula/src/dird/fd_cmds.c +++ b/bacula/src/dird/fd_cmds.c @@ -677,6 +677,14 @@ static int restore_object_handler(void *ctx, int num_fields, char **row) if (jcr->is_job_canceled()) { return 1; } + /* Old File Daemon doesn't handle restore objects */ + if (jcr->FDVersion < 3) { + Jmsg(jcr, M_WARNING, 0, _("Client \"%s\" may not be used to restore " + "this job. Please upgrade your client.\n"), + jcr->client->name()); + return 1; + } + fd->fsend("restoreobject JobId=%s %s,%s,%s,%s,%s,%s\n", row[0], row[1], row[2], row[3], row[4], row[5], row[6]); diff --git a/bacula/src/filed/authenticate.c b/bacula/src/filed/authenticate.c index ae926f34ae..2bff4e07e2 100644 --- a/bacula/src/filed/authenticate.c +++ b/bacula/src/filed/authenticate.c @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2000-2009 Free Software Foundation Europe e.V. + Copyright (C) 2000-2010 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,8 +30,6 @@ * * Kern Sibbald, October 2000 * - * Version $Id$ - * */ #include "bacula.h" @@ -43,8 +41,9 @@ const int dbglvl = 50; * prior to 10Mar08 no version * 1 10Mar08 * 2 13Mar09 - added the ability to restore from multiple storages + * 3 03Sep10 - added the restore object command for vss plugin */ -static char OK_hello[] = "2000 OK Hello 2\n"; +static char OK_hello[] = "2000 OK Hello 3\n"; static char Dir_sorry[] = "2999 Authentication failed.\n"; static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; -- 2.39.5