]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - server.c
Merge topic branch t/sf_float into pu
[paraslash.git] / server.c
index ea9cc9c003616762a96aa546c381d54417fd34a2..229a146de36aab2f8585be8c662c476b0e93e16e 100644 (file)
--- a/server.c
+++ b/server.c
@@ -228,18 +228,12 @@ void parse_config_or_die(bool reload)
                daemon_set_flag(DF_LOG_TIMING);
        daemon_set_priority(OPT_UINT32_VAL(PRIORITY));
        if (!reload || getpid() != afs_pid) {
-               char *user_list_file;
-               if (OPT_GIVEN(USER_LIST))
-                       user_list_file = para_strdup(OPT_STRING_VAL(USER_LIST));
-               else {
-                       char *home = para_homedir();
-                       user_list_file = make_message("%s/.paraslash/server.users", home);
-                       free(home);
-               }
+               char *user_list_file = OPT_GIVEN(USER_LIST)?
+                       para_strdup(OPT_STRING_VAL(USER_LIST)) :
+                       make_message("%s/server.users", get_confdir());
                user_list_init(user_list_file);
                free(user_list_file);
        }
-       return;
 }
 
 /*
@@ -693,5 +687,6 @@ int main(int argc, char *argv[])
        shm_detach(mmd);
        user_list_deplete();
        free_lpr();
+       free(get_confdir());
        exit(ret < 0? EXIT_FAILURE : EXIT_SUCCESS);
 }