diff options
author | unknown <reggie@linux.site> | 2005-08-09 07:57:37 -0600 |
---|---|---|
committer | unknown <reggie@linux.site> | 2005-08-09 07:57:37 -0600 |
commit | 5d8222cd6f3ea3e7c35f1ab2d3d5a3d3d779d80e (patch) | |
tree | 5e2aee6ca4bb8a4b81567d9b0f3bfac0a799a66f /server-tools/instance-manager/IMService.cpp | |
parent | 88c4ad2435063a19e6ba933b4fc2e1dfb802339a (diff) | |
download | mariadb-git-5d8222cd6f3ea3e7c35f1ab2d3d5a3d3d779d80e.tar.gz |
changes to IM that came from Petr and JimW's review.
server-tools/instance-manager/IMService.cpp:
make sure HandleServiceOptions returns 0 on success and 1 on failure
server-tools/instance-manager/mysqlmanager.cc:
default return value is 1.
simplify some code bits by just jumping to err on error.
move options.cleanup inside the err block. In this case, the err block
is more than just an error block. It is the terminating block
for both error and success. You set return_value to 0 for success
or leave it as 1 for failure. This simplies this function a bit.
server-tools/instance-manager/options.cc:
remove the malloc for default password filename on Windows and replace
with statically allocated memory.
default Options:saved_argv to NULL so that we will know if we need
to free it in cleanup()
setup the default config file location for Windows inside the
setup_windows_defaults function and remove this code from load()
rework setup_windows_defaults so that it properly returns 0 on success
and 1 on error and so it fills in the default location for the
log file, password file, and config file.
Diffstat (limited to 'server-tools/instance-manager/IMService.cpp')
-rw-r--r-- | server-tools/instance-manager/IMService.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server-tools/instance-manager/IMService.cpp b/server-tools/instance-manager/IMService.cpp index b6195d15603..4e53fe15ef4 100644 --- a/server-tools/instance-manager/IMService.cpp +++ b/server-tools/instance-manager/IMService.cpp @@ -50,7 +50,7 @@ int HandleServiceOptions(Options options) else { log_info("Service failed to install\n"); - ret_val= -1; + ret_val= 1; } } else if (options.remove_service) @@ -62,10 +62,10 @@ int HandleServiceOptions(Options options) else { log_info("Service failed to remove\n"); - ret_val= -1; + ret_val= 1; } } else - return (int)winService.Init(); + ret_val= winService.Init() ? 0 : 1; return ret_val; } |