]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
server: Rename functions related to user lists.
authorAndre Noll <maan@tuebingen.mpg.de>
Sat, 12 Aug 2017 23:10:01 +0000 (01:10 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Tue, 13 Mar 2018 02:28:10 +0000 (03:28 +0100)
The common user_list prefix of the two public functions declared in
user_list.h indicates that these functions are defined in user_list.c.

command.c
server.c
user_list.c
user_list.h

index 74e136355f644721924752ceb61fbfd4ac3693dc..aea48146a38cefd7aeb22ea2994c9d53b5633c08 100644 (file)
--- a/command.c
+++ b/command.c
@@ -818,7 +818,7 @@ static int parse_auth_request(char *buf, int len, const struct user **u,
                }
        }
        PARA_DEBUG_LOG("received auth request for user %s\n", username);
-       *u = lookup_user(username);
+       *u = user_list_lookup(username);
        ret = 1;
 out:
        free_argv(features);
index 593d92c5d3717fd3965336ca1c57d9a218377521..20019ef60b950f635d3a9e789d132ab1dbed7691 100644 (file)
--- a/server.c
+++ b/server.c
@@ -283,7 +283,7 @@ success:
                daemon_set_flag(DF_LOG_TIMING);
        daemon_set_priority(OPT_UINT32_VAL(PRIORITY));
        if (user_list_file)
-               init_user_list(user_list_file);
+               user_list_init(user_list_file);
        ret = 1;
 free_cf:
        free(cf);
index cf53c0fa8e538d3cc9ffd66452beeaf998ffd70d..c9d265e55af7cdcddcb03fcb8dbfaeba86a92906 100644 (file)
@@ -21,7 +21,7 @@ static struct list_head user_list;
  * Populates a linked list of all users in \a user_list_file.  Returns on
  * success, calls exit() on errors.
  */
-static void populate_user_list(char *user_list_file)
+static void populate(char *user_list_file)
 {
        int ret = -E_USERLIST;
        FILE *file_ptr = fopen(user_list_file, "r");
@@ -101,7 +101,7 @@ err:
  * If this function is called for the second time, the contents of the
  * previous call are discarded, i.e. the user list is reloaded.
  */
-void init_user_list(char *user_list_file)
+void user_list_init(char *user_list_file)
 {
        struct user *u, *tmp;
        static int initialized;
@@ -116,7 +116,7 @@ void init_user_list(char *user_list_file)
        } else
                INIT_LIST_HEAD(&user_list);
        initialized = 1;
-       populate_user_list(user_list_file);
+       populate(user_list_file);
 }
 
 /**
@@ -127,7 +127,7 @@ void init_user_list(char *user_list_file)
  * \return A pointer to the corresponding user struct if the user was found, \p
  * NULL otherwise.
  */
-const struct user *lookup_user(const char *name)
+const struct user *user_list_lookup(const char *name)
 {
        const struct user *u;
        list_for_each_entry(u, &user_list, node) {
index e4fbd46656e289c2f7f27fd9240749ad00d766a6..3ef62170aa722fc38f9accb4d0dba6ff268dc485 100644 (file)
@@ -32,5 +32,5 @@ struct user {
        unsigned int perms;
 };
 
-void init_user_list(char *user_list_file);
-const struct user *lookup_user(const char *name);
+void user_list_init(char *user_list_file);
+const struct user *user_list_lookup(const char *name);