Commit 153ad3f6 authored by reggie@linux.site's avatar reggie@linux.site

changes to IM code that came from Petr's review

parent 7fa1779d
......@@ -66,6 +66,6 @@ int HandleServiceOptions(Options options)
}
}
else
ret_val= winService.Init() ? 0 : 1;
ret_val= !winService.Init();
return ret_val;
}
......@@ -291,23 +291,23 @@ void Options::cleanup()
#ifdef __WIN__
void Options::setup_windows_defaults()
int Options::setup_windows_defaults()
{
if (!GetModuleFileName(NULL, default_password_file_name,
sizeof(default_password_file_name)))
return -1;
return 1;
char *filename= strstr(default_password_file_name, ".exe");
strcpy(filename, ".passwd");
if (!GetModuleFileName(NULL, default_log_file_name,
sizeof(default_log_file_name)))
return -1;
return 1;
filename= strstr(default_log_file_name, ".exe");
strcpy(filename, ".log");
if (!GetModuleFileName(NULL, windows_config_file,
sizeof(windows_config_file)))
return -1;
return 1;
char *slash= strrchr(windows_config_file, '\\');
strcpy(slash, "\\my.ini");
return 0;
......
......@@ -52,7 +52,7 @@ struct Options
int load(int argc, char **argv);
void cleanup();
#ifdef __WIN__
void setup_windows_defaults(const char *progname);
int setup_windows_defaults(const char *progname);
#endif
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment