-/*
- * Configuration file parser for Bacula Storage daemon
- *
- * Kern Sibbald, March MM
- *
- * Version $Id$
- */
/*
Bacula® - The Network Backup Solution
- Copyright (C) 2000-2006 Free Software Foundation Europe e.V.
+ Copyright (C) 2000-2007 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.
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.
+ License as published by the Free Software Foundation and included
+ 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
(FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
Switzerland, email:ftf@fsfeurope.org.
*/
+/*
+ * Configuration file parser for Bacula Storage daemon
+ *
+ * Kern Sibbald, March MM
+ *
+ * Version $Id$
+ */
#include "bacula.h"
#include "stored.h"
{"tlskey", store_dir, ITEM(res_store.tls_keyfile), 0, 0, 0},
{"tlsdhfile", store_dir, ITEM(res_store.tls_dhfile), 0, 0, 0},
{"tlsallowedcn", store_alist_str, ITEM(res_store.tls_allowed_cns), 0, 0, 0},
+ {"clientconnectwait", store_time, ITEM(res_store.client_wait), 0, ITEM_DEFAULT, 30 * 60},
{NULL, NULL, {0}, 0, 0, 0}
};
if ((errstat = pthread_mutex_init(&res->res_changer.changer_mutex, NULL)) != 0) {
berrno be;
Jmsg1(NULL, M_ERROR_TERM, 0, _("Unable to init mutex: ERR=%s\n"),
- be.strerror(errstat));
+ be.bstrerror(errstat));
}
break;
default:
if (!res_head[rindex]) {
res_head[rindex] = (RES *)res; /* store first entry */
} else {
- RES *next;
+ RES *next, *last;
/* Add new res to end of chain */
- for (next=res_head[rindex]; next->next; next=next->next) {
+ 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,
_("Attempt to define second \"%s\" resource named \"%s\" is not permitted.\n"),
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);
}