BuildRequires: libart_lgpl-devel >= 2.0
BuildRequires: libbonobo-devel >= 2.0
BuildRequires: libbonoboui-devel >= 2.0
-BuildRequires: bonobo-activation-devel >= 2.0
+BuildRequires: bonobo-activation-devel
BuildRequires: GConf2-devel
BuildRequires: linc-devel
%endif
Requires: libart_lgpl >= 2.0
Requires: libbonobo >= 2.0
Requires: libbonoboui >= 2.0
-Requires: bonobo-activation >= 2.0
+Requires: bonobo-activation
Requires: GConf2
Requires: linc
%endif
# patch the make_sqlite_tables script for installation bindir
patch src/cats/make_sqlite_tables.in src/cats/make_sqlite_tables.in.patch
+# patch the create_sqlite_database script for installation bindir
+patch src/cats/create_sqlite_database.in src/cats/create_sqlite_database.in.patch
+
# patch the make_catalog_backup script for installation bindir
patch src/cats/make_catalog_backup.in src/cats/make_catalog_backup.in.patch
--with-scriptdir=/etc/bacula \
--enable-smartalloc \
--enable-gnome \
- --enable-static-fd \
+ --enable-static-fd \
%if %{mysql}
--with-mysql \
%else
# add execute permission for console
chmod 0755 /usr/sbin/gnome-console
-# create the tables
+# create the database and tables
+echo "Creating SQLite database..."
+/etc/bacula/create_sqlite_database
+echo "Creating the SQLite tables..."
/etc/bacula/make_sqlite_tables
%preun sqlite
rm -rf /etc/bacula/rescue/diskinfo/*
%changelog
+* Sat Jan 24 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
+- added patch for create_sqlite_database to fix the installed bindir
+- added execute of create_sqlite_database to post of sqlite package
* Sat Jan 10 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
- added virtual package Provides bacula-dir, bacula-sd, bacula-fd
- added bacula-fd as Requires for rescue package
--- /dev/null
+5c5
+< bindir=@SQL_BINDIR@
+---
+> bindir=/usr/lib/sqlite
LockRes();
CONRES *cons = (CONRES *)GetNextRes(R_CONSOLE, (RES *)NULL);
UnlockRes();
+ /* If cons==NULL, default console will be used */
if (!authenticate_director(&jcr, dir, cons)) {
fprintf(stderr, "ERR=%s", UA_sock->msg);
terminate_console(0);
<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
<glade-interface>
+<requires lib="gnome"/>
<widget class="GtkWindow" id="app1">
<property name="visible">True</property>
</child>
<child>
- <widget class="GtkHBox" id="hbox28">
+ <widget class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xscale">1</property>
+ <property name="yscale">1</property>
<child>
- <widget class="GtkHBox" id="hbox29">
+ <widget class="GtkHBox" id="hbox28">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">0</property>
<child>
- <widget class="GtkLabel" id="label63">
+ <widget class="GtkHBox" id="hbox29">
<property name="visible">True</property>
- <property name="label" translatable="yes">Job:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_RIGHT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
- <child>
- <widget class="GtkCombo" id="combo_job">
- <property name="visible">True</property>
- <property name="value_in_list">True</property>
- <property name="allow_empty">False</property>
- <property name="case_sensitive">False</property>
- <property name="enable_arrow_keys">True</property>
- <property name="enable_arrows_always">False</property>
-
- <child internal-child="entry">
- <widget class="GtkEntry" id="entry_job">
+ <child>
+ <widget class="GtkLabel" id="label63">
+ <property name="width_request">66</property>
+ <property name="height_request">16</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">False</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- <signal name="changed" handler="on_entry_job_changed"/>
+ <property name="label" translatable="yes">Job:</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_RIGHT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
</widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
</child>
- <child internal-child="list">
- <widget class="GtkList" id="convertwidget6">
+ <child>
+ <widget class="GtkCombo" id="combo_job">
<property name="visible">True</property>
- <property name="selection_mode">GTK_SELECTION_BROWSE</property>
+ <property name="value_in_list">True</property>
+ <property name="allow_empty">False</property>
+ <property name="case_sensitive">False</property>
+ <property name="enable_arrow_keys">True</property>
+ <property name="enable_arrows_always">False</property>
+
+ <child internal-child="entry">
+ <widget class="GtkEntry" id="entry_job">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">False</property>
+ <property name="visibility">True</property>
+ <property name="max_length">0</property>
+ <property name="text" translatable="yes"></property>
+ <property name="has_frame">True</property>
+ <property name="invisible_char" translatable="yes">*</property>
+ <property name="activates_default">False</property>
+ <signal name="changed" handler="on_entry_job_changed"/>
+ </widget>
+ </child>
- <child>
- <widget class="GtkListItem" id="convertwidget7">
+ <child internal-child="list">
+ <widget class="GtkList" id="convertwidget6">
<property name="visible">True</property>
+ <property name="selection_mode">GTK_SELECTION_BROWSE</property>
<child>
- <widget class="GtkLabel" id="convertwidget8">
+ <widget class="GtkListItem" id="convertwidget7">
<property name="visible">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
+
+ <child>
+ <widget class="GtkLabel" id="convertwidget8">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"></property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ </child>
</widget>
</child>
</widget>
</child>
</widget>
+ <packing>
+ <property name="padding">1</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
</child>
- </widget>
- <packing>
- <property name="padding">1</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label64">
- <property name="visible">True</property>
- <property name="label" translatable="yes"> Type:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <widget class="GtkCombo" id="combo_type">
- <property name="visible">True</property>
- <property name="value_in_list">True</property>
- <property name="allow_empty">False</property>
- <property name="case_sensitive">False</property>
- <property name="enable_arrow_keys">True</property>
- <property name="enable_arrows_always">False</property>
-
- <child internal-child="entry">
- <widget class="GtkEntry" id="entry_type">
+ <child>
+ <widget class="GtkLabel" id="label64">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">False</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
+ <property name="label" translatable="yes"> Type:</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_CENTER</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
</widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
</child>
- <child internal-child="list">
- <widget class="GtkList" id="convertwidget9">
+ <child>
+ <widget class="GtkCombo" id="combo_type">
+ <property name="width_request">141</property>
+ <property name="height_request">24</property>
<property name="visible">True</property>
- <property name="selection_mode">GTK_SELECTION_BROWSE</property>
+ <property name="value_in_list">True</property>
+ <property name="allow_empty">False</property>
+ <property name="case_sensitive">False</property>
+ <property name="enable_arrow_keys">True</property>
+ <property name="enable_arrows_always">False</property>
+
+ <child internal-child="entry">
+ <widget class="GtkEntry" id="entry_type">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">False</property>
+ <property name="visibility">True</property>
+ <property name="max_length">0</property>
+ <property name="text" translatable="yes"></property>
+ <property name="has_frame">True</property>
+ <property name="invisible_char" translatable="yes">*</property>
+ <property name="activates_default">False</property>
+ </widget>
+ </child>
- <child>
- <widget class="GtkListItem" id="convertwidget10">
+ <child internal-child="list">
+ <widget class="GtkList" id="convertwidget9">
<property name="visible">True</property>
+ <property name="selection_mode">GTK_SELECTION_BROWSE</property>
<child>
- <widget class="GtkLabel" id="convertwidget11">
+ <widget class="GtkListItem" id="convertwidget10">
<property name="visible">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
+
+ <child>
+ <widget class="GtkLabel" id="convertwidget11">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"></property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ </child>
</widget>
</child>
</widget>
</child>
</widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
</child>
</widget>
<packing>
- <property name="padding">6</property>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label114">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"> </property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">30</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
</widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label65">
- <property name="visible">True</property>
- <property name="label" translatable="yes"> </property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">30</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
</child>
</widget>
<packing>
<child>
<widget class="GtkLabel" id="label66">
+ <property name="width_request">65</property>
+ <property name="height_request">16</property>
<property name="visible">True</property>
<property name="label" translatable="yes">Client:</property>
<property name="use_underline">False</property>
<child>
<widget class="GtkLabel" id="label68">
+ <property name="width_request">66</property>
+ <property name="height_request">16</property>
<property name="visible">True</property>
<property name="label" translatable="yes">FileSet: </property>
<property name="use_underline">False</property>
<child>
<widget class="GtkButton" id="view_fileset_button">
+ <property name="width_request">93</property>
+ <property name="height_request">26</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes"> View FileSet </property>
<child>
<widget class="GtkLabel" id="label70">
+ <property name="width_request">66</property>
+ <property name="height_request">16</property>
<property name="visible">True</property>
<property name="label" translatable="yes">Level:</property>
<property name="use_underline">False</property>
<child>
<widget class="GtkLabel" id="label72">
+ <property name="width_request">66</property>
+ <property name="height_request">16</property>
<property name="visible">True</property>
<property name="label" translatable="yes">Pool:</property>
<property name="use_underline">False</property>
<child>
<widget class="GtkLabel" id="label96">
+ <property name="width_request">66</property>
+ <property name="height_request">16</property>
<property name="visible">True</property>
<property name="label" translatable="yes">Storage:</property>
<property name="use_underline">False</property>
<child>
<widget class="GtkLabel" id="label98">
+ <property name="width_request">66</property>
+ <property name="height_request">16</property>
<property name="visible">True</property>
<property name="label" translatable="yes">Messages:</property>
<property name="use_underline">False</property>
<child>
<widget class="GtkLabel" id="label77">
+ <property name="width_request">66</property>
+ <property name="height_request">16</property>
<property name="visible">True</property>
<property name="label" translatable="yes">Where: </property>
<property name="use_underline">False</property>
<child>
<widget class="GtkLabel" id="label100">
+ <property name="width_request">66</property>
+ <property name="height_request">16</property>
<property name="visible">True</property>
<property name="label" translatable="yes">When:</property>
<property name="use_underline">False</property>
pool = (POOL *)GetResWithName(R_POOL, pool_name);
if (!pool) {
bsendmsg(ua, _("Pool \"%s\" not found.\n"), pool_name);
- pool = get_pool_resource(ua);
+ pool = select_pool_resource(ua);
}
} else {
pool = job->pool; /* use default */
}
+ if (!pool) {
+ return 1;
+ }
if (client_name) {
client = (CLIENT *)GetResWithName(R_CLIENT, client_name);
/* Static variables */
static char *configfile = NULL;
static DIRRES *dir;
-static CONRES *con;
static int ndir;
static int director_reader_running = FALSE;
static bool at_prompt = false;
int test_config = FALSE;
int gargc = 1;
char *gargv[2] = {"gnome-console", NULL};
+ CONFONTRES *con_font;
init_stack_dump();
my_name_is(argc, argv, "gnome-console");
*/
LockRes();
- foreach_res(con, R_CONSOLE) {
- if (!con->fontface) {
- Dmsg1(400, "No fontface for %s\n", con->hdr.name);
+ foreach_res(con_font, R_CONSOLE_FONT) {
+ if (!con_font->fontface) {
+ Dmsg1(400, "No fontface for %s\n", con_font->hdr.name);
continue;
}
- text_font = gdk_font_load(con->fontface);
+ text_font = gdk_font_load(con_font->fontface);
if (text_font == NULL) {
Dmsg2(400, "Load of requested ConsoleFont \"%s\" (%s) failed!\n",
- con->hdr.name, con->fontface);
+ con_font->hdr.name, con_font->fontface);
} else {
Dmsg2(400, "ConsoleFont \"%s\" (%s) loaded.\n",
- con->hdr.name, con->fontface);
+ con_font->hdr.name, con_font->fontface);
break;
}
}
jcr.dir_bsock = UA_sock;
LockRes();
+ /* If cons==NULL, default console will be used */
CONRES *cons = (CONRES *)GetNextRes(R_CONSOLE, (RES *)NULL);
UnlockRes();
if (!authenticate_director(&jcr, dir, cons)) {
* information.
*/
static struct res_items dir_items[] = {
- {"name", store_name, ITEM(res_dir.hdr.name), 0, ITEM_REQUIRED, 0},
- {"description", store_str, ITEM(res_dir.hdr.desc), 0, 0, 0},
- {"dirport", store_int, ITEM(res_dir.DIRport), 0, ITEM_DEFAULT, 9101},
- {"address", store_str, ITEM(res_dir.address), 0, ITEM_REQUIRED, 0},
- {"password", store_password, ITEM(res_dir.password), 0, 0, 0},
- {"enablessl", store_yesno, ITEM(res_dir.enable_ssl), 1, ITEM_DEFAULT, 0},
+ {"name", store_name, ITEM(dir_res.hdr.name), 0, ITEM_REQUIRED, 0},
+ {"description", store_str, ITEM(dir_res.hdr.desc), 0, 0, 0},
+ {"dirport", store_int, ITEM(dir_res.DIRport), 0, ITEM_DEFAULT, 9101},
+ {"address", store_str, ITEM(dir_res.address), 0, ITEM_REQUIRED, 0},
+ {"password", store_password, ITEM(dir_res.password), 0, 0, 0},
+ {"enablessl", store_yesno, ITEM(dir_res.enable_ssl), 1, ITEM_DEFAULT, 0},
{NULL, NULL, NULL, 0, 0, 0}
};
static struct res_items con_items[] = {
- {"name", store_name, ITEM(con_dir.hdr.name), 0, ITEM_REQUIRED, 0},
- {"description", store_str, ITEM(con_dir.hdr.desc), 0, 0, 0},
- {"font", store_str, ITEM(con_dir.fontface), 0, 0, 0},
- {"password", store_password, ITEM(con_dir.password), 0, ITEM_REQUIRED, 0},
- {"requiressl", store_yesno, ITEM(con_dir.require_ssl), 1, ITEM_DEFAULT, 0},
+ {"name", store_name, ITEM(con_res.hdr.name), 0, ITEM_REQUIRED, 0},
+ {"description", store_str, ITEM(con_res.hdr.desc), 0, 0, 0},
+ {"password", store_password, ITEM(con_res.password), 0, ITEM_REQUIRED, 0},
+ {"requiressl", store_yesno, ITEM(con_res.require_ssl), 1, ITEM_DEFAULT, 0},
{NULL, NULL, NULL, 0, 0, 0}
};
+static struct res_items con_font_items[] = {
+ {"name", store_name, ITEM(con_font.hdr.name), 0, ITEM_REQUIRED, 0},
+ {"description", store_str, ITEM(con_font.hdr.desc), 0, 0, 0},
+ {"font", store_str, ITEM(con_font.fontface), 0, 0, 0},
+ {"requiressl", store_yesno, ITEM(con_font.require_ssl), 1, ITEM_DEFAULT, 0},
+ {NULL, NULL, NULL, 0, 0, 0}
+};
+
+
/*
* This is the master resource definition.
* It must have one item for each of the resources.
struct s_res resources[] = {
{"director", dir_items, R_DIRECTOR, NULL},
{"console", con_items, R_CONSOLE, NULL},
+ {"consolefont", con_font_items, R_CONSOLE_FONT, NULL},
{NULL, NULL, 0, NULL}
};
switch (type) {
case R_DIRECTOR:
printf("Director: name=%s address=%s DIRport=%d\n", reshdr->name,
- res->res_dir.address, res->res_dir.DIRport);
+ res->dir_res.address, res->dir_res.DIRport);
break;
case R_CONSOLE:
- printf("Console: name=%s font face=%s\n",
- reshdr->name, NPRT(res->con_dir.fontface));
+ printf("Console: name=%s\n", reshdr->name);
+ break;
+ case R_CONSOLE_FONT:
+ printf("ConsoleFont: name=%s font face=%s\n",
+ reshdr->name, NPRT(res->con_font.fontface));
break;
default:
printf("Unknown resource type %d\n", type);
}
- if (recurse && res->res_dir.hdr.next) {
- dump_resource(type, res->res_dir.hdr.next, sendit, sock);
+ if (recurse && res->dir_res.hdr.next) {
+ dump_resource(type, res->dir_res.hdr.next, sendit, sock);
}
}
return;
/* common stuff -- free the resource name */
- nres = (RES *)res->res_dir.hdr.next;
- if (res->res_dir.hdr.name) {
- free(res->res_dir.hdr.name);
+ nres = (RES *)res->dir_res.hdr.next;
+ if (res->dir_res.hdr.name) {
+ free(res->dir_res.hdr.name);
}
- if (res->res_dir.hdr.desc) {
- free(res->res_dir.hdr.desc);
+ if (res->dir_res.hdr.desc) {
+ free(res->dir_res.hdr.desc);
}
switch (type) {
case R_DIRECTOR:
- if (res->res_dir.address) {
- free(res->res_dir.address);
+ if (res->dir_res.address) {
+ free(res->dir_res.address);
}
break;
case R_CONSOLE:
- if (res->con_dir.fontface) {
- free(res->con_dir.fontface);
+ if (res->con_res.password) {
+ free(res->con_res.password);
+ }
+ break;
+ case R_CONSOLE_FONT:
+ if (res->con_font.fontface) {
+ free(res->con_font.fontface);
}
break;
default:
*/
for (i=0; items[i].name; i++) {
if (items[i].flags & ITEM_REQUIRED) {
- if (!bit_is_set(i, res_all.res_dir.hdr.item_present)) {
+ if (!bit_is_set(i, res_all.dir_res.hdr.item_present)) {
Emsg2(M_ABORT, 0, "%s item is required in %s resource, but not found.\n",
items[i].name, resources[rindex]);
}
break;
case R_CONSOLE:
+ case R_CONSOLE_FONT:
break;
default:
/* Note, the resoure name was already saved during pass 1,
* so here, we can just release it.
*/
- if (res_all.res_dir.hdr.name) {
- free(res_all.res_dir.hdr.name);
- res_all.res_dir.hdr.name = NULL;
+ if (res_all.dir_res.hdr.name) {
+ free(res_all.dir_res.hdr.name);
+ res_all.dir_res.hdr.name = NULL;
}
- if (res_all.res_dir.hdr.desc) {
- free(res_all.res_dir.hdr.desc);
- res_all.res_dir.hdr.desc = NULL;
+ if (res_all.dir_res.hdr.desc) {
+ free(res_all.dir_res.hdr.desc);
+ res_all.dir_res.hdr.desc = NULL;
}
return;
}
case R_DIRECTOR:
size = sizeof(DIRRES);
break;
+ case R_CONSOLE_FONT:
+ size = sizeof(CONFONTRES);
+ break;
case R_CONSOLE:
size = sizeof(CONRES);
break;
RES *next;
/* Add new res to end of chain */
for (next=resources[rindex].res_head; next->next; next=next->next) {
- if (strcmp(next->name, res->res_dir.hdr.name) == 0) {
+ if (strcmp(next->name, res->dir_res.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);
+ resources[rindex].name, res->dir_res.hdr.name);
}
}
next->next = (RES *)res;
Dmsg2(90, "Inserting %s res: %s\n", res_to_str(type),
- res->res_dir.hdr.name);
+ res->dir_res.hdr.name);
}
}
}
enum {
R_DIRECTOR = 1001,
R_CONSOLE,
+ R_CONSOLE_FONT,
};
#define R_FIRST R_DIRECTOR
-#define R_LAST R_CONSOLE
+#define R_LAST R_CONSOLE_FONT
/*
* Some resource attributes
};
typedef struct s_res_dir DIRRES;
-struct s_con_dir {
+struct s_con_font {
RES hdr;
char *fontface; /* Console Font specification */
+ int require_ssl; /* Require SSL on all connections */
+};
+typedef struct s_con_font CONFONTRES;
+
+struct s_con_res {
+ RES hdr;
char *password; /* UA server password */
int require_ssl; /* Require SSL on all connections */
};
-typedef struct s_con_dir CONRES;
+typedef struct s_con_res CONRES;
+
/* Define the Union of all the above
* resource structure definitions.
*/
union u_res {
- struct s_res_dir res_dir;
- struct s_con_dir con_dir;
+ struct s_res_dir dir_res;
+ struct s_con_font con_font;
+ struct s_con_res con_res;
RES hdr;
};
GtkWidget *vbox11;
GtkWidget *vbox12;
GtkWidget *label62;
+ GtkWidget *alignment1;
GtkWidget *hbox28;
GtkWidget *hbox29;
GtkWidget *label63;
GtkWidget *combo_type;
GList *combo_type_items = NULL;
GtkWidget *entry_type;
- GtkWidget *label65;
+ GtkWidget *label114;
GtkWidget *hbox30;
GtkWidget *label66;
GtkWidget *combo_client;
gtk_box_pack_start (GTK_BOX (vbox12), label62, FALSE, FALSE, 2);
gtk_misc_set_padding (GTK_MISC (label62), 0, 9);
+ alignment1 = gtk_alignment_new (0.5, 0.5, 1, 1);
+ gtk_widget_show (alignment1);
+ gtk_box_pack_start (GTK_BOX (vbox12), alignment1, FALSE, FALSE, 2);
+
hbox28 = gtk_hbox_new (FALSE, 0);
gtk_widget_show (hbox28);
- gtk_box_pack_start (GTK_BOX (vbox12), hbox28, FALSE, FALSE, 2);
+ gtk_container_add (GTK_CONTAINER (alignment1), hbox28);
hbox29 = gtk_hbox_new (FALSE, 0);
gtk_widget_show (hbox29);
label63 = gtk_label_new (_("Job:"));
gtk_widget_show (label63);
gtk_box_pack_start (GTK_BOX (hbox29), label63, FALSE, FALSE, 0);
+ gtk_widget_set_size_request (label63, 66, 16);
gtk_label_set_justify (GTK_LABEL (label63), GTK_JUSTIFY_RIGHT);
combo_job = gtk_combo_new ();
g_object_set_data (G_OBJECT (GTK_COMBO (combo_type)->popwin),
"GladeParentKey", combo_type);
gtk_widget_show (combo_type);
- gtk_box_pack_start (GTK_BOX (hbox29), combo_type, FALSE, FALSE, 6);
+ gtk_box_pack_start (GTK_BOX (hbox29), combo_type, FALSE, FALSE, 0);
+ gtk_widget_set_size_request (combo_type, 141, 24);
gtk_combo_set_value_in_list (GTK_COMBO (combo_type), TRUE, FALSE);
combo_type_items = g_list_append (combo_type_items, (gpointer) "");
gtk_combo_set_popdown_strings (GTK_COMBO (combo_type), combo_type_items);
gtk_widget_show (entry_type);
gtk_editable_set_editable (GTK_EDITABLE (entry_type), FALSE);
- label65 = gtk_label_new (_(" "));
- gtk_widget_show (label65);
- gtk_box_pack_start (GTK_BOX (hbox28), label65, FALSE, FALSE, 30);
+ label114 = gtk_label_new (_(" "));
+ gtk_widget_show (label114);
+ gtk_box_pack_start (GTK_BOX (hbox28), label114, FALSE, FALSE, 30);
+ gtk_label_set_justify (GTK_LABEL (label114), GTK_JUSTIFY_LEFT);
hbox30 = gtk_hbox_new (FALSE, 0);
gtk_widget_show (hbox30);
label66 = gtk_label_new (_("Client:"));
gtk_widget_show (label66);
gtk_box_pack_start (GTK_BOX (hbox30), label66, FALSE, FALSE, 0);
+ gtk_widget_set_size_request (label66, 65, 16);
gtk_label_set_justify (GTK_LABEL (label66), GTK_JUSTIFY_RIGHT);
combo_client = gtk_combo_new ();
label68 = gtk_label_new (_("FileSet: "));
gtk_widget_show (label68);
gtk_box_pack_start (GTK_BOX (hbox31), label68, FALSE, FALSE, 0);
+ gtk_widget_set_size_request (label68, 66, 16);
gtk_label_set_justify (GTK_LABEL (label68), GTK_JUSTIFY_RIGHT);
combo_fileset = gtk_combo_new ();
view_fileset_button = gtk_button_new_with_mnemonic (_(" View FileSet "));
gtk_widget_show (view_fileset_button);
gtk_box_pack_start (GTK_BOX (hbox31), view_fileset_button, FALSE, TRUE, 10);
+ gtk_widget_set_size_request (view_fileset_button, 93, 26);
label69 = gtk_label_new (_(" "));
gtk_widget_show (label69);
label70 = gtk_label_new (_("Level:"));
gtk_widget_show (label70);
gtk_box_pack_start (GTK_BOX (hbox32), label70, FALSE, FALSE, 0);
+ gtk_widget_set_size_request (label70, 66, 16);
gtk_label_set_justify (GTK_LABEL (label70), GTK_JUSTIFY_RIGHT);
combo_level = gtk_combo_new ();
label72 = gtk_label_new (_("Pool:"));
gtk_widget_show (label72);
gtk_box_pack_start (GTK_BOX (hbox33), label72, FALSE, FALSE, 0);
+ gtk_widget_set_size_request (label72, 66, 16);
combo_pool = gtk_combo_new ();
g_object_set_data (G_OBJECT (GTK_COMBO (combo_pool)->popwin),
label96 = gtk_label_new (_("Storage:"));
gtk_widget_show (label96);
gtk_box_pack_start (GTK_BOX (hbox39), label96, FALSE, FALSE, 0);
+ gtk_widget_set_size_request (label96, 66, 16);
combo_storage = gtk_combo_new ();
g_object_set_data (G_OBJECT (GTK_COMBO (combo_storage)->popwin),
label98 = gtk_label_new (_("Messages:"));
gtk_widget_show (label98);
gtk_box_pack_start (GTK_BOX (hbox40), label98, FALSE, FALSE, 0);
+ gtk_widget_set_size_request (label98, 66, 16);
combo_messages = gtk_combo_new ();
g_object_set_data (G_OBJECT (GTK_COMBO (combo_messages)->popwin),
label77 = gtk_label_new (_("Where: "));
gtk_widget_show (label77);
gtk_box_pack_start (GTK_BOX (hbox34), label77, FALSE, FALSE, 0);
+ gtk_widget_set_size_request (label77, 66, 16);
entry_where = gtk_entry_new ();
gtk_widget_show (entry_where);
label100 = gtk_label_new (_("When:"));
gtk_widget_show (label100);
gtk_box_pack_start (GTK_BOX (hbox41), label100, FALSE, FALSE, 0);
+ gtk_widget_set_size_request (label100, 66, 16);
entry_when = gtk_entry_new ();
gtk_widget_show (entry_when);
GLADE_HOOKUP_OBJECT (RunDialog, vbox11, "vbox11");
GLADE_HOOKUP_OBJECT (RunDialog, vbox12, "vbox12");
GLADE_HOOKUP_OBJECT (RunDialog, label62, "label62");
+ GLADE_HOOKUP_OBJECT (RunDialog, alignment1, "alignment1");
GLADE_HOOKUP_OBJECT (RunDialog, hbox28, "hbox28");
GLADE_HOOKUP_OBJECT (RunDialog, hbox29, "hbox29");
GLADE_HOOKUP_OBJECT (RunDialog, label63, "label63");
GLADE_HOOKUP_OBJECT (RunDialog, label64, "label64");
GLADE_HOOKUP_OBJECT (RunDialog, combo_type, "combo_type");
GLADE_HOOKUP_OBJECT (RunDialog, entry_type, "entry_type");
- GLADE_HOOKUP_OBJECT (RunDialog, label65, "label65");
+ GLADE_HOOKUP_OBJECT (RunDialog, label114, "label114");
GLADE_HOOKUP_OBJECT (RunDialog, hbox30, "hbox30");
GLADE_HOOKUP_OBJECT (RunDialog, label66, "label66");
GLADE_HOOKUP_OBJECT (RunDialog, combo_client, "combo_client");
else
parent = widget->parent;
if (!parent)
- parent = (GtkWidget *)g_object_get_data (G_OBJECT (widget), "GladeParentKey");
+ parent = (GtkWidget*) g_object_get_data (G_OBJECT (widget), "GladeParentKey");
if (parent == NULL)
break;
widget = parent;
int32_t pktsiz;
int32_t msglen;
- if (bsock->errors || bsock->terminated) {
+ if (bsock->errors || bsock->terminated || bsock->msglen > 1000000) {
return 0;
}
msglen = bsock->msglen;
- ASSERT(bsock->msglen < 1000000);
pktsiz = htonl((int32_t)bsock->msglen);
/* send int32_t containing size of data packet */
bsock->timer_start = watchdog_time; /* start timer */
bsock->out_msg_no++; /* increment message number */
if (bsock->msglen <= 0) { /* length only? */
- ASSERT(msglen == bsock->msglen);
return 1; /* yes, no data */
}
}
return 0;
}
- ASSERT(msglen == bsock->msglen);
return 1;
}
P(dev->mutex); /* Use P to avoid indefinite block */
if (!(dev->state & ST_OPENED)) {
- if (open_dev(dev, newname, READ_WRITE) < 0) {
- bnet_fsend(dir, _("3994 Connot open device: %s\n"), strerror_dev(dev));
- } else {
- label_volume_if_ok(jcr, dev, oldname, newname, poolname, slot, relabel);
- force_close_dev(dev);
- }
+ label_volume_if_ok(jcr, dev, oldname, newname, poolname, slot, relabel);
+ force_close_dev(dev);
/* Under certain "safe" conditions, we can steal the lock */
} else if (dev->dev_blocked &&
(dev->dev_blocked == BST_UNMOUNTED ||