]> git.sur5r.net Git - bacula/bacula/commitdiff
kes Add dynamic dll entry point for SHGetFolderPath to Win32 code.
authorKern Sibbald <kern@sibbald.com>
Thu, 11 Jan 2007 20:04:13 +0000 (20:04 +0000)
committerKern Sibbald <kern@sibbald.com>
Thu, 11 Jan 2007 20:04:13 +0000 (20:04 +0000)
     This *should* fix bug #747.
kes  Modify winbacula.nsi to substitute with g bin_dir_cmd. Should fix
     bug #742.

git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@3972 91ce42f0-d328-0410-95d8-f526ca767f89

13 files changed:
bacula/configure
bacula/kernstodo
bacula/src/dird/dird_conf.h
bacula/src/dird/job.c
bacula/src/filed/job.c
bacula/src/findlib/match.c
bacula/src/lib/parse_conf.c
bacula/src/stored/status.c
bacula/src/version.h
bacula/src/win32/compat/winapi.c
bacula/src/win32/installer/winbacula.nsi
bacula/src/win32/winapi.h
bacula/technotes-2.1

index e1e4c83aeeeacb08cf2e8c1991e23791bbdcde1d..3527148ab34718547bc7f4e4404cb452d4ff0b20 100755 (executable)
@@ -1439,6 +1439,8 @@ Optional Features:
   --enable-client-only    build client (File daemon) only disabled
   --enable-build-dird     enable building of dird (Director) enabled
   --enable-build-stored   enable building of stored (Storage daemon) enabled
+ --disable-conio disable conio support enabled
+
   --enable-ipv6                    enable ipv6 support enabled
 
   --disable-readline      disable readline support disable
@@ -14899,6 +14901,20 @@ else
 fi
 
 
+# ---------------------------------------------------
+# Check for conio (Bacula readline substitute)(
+# ---------------------------------------------------
+# this allows you to turn it completely off
+# Check whether --enable-conio was given.
+if test "${enable_conio+set}" = set; then
+  enableval=$enable_conio; if test x$enableval = xno; then
+     support_conio=no
+  fi
+
+fi
+
+
+
 # ---------------------------------------------------
 # Check for IPv6 support
 # ---------------------------------------------------
index ece693d3792a00facad51d3e2881f94143a2eb22..db38cc039556d2900bec89ecd18f49e02a448c58 100644 (file)
@@ -41,6 +41,7 @@ Document:
  
 
 Priority:
+- Add the OS version back to the Win32 client info.
 - Look at the possibility of adding "SET NAMES UTF8" for MySQL,
   and possibly changing the blobs into varchar.
 - Check if gnome-console works with TLS.
@@ -69,6 +70,9 @@ Projects:
   - Despool attributes in separate thread
   - Database speedups
   - Embedded MySQL
+  - Check why restore repeatedly sends Rechdrs between
+    each data chunk -- according to James Harper 9Jan07.
+  - Building the in memory restore tree is slow.
 - Features
   - Better scheduling  
   - Full at least once a month, ...
index ac4cfa109e78689f812f396e3e68190b0e4cf6cf..020a086ffe1230cdf83c3406cfcbd7dde8d6a874 100644 (file)
@@ -318,7 +318,8 @@ public:
    POOLMEM *store_source;
 
    /* Methods */
-   USTORE() { store = NULL; store_source = get_pool_memory(PM_MESSAGE); }
+   USTORE() { store = NULL; store_source = get_pool_memory(PM_MESSAGE); 
+              *store_source = 0; };
    ~USTORE() { destroy(); }   
    void set_source(const char *where);
    void destroy();
index e715d0edced31b3eb9d04a88245a69eaef74a15a..ebcd832ba6cd1a528244a13a877748d603129782 100644 (file)
@@ -399,10 +399,8 @@ bool cancel_job(UAContext *ua, JCR *jcr)
             USTORE store;
             if (jcr->rstorage) {
                store.store = jcr->rstore;
-               pm_strcpy(store.store_source, jcr->rstore_source);
             } else {
                store.store = jcr->wstore;
-               pm_strcpy(store.store_source, jcr->wstore_source);
             }
             set_wstorage(ua->jcr, &store);
          }
index dbec9bd976120dad2292dc868ba4b2a93720d475..51f8afcedce64bc32f294a4a7799a7fbbdc4b42c 100644 (file)
@@ -676,6 +676,7 @@ static void add_fileset(JCR *jcr, const char *item)
 
    /* Skip all lines we receive after an error */
    if (state == state_error) {
+      Dmsg0(100, "State=error return\n");
       return;
    }
 
