X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=bacula%2Fsrc%2Fstored%2Fstored.c;h=caa53f8a80d6353f5dad44f35cd6f8e319de14b7;hb=d6a1dde94e0ab1de2e40f5233e247f6bb0312761;hp=aa6c47ad07c7f319bb329f92920507264bdb531f;hpb=d7864ae5b7d0b363a8d88947d11ffdbedde1beb8;p=bacula%2Fbacula diff --git a/bacula/src/stored/stored.c b/bacula/src/stored/stored.c index aa6c47ad07..caa53f8a80 100644 --- a/bacula/src/stored/stored.c +++ b/bacula/src/stored/stored.c @@ -1,6 +1,8 @@ /* * Second generation Storage daemon. * + * Kern Sibbald, MM + * * It accepts a number of simple commands from the File daemon * and acts on them. When a request to append data is made, * it opens a data channel and accepts data from the @@ -10,19 +12,32 @@ * */ /* - Copyright (C) 2000-2006 Kern Sibbald + Bacula® - The Network Backup Solution - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - version 2 as amended with additional clauses defined in the - file LICENSE in the main source directory. + Copyright (C) 2000-2006 Free Software Foundation Europe e.V. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - the file LICENSE for additional details. + 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 + License as published by the Free Software Foundation plus additions + that are listed in the file LICENSE. - */ + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + 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 + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. + + Bacula® is a registered trademark of John Walker. + The licensor of Bacula is the Free Software Foundation Europe + (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich, + Switzerland, email:ftf@fsfeurope.org. +*/ #include "bacula.h" #include "stored.h" @@ -62,7 +77,7 @@ static workq_t dird_workq; /* queue for processing connections */ static void usage() { fprintf(stderr, _( -"Copyright (C) 2000-%s Kern Sibbald.\n" +PROG_COPYRIGHT "\nVersion: %s (%s)\n\n" "Usage: stored [options] [-c config_file] [config_file]\n" " -c use as configuration file\n" @@ -75,7 +90,7 @@ static void usage() " -u userid to \n" " -v verbose user messages\n" " -? print this message.\n" -"\n"), BYEAR, VERSION, BDATE); +"\n"), 2000, VERSION, BDATE); exit(1); } @@ -424,11 +439,7 @@ static void cleanup_old_files() pm_strcpy(cleanup, "/bin/rm -f "); #endif pm_strcat(cleanup, me->working_directory); - if (len > 0 && me->working_directory[len-1] != '/' -#if defined(HAVE_WIN32) - && me->working_directory[len-1] != '\\' -#endif - ) { + if (len > 0 && !IsPathSeparator(me->working_directory[len-1])) { pm_strcat(cleanup, "/"); } pm_strcat(cleanup, my_name); @@ -499,6 +510,13 @@ void *device_initialization(void *arg) free_dcr(dcr); jcr->dcr = NULL; } +#ifdef xxx + if (jcr->dcr) { + Dmsg1(000, "free_dcr=%p\n", jcr->dcr); + free_dcr(jcr->dcr); + jcr->dcr = NULL; + } +#endif free_jcr(jcr); init_done = true; UnlockRes();