diff options
author | Chris Wilson <chris+github@qwirx.com> | 2007-09-19 21:58:24 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2007-09-19 21:58:24 +0000 |
commit | 867fbf737760a7764f6095a1b9b7554047c47eb3 (patch) | |
tree | 1bc17e74cfef9352857f62b3ee842fa95a8547a4 /bin/bbackupd/Win32BackupService.cpp | |
parent | 41f3230a75e965254ab47e3609f68c8634266d37 (diff) | |
parent | 2ff87143551e6882c90ceaba940a34779b922882 (diff) |
Replace trunk with chris/merge.
Diffstat (limited to 'bin/bbackupd/Win32BackupService.cpp')
-rw-r--r-- | bin/bbackupd/Win32BackupService.cpp | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/bin/bbackupd/Win32BackupService.cpp b/bin/bbackupd/Win32BackupService.cpp index 7cbf4828..9f0ac867 100644 --- a/bin/bbackupd/Win32BackupService.cpp +++ b/bin/bbackupd/Win32BackupService.cpp @@ -29,33 +29,17 @@ void TerminateService(void) DWORD Win32BackupService::WinService(const char* pConfigFileName) { - char exepath[MAX_PATH]; - GetModuleFileName(NULL, exepath, sizeof(exepath)); + DWORD ret; - std::string configfile; - if (pConfigFileName != NULL) { - configfile = pConfigFileName; + ret = this->Main(pConfigFileName); } else { - // make the default config file name, - // based on the program path - configfile = exepath; - configfile = configfile.substr(0, - configfile.rfind(DIRECTORY_SEPARATOR_ASCHAR)); - configfile += DIRECTORY_SEPARATOR "bbackupd.conf"; + ret = this->Main(BOX_GET_DEFAULT_BBACKUPD_CONFIG_FILE); } - const char *argv[] = {exepath, "-c", configfile.c_str()}; - int argc = sizeof(argv) / sizeof(*argv); - DWORD ret; - - MAINHELPER_START - ret = this->Main(BOX_FILE_BBACKUPD_DEFAULT_CONFIG, argc, argv); - MAINHELPER_END - return ret; } |