]> git.sur5r.net Git - bacula/bacula/commitdiff
- Turn off old service helper code in Win32.
authorKern Sibbald <kern@sibbald.com>
Mon, 25 Jul 2005 10:12:43 +0000 (10:12 +0000)
committerKern Sibbald <kern@sibbald.com>
Mon, 25 Jul 2005 10:12:43 +0000 (10:12 +0000)
- Correct Messages bug found by Phil in stored.

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

bacula/src/filed/filed_conf.c
bacula/src/filed/win32/winservice.cpp
bacula/src/stored/stored_conf.c
bacula/src/stored/stored_conf.h
bacula/src/version.h
bacula/src/win32/winbacula.nsi.in

index bb1429955842afe7f7d0219a5f2f2d5220892fef..cc4a3d4c767dd26b8863b5070eabed2eb8890c0c 100644 (file)
  *   Version $Id$
  */
 /*
-   Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
+   Copyright (C) 2000-2005 Kern Sibbald
 
    This program is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public License as
-   published by the Free Software Foundation; either version 2 of
-   the License, or (at your option) any later version.
+   modify it under the terms of the GNU General Public License
+   version 2 as amended with additional clauses defined in the
+   file LICENSE in the main source directory.
 
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-   General Public License for more details.
-
-   You should have received a copy of the GNU General Public
-   License along with this program; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-   MA 02111-1307, USA.
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
+   the file LICENSE for additional details.
 
  */
 
-
 #include "bacula.h"
 #include "filed.h"
 
index 31e77a5da5666bc1c21135d0747c860842c8206f..54b8ac56a11cc233070bbbe38d3d0f9de894342d 100755 (executable)
@@ -148,38 +148,6 @@ bacService::ShowStatus()
   return TRUE;
 }
 
-#ifdef xxx_needed
-// Static routine to show the Events dialog for a currently-running
-// copy of Bacula, (usually a servicified version.)
-
-BOOL
-bacService::ShowEvents()
-{
-  // Post to the Bacula menu window
-  if (!PostToBacula(MENU_EVENTS_SHOW, 0, 0)) {
-     MessageBox(NULL, "No existing instance of Bacula could be contacted", szAppName, MB_ICONEXCLAMATION | MB_OK);
-     return FALSE;
-  }
-  return TRUE;
-}
-
-
-// Static routine to tell a locally-running instance of the server
-// to connect out to a new client
-
-BOOL
-bacService::PostAddNewClient(unsigned long ipaddress)
-{
-  // Post to the Bacula menu window
-  if (!PostToBacula(MENU_ADD_CLIENT_MSG, 0, ipaddress)) {
-     MessageBox(NULL, "No existing instance of Bacula could be contacted", szAppName, MB_ICONEXCLAMATION | MB_OK);
-     return FALSE;
-  }
-
-  return TRUE;
-}
-#endif
-
 // SERVICE-MODE ROUTINES
 
 // Service-mode defines:
@@ -231,39 +199,6 @@ bacService::KillRunningCopy()
   return TRUE;
 }
 
-#ifdef xxx_needed
-
-// ROUTINE TO POST THE HANDLE OF THE CURRENT USER TO THE RUNNING Bacula, IN ORDER
-// THAT IT CAN LOAD THE APPROPRIATE SETTINGS.  THIS IS USED ONLY BY THE SVCHELPER
-// OPTION, WHEN RUNNING UNDER NT
-BOOL
-bacService::PostUserHelperMessage()
-{
-  // - Check the platform type
-  if (!IsWinNT()) {
-     return TRUE;
-  }
-
-  // - Get the current process ID
-  DWORD processId = GetCurrentProcessId();
-
-  // - Post it to the existing Bacula
-  if (!PostToBacula(MENU_SERVICEHELPER_MSG, 0, (LPARAM)processId)) {
-     return FALSE;
-  }
-
-  // - Wait until it's been used
-  return TRUE;
-}
-
-// ROUTINE TO PROCESS AN INCOMING INSTANCE OF THE ABOVE MESSAGE
-BOOL
-bacService::ProcessUserHelperMessage(WPARAM wParam, LPARAM lParam) {
-   return TRUE;
-}
-
-#endif
-
 // SERVICE MAIN ROUTINE
 int
 bacService::BaculaServiceMain()
@@ -522,6 +457,7 @@ bacService::InstallService()
       CloseServiceHandle(hsrvmanager);
       CloseServiceHandle(hservice);
 
+#ifdef xxx_needed
       // Now install the servicehelper registry setting...
       // Locate the RunService registry entry
       HKEY runapps;
@@ -545,6 +481,7 @@ bacService::InstallService()
              RegCloseKey(runapps);
          }
       }
+#endif
 
       // Everything went fine
       MessageBox(NULL,
@@ -611,6 +548,7 @@ bacService::RemoveService()
       SC_HANDLE   hservice;
       SC_HANDLE   hsrvmanager;
 
+#ifdef xxx_needed
       // Attempt to remove the service-helper hook
       HKEY runapps;
       if (RegOpenKey(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion\\Run",
@@ -621,6 +559,7 @@ bacService::RemoveService()
          }
          RegCloseKey(runapps);
       }
+#endif
 
       // Open the SCM
       hsrvmanager = OpenSCManager(
@@ -845,13 +784,11 @@ void set_service_description(SC_HANDLE hSCManager, SC_HANDLE hService,
  
     sdBuf.lpDescription = lpDesc;
 
-    if(!ChangeServiceDescription(
+    if (!ChangeServiceDescription(
          hService,                   // handle to service
          SERVICE_CONFIG_DESCRIPTION, // change: description
          &sdBuf) ) {                 // value: new description
        log_error_message("ChangeServiceConfig2");
-    } else {
-       printf("ChangeServiceConfig2 SUCCESS\n");
     }
 
     // Release the database lock. 
index 66df30163ce17d2c892c2f52f44b91f34bd87c05..5ea530146f9a91e9458ea1b42ac5d5eff256615e 100644 (file)
@@ -51,7 +51,7 @@ static RES_ITEM store_items[] = {
    {"description",           store_str,  ITEM(res_dir.hdr.desc),     0, 0, 0},
    {"sdaddress",             store_addresses_address,  ITEM(res_store.sdaddrs),     0, ITEM_DEFAULT, 9103},
    {"sdaddresses",           store_addresses,  ITEM(res_store.sdaddrs), 0, ITEM_DEFAULT, 9103},
-   {"messages",              store_res,  ITEM(res_store.messages),   0, R_MSGS, 0},
+   {"messages",              store_res,  ITEM(res_store.messages),   R_MSGS, 0, 0},
    {"sdport",                store_addresses_port,  ITEM(res_store.sdaddrs),     0, ITEM_DEFAULT, 9103},
    {"workingdirectory",      store_dir,  ITEM(res_store.working_directory), 0, ITEM_REQUIRED, 0},
    {"piddirectory",          store_dir,  ITEM(res_store.pid_directory), 0, ITEM_REQUIRED, 0},
index caaf77d05b1557598956bb8605b1c7663a049ca7..c025dbbff17acf0e89ac0dac8e88acb0a929633b 100644 (file)
@@ -7,19 +7,14 @@
    Copyright (C) 2000-2005 Kern Sibbald
 
    This program is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public License as
-   published by the Free Software Foundation; either version 2 of
-   the License, or (at your option) any later version.
+   modify it under the terms of the GNU General Public License
+   version 2 as amended with additional clauses defined in the
+   file LICENSE in the main source directory.
 
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-   General Public License for more details.
-
-   You should have received a copy of the GNU General Public
-   License along with this program; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-   MA 02111-1307, USA.
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
+   the file LICENSE for additional details.
 
  */
 
index cc7c654a44a39071d35e507436ba728e6c9b4b1f..607cf92d662f1ef078f963e771cb2dfc0b05a6da 100644 (file)
@@ -1,8 +1,8 @@
 /* */
 #undef  VERSION
 #define VERSION "1.37.32"
-#define BDATE   "22 July 2005"
-#define LSMDATE "22Jul05"
+#define BDATE   "24 July 2005"
+#define LSMDATE "24Jul05"
 
 /* Debug flags */
 #undef  DEBUG
index 46417071f31cd5bd31c694dfc552ecfd3cd21d40..75a3063fb5d79f2c322180255dc84e9d3731e01e 100755 (executable)
@@ -80,7 +80,7 @@ Section "Bacula File Service" SecService
   StrCmp $6 0 NoCygwin
   StrCpy $INSTDIR "c:\cygwin\bacula"
  NoCygwin:
-; IfFileExists "c:\cygwin" Cygwin ReallyNoCygwin
+; IfFileExists "c:\cygwin\bin\cygwin1.dll" Cygwin ReallyNoCygwin
 ;Cygwin:
 ; StrCpy $INSTDIR "c:\cygwin\bacula"
 ;ReallyNoCygwin:
@@ -90,7 +90,7 @@ Section "Bacula File Service" SecService
   IfFileExists "$INSTDIR\bin\bacula-fd.conf" Upgrade NoUpgrade
  Upgrade:
     StrCpy $7 1
-    ; Shutdown any baculas that could be running
+    ; Shutdown any bacula that could be running
     ExecWait '"$INSTDIR\bin\bacula-fd.exe" /kill'
     ; give it some time to shutdown
     Sleep 1000