@@ -687,6 +688,7 @@ static void add_fileset(JCR *jcr, const char *item)
     */
    if (subcode != ' ') {
       state = state_error;
+      Dmsg0(100, "Set state=error\n"); 
    }
    switch (code) {
    case 'I':
@@ -942,10 +944,6 @@ static void set_options(findFOPTS *fo, const char *opts)
          break;
       case 'S':
          switch(*(p + 1)) {
-         case ' ':
-            /* Old director did not specify SHA variant */
-            fo->flags |= FO_SHA1;
-            break;
          case '1':
             fo->flags |= FO_SHA1;
             p++;
@@ -961,10 +959,14 @@ static void set_options(findFOPTS *fo, const char *opts)
             break;
 #endif
          default:
-            /* Automatically downgrade to SHA-1 if an unsupported
-             * SHA variant is specified */
+            /*
+             * If 2 or 3 is seen here, SHA2 is not configured, so
+             *  eat the option, and drop back to SHA-1.
+             */
+            if (p[1] == '2' || p[1] == '3') {
+               p++;
+            }
             fo->flags |= FO_SHA1;
-            p++;
             break;
          }
          break;
@@ -999,7 +1001,6 @@ static void set_options(findFOPTS *fo, const char *opts)
       case 'Z':                 /* gzip compression */
          fo->flags |= FO_GZIP;
          fo->GZIP_level = *++p - '0';
-         Dmsg1(200, "Compression level=%d\n", fo->GZIP_level);
          break;
       case 'K':
          fo->flags |= FO_NOATIME;
index 90b9041aea393b5a8b8ec405c9b5d1310677e211..e08c863fdf72059788673f8d63bac7a4e93395b7 100644 (file)
@@ -245,7 +245,8 @@ void add_fname_to_include_list(FF_PKT *ff, int prefixed, const char *fname)
          { }
       next->next = inc;
    }
-   Dmsg1(50, "add_fname_to_include fname=%s\n", inc->fname);
+   Dmsg3(00, "add_fname_to_include prefix=%d gzip=%d fname=%s\n", 
+         prefixed, !!(inc->options & FO_GZIP), inc->fname);
 }
 
 /*
index ecce0a4cfdd1c04846e0ec5375e4450f5abbb934..1e432a640efe04f3d3e880b109b7ee73cc5f9648 100755 (executable)
@@ -932,8 +932,13 @@ const char *get_default_configdir()
    HRESULT hr;
    static char szConfigDir[MAX_PATH + 1] = { 0 };
 
+   if (!p_SHGetFolderPath) {
+      bstrncpy(szConfigDir, DEFAULT_CONFIGDIR, sizeof(szConfigDir));
+      return szConfigDir;
+   }
+
    if (szConfigDir[0] == '\0') {
-      hr = SHGetFolderPath(NULL, CSIDL_COMMON_APPDATA, NULL, 0, szConfigDir);
+      hr = p_SHGetFolderPath(NULL, CSIDL_COMMON_APPDATA, NULL, 0, szConfigDir);
 
       if (SUCCEEDED(hr)) {
          bstrncat(szConfigDir, "\\Bacula", sizeof(szConfigDir));
index e4fb7d6487e9f52853e2d5e3bde3974cd3a26078..aaf4dcb18da9c03628416217ee0cd42c71fa2e41 100644 (file)
@@ -389,6 +389,9 @@ static void list_running_jobs(void sendit(const char *msg, int len, void *sarg),
                    dcr->dev?dcr->dev->print_name(): 
                             dcr->device->device_name);
             sendit(msg, len, arg);
+            len= Mmsg(msg, _("    spooling=%d despooling=%d despool_wait=%d\n"),
+                   dcr->spooling, dcr->despooling, dcr->despool_wait);
+            sendit(msg, len, arg);
          }
          sec = time(NULL) - jcr->run_time;
          if (sec <= 0) {
index 9962614c1ded5cb1f40cdc87247a7584b408a3b8..e48a7311885cbaddbacd678e4e5084c2aab3d445 100644 (file)
@@ -3,9 +3,9 @@
  */
 
 #undef  VERSION
-#define VERSION "2.1.0"
-#define BDATE   "05 January 2007"
-#define LSMDATE "05Jan07"
+#define VERSION "2.1.1"
+#define BDATE   "11 January 2007"
+#define LSMDATE "11Jan07"
 
 #define PROG_COPYRIGHT "Copyright (C) %d-2007 Free Software Foundation Europe e.V.\n"
 #define BYEAR "2007"       /* year for copyright messages in progs */
@@ -47,7 +47,7 @@
 #define TRACE_FILE 1
 
 /* If this is set stdout will not be closed on startup */
-/* #define DEVELOPER 1 */
+#define DEVELOPER 1
 
 #define DATA_ENCRYPTION 1
 
index 0de12dc822cacb470db4544bd7e7de9ce5889760..55ea0837887bc432045168c7390ca5847dd6e670 100644 (file)
@@ -85,6 +85,8 @@ t_GetCurrentDirectoryW  p_GetCurrentDirectoryW = NULL;
 t_GetVolumePathNameW    p_GetVolumePathNameW = NULL;
 t_GetVolumeNameForVolumeMountPointW p_GetVolumeNameForVolumeMountPointW = NULL;
 
+t_SHGetFolderPath       p_SHGetFolderPath = NULL;
+
 void 
 InitWinAPIWrapper() 
 {
@@ -203,5 +205,21 @@ InitWinAPIWrapper()
       }
    }
 
+   /* First try in SHFOLDER for older systems */
+   hLib = LoadLibraryA("SHFOLDER.DLL");
+   if (hLib) {
+      p_SHGetFolderPath = (t_SHGetFolderPath)
+         GetProcAddress(hLib, "SHGetFolderPath");
+      FreeLibrary(hLib);
+   }
+
+   /* Now try Shell32.dll for newer systems */
+   hLib = LoadLibraryA("SHELL32.DLL");
+   if (hLib) {
+      p_SHGetFolderPath = (t_SHGetFolderPath)
+         GetProcAddress(hLib, "SHGetFolderPath");
+      FreeLibrary(hLib);
+   }
+
    atexit(Win32ConvCleanupCache);
 }
index aaa57fe0454751c28d2e7590a1788c3f7399cf95..861e95884e2462ae34f93a1ad483fd4296fbdb2b 100644 (file)
@@ -442,7 +442,7 @@ Section "-Initialize"
   ${StrRep} $R2 "$INSTDIR\bin" "\" "\\\\"
   FileWrite $R1 's;@bin_dir@;$R2;$\r$\n'
   ${StrRep} $R2 "$INSTDIR\bin" "\" "\\"
-  FileWrite $R1 's;@bin_dir_cmd@;$R2;$\r$\n'
+  FileWrite $R1 's;@bin_dir_cmd@;$R2;g$\r$\n'
 
   ${StrRep} $R2 "$INSTDIR" "\" "/"
   FileWrite $R1 "s;@BUILD_DIR@;$R2;$\r$\n"
index 3af4fa46a0265907a43eb2de4073437c425eee14..94497023a80082425d2b3e46370fa7f2b8cc976c 100644 (file)
@@ -75,7 +75,6 @@ extern DWORD DLL_IMP_EXP g_platform_id;
 extern DWORD DLL_IMP_EXP g_MinorVersion;
 
 /* In ADVAPI32.DLL */
-
 typedef BOOL (WINAPI * t_OpenProcessToken)(HANDLE, DWORD, PHANDLE);
 typedef BOOL (WINAPI * t_AdjustTokenPrivileges)(HANDLE, BOOL,
           PTOKEN_PRIVILEGES, DWORD, PTOKEN_PRIVILEGES, PDWORD);
@@ -177,6 +176,11 @@ extern t_GetVolumeNameForVolumeMountPointW DLL_IMP_EXP p_GetVolumeNameForVolumeM
 extern t_AttachConsole DLL_IMP_EXP p_AttachConsole;
 
 void InitWinAPIWrapper();
+
+/* In SHFolder.dll on older systems, and now Shell32.dll */
+typedef BOOL (WINAPI * t_SHGetFolderPath)(HWND, int, HANDLE, DWORD, LPTSTR);
+extern t_SHGetFolderPath  DLL_IMP_EXP p_SHGetFolderPath;
+
 #endif
 
 #endif /* __WINAPI_H */
index bafefbe137d6f6a5039c620a5e15b63e49d2ca49..6ac62eda69044cbcc789a467f4c7ffc4d711d2e0 100644 (file)
@@ -1,4 +1,21 @@
-              Technical notes on version 2.1
+              Technical notes on version 2.0
 
 General:
+Version 2.0.1
+11Jan06
+kes  Add dynamic dll entry point for SHGetFolderPath to Win32 code.
+     This *should* fix bug #747.
+kes  Modify winbacula.nsi to substitute with g bin_dir_cmd. Should fix
+     bug #742.
+09Jan06
+kes  Modify USTORE constructor to set an empty store_source string, 
+     and don't copy the store_source string in a cancel.  Hopefully
+     this will fix Arno's seg fault, bug #744.
+kes  Add back code to disable conio in configure. Fixes bug #743.
+kes  Correct the Options scanner in the FD to correctly handle  
+     SHA1 option, which was eating the next option.  Reported by    
+     Sebastien Guilbaud.
+kes  Add code to indicate when the SD is spooling, spool wait, and 
+     despooling as requested by Alan Brown.
+
 Version 2.0.0 released: 4 January 2007