]> git.sur5r.net Git - bacula/bacula/commitdiff
various see kes-1.33
authorKern Sibbald <kern@sibbald.com>
Sat, 24 Jan 2004 16:19:05 +0000 (16:19 +0000)
committerKern Sibbald <kern@sibbald.com>
Sat, 24 Jan 2004 16:19:05 +0000 (16:19 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1018 91ce42f0-d328-0410-95d8-f526ca767f89

12 files changed:
bacula/platforms/redhat/bacula.spec.in
bacula/src/cats/create_sqlite_database.in.patch [new file with mode: 0644]
bacula/src/console/console.c
bacula/src/console2.glade
bacula/src/dird/ua_run.c
bacula/src/gnome2-console/console.c
bacula/src/gnome2-console/console_conf.c
bacula/src/gnome2-console/console_conf.h
bacula/src/gnome2-console/interface.c
bacula/src/gnome2-console/support.c
bacula/src/lib/bnet.c
bacula/src/stored/dircmd.c

index 75c47ba49b5e0d3b5b1f7101081c531437355b59..8160b3f5be48534e204a14cb52b27ff3bd85ac1b 100644 (file)
@@ -56,7 +56,7 @@ BuildRequires: ORBit2-devel
 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
@@ -102,7 +102,7 @@ Requires: ORBit2
 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
@@ -204,6 +204,9 @@ cd ${cwd}
 # 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
 
@@ -214,7 +217,7 @@ 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
@@ -431,7 +434,10 @@ echo "Creating bacula tables..."
 # 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
@@ -518,6 +524,9 @@ rm -f /etc/bacula/rescue/sfdisk
 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
diff --git a/bacula/src/cats/create_sqlite_database.in.patch b/bacula/src/cats/create_sqlite_database.in.patch
new file mode 100644 (file)
index 0000000..85d2dcb
--- /dev/null
@@ -0,0 +1,4 @@
+5c5
+< bindir=@SQL_BINDIR@
+---
+> bindir=/usr/lib/sqlite
index 6436ab9a3549e23e4470ff775e47356b1fa3eedb..3e3dc3cf7bd1ab1658eb99335900d20362e8876b 100644 (file)
@@ -404,6 +404,7 @@ try_again:
    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);
index 2c2619445c32b04c76388e4e1e8967d9aff2e93f..c62ae83ae82825aae9f62c5d9d5a68ca1efd5f21 100644 (file)
@@ -2,6 +2,7 @@
 <!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>
index e95e050b06867492cb826fadbf2fc426cd1784f9..275340955668f3a4ce9ac1559b70ee3d27e96397 100644 (file)
@@ -289,11 +289,14 @@ int run_cmd(UAContext *ua, char *cmd)
       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);
index b0b9b2b9f6f171cde3d080a60ad9b47ebc39b9f4..02459c1ec6b607380c0696369f70449087b020c9 100644 (file)
@@ -68,7 +68,6 @@ static void set_scroll_bar_to_end(void);
 /* 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;
@@ -106,6 +105,7 @@ int main(int argc, char *argv[])
    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");
@@ -208,18 +208,18 @@ Without that I don't how to speak to the Director :-(\n"), configfile);
  */
 
    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;
        }          
    }
@@ -404,6 +404,7 @@ int connect_to_director(gpointer data)
    
    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)) {
index 813e353ab556eedabe372ca56cc469ef811ad9b6..5c798a04b0253aa5ea18e436bc241f205d7dfcc1 100644 (file)
@@ -67,24 +67,32 @@ int  res_all_size = sizeof(res_all);
  * 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.
@@ -92,6 +100,7 @@ static struct res_items con_items[] = {
 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}
 };
 
@@ -113,17 +122,20 @@ void dump_resource(int type, RES *reshdr, void sendit(void *sock, char *fmt, ...
    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);
    }
 }
 
@@ -146,23 +158,28 @@ void free_resource(int type)
       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:
@@ -192,7 +209,7 @@ void save_resource(int type, struct res_items *items, int pass)
     */
    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]);
             }
@@ -211,6 +228,7 @@ void save_resource(int type, struct res_items *items, int pass)
         break;
 
       case R_CONSOLE:
+      case R_CONSOLE_FONT:
         break;
 
       default:
@@ -221,13 +239,13 @@ void save_resource(int type, struct res_items *items, int pass)
       /* 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;
    }
@@ -237,6 +255,9 @@ void save_resource(int type, struct res_items *items, int pass)
    case R_DIRECTOR:
       size = sizeof(DIRRES);
       break;
+   case R_CONSOLE_FONT:
+      size = sizeof(CONFONTRES);
+      break;
    case R_CONSOLE:
       size = sizeof(CONRES);
       break;
@@ -255,15 +276,15 @@ void save_resource(int type, struct res_items *items, int pass)
         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);
       }
    }
 }
index c9dde14855956804053bb7a493524a12169e6297..9fba0fd7ddcb70a4b28affadc90f17be6886276e 100644 (file)
 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
@@ -41,20 +42,28 @@ struct s_res_dir {
 };
 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;
 };
 
index d536d15a2d6a2b8e3f2b643883ae2293217f2c8b..d9f585cbd010b91151e4cdd900b131f9063f0309 100644 (file)
@@ -601,6 +601,7 @@ create_RunDialog (void)
   GtkWidget *vbox11;
   GtkWidget *vbox12;
   GtkWidget *label62;
+  GtkWidget *alignment1;
   GtkWidget *hbox28;
   GtkWidget *hbox29;
   GtkWidget *label63;
@@ -611,7 +612,7 @@ create_RunDialog (void)
   GtkWidget *combo_type;
   GList *combo_type_items = NULL;
   GtkWidget *entry_type;
-  GtkWidget *label65;
+  GtkWidget *label114;
   GtkWidget *hbox30;
   GtkWidget *label66;
   GtkWidget *combo_client;
@@ -682,9 +683,13 @@ create_RunDialog (void)
   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);
@@ -693,6 +698,7 @@ create_RunDialog (void)
   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 ();
@@ -717,7 +723,8 @@ create_RunDialog (void)
   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);
@@ -727,9 +734,10 @@ create_RunDialog (void)
   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);
@@ -738,6 +746,7 @@ create_RunDialog (void)
   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 ();
@@ -765,6 +774,7 @@ create_RunDialog (void)
   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 ();
@@ -784,6 +794,7 @@ create_RunDialog (void)
   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);
@@ -796,6 +807,7 @@ create_RunDialog (void)
   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 ();
@@ -824,6 +836,7 @@ create_RunDialog (void)
   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),
@@ -851,6 +864,7 @@ create_RunDialog (void)
   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),
@@ -878,6 +892,7 @@ create_RunDialog (void)
   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),
@@ -904,6 +919,7 @@ create_RunDialog (void)
   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);
@@ -920,6 +936,7 @@ create_RunDialog (void)
   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);
@@ -972,6 +989,7 @@ create_RunDialog (void)
   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");
@@ -980,7 +998,7 @@ create_RunDialog (void)
   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");
index 7f065549dc4c97f29bffd70aa6e2e1f5e5090178..06a04b7dd5d757e2d10955d9aeb8ef062423ff04 100644 (file)
@@ -29,7 +29,7 @@ lookup_widget                          (GtkWidget       *widget,
       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;
index 76350d7d30b42fba30f9ef204e42fc79a89a902c..c55d953c5d22e3c0a4fe6bb481a8a1f8673cac56 100644 (file)
@@ -318,11 +318,10 @@ bnet_send(BSOCK *bsock)
    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 */
@@ -354,7 +353,6 @@ bnet_send(BSOCK *bsock)
 
    bsock->out_msg_no++;              /* increment message number */
    if (bsock->msglen <= 0) {         /* length only? */
-      ASSERT(msglen == bsock->msglen);
       return 1;                      /* yes, no data */
    }
 
@@ -381,7 +379,6 @@ bnet_send(BSOCK *bsock)
       }
       return 0;
    }
-   ASSERT(msglen == bsock->msglen);
    return 1;
 }
 
index b3ddd6341821d2953b4798ea5bc9f2824509bf80..89748b4c0d5e7d05e0acef0effc474739e5d00ff 100644 (file)
@@ -300,12 +300,8 @@ static int do_label(JCR *jcr, int relabel)
 
         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 ||