X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=bacula%2Fsrc%2Fwx-console%2Fconsole_conf.c;h=976794b2315a4b8e8fa879951e561accc56627f9;hb=b8224aab234012c2d127b84eceb160e99dd4a14d;hp=d6af64e00c1822154a43f2195b5005d8a71dc625;hpb=9cc60416baa0166420327c7f15f6ede12b4d06e8;p=bacula%2Fbacula diff --git a/bacula/src/wx-console/console_conf.c b/bacula/src/wx-console/console_conf.c index d6af64e00c..976794b231 100644 --- a/bacula/src/wx-console/console_conf.c +++ b/bacula/src/wx-console/console_conf.c @@ -20,23 +20,41 @@ * Kern Sibbald, January MM, September MM */ /* - 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. +*/ /* _("...") macro returns a wxChar*, so if we need a char*, we need to convert it with: * wxString(_("...")).mb_str(*wxConvCurrent) */ +/* Windows debug builds set _DEBUG which is used by wxWidgets to select their + * debug memory allocator. Unfortunately it conflicts with Bacula's SmartAlloc. + * So we turn _DEBUG off since we aren't interested in things it enables. + */ + #undef _DEBUG #include "bacula.h" @@ -302,15 +320,16 @@ void save_resource(int type, RES_ITEM *items, int pass) if (!res_head[rindex]) { res_head[rindex] = (RES *)res; /* store first entry */ } else { - RES *next; - for (next=res_head[rindex]; next->next; next=next->next) { + RES *next, *last; + for (last=next=res_head[rindex]; next; next=next->next) { + last = next; if (strcmp(next->name, res->res_dir.hdr.name) == 0) { Emsg2(M_ERROR_TERM, 0, wxString(_("Attempt to define second %s resource named \"%s\" is not permitted.\n")).mb_str(*wxConvCurrent), resources[rindex].name, res->res_dir.hdr.name); } } - next->next = (RES *)res; + last->next = (RES *)res; Dmsg2(90, "Inserting %s res: %s\n", res_to_str(type), res->res_dir.hdr.name); }