From 799e2d46923728ac670d7110f764868b82333a0b Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Tue, 20 May 2014 04:32:00 +0200 Subject: Modify mds-server to use mds-base (some regression...) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/mds-server/slavery.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/mds-server/slavery.c') diff --git a/src/mds-server/slavery.c b/src/mds-server/slavery.c index 627bde0..4b92154 100644 --- a/src/mds-server/slavery.c +++ b/src/mds-server/slavery.c @@ -71,13 +71,13 @@ int fetch_message(client_t* client) /** * Create, start and detache a slave thread * - * @param thread The address at where to store the thread - * @param socket_fd The file descriptor of the slave's socket - * @return Zero on success, -1 on error, error message will have been printed + * @param thread The address at where to store the thread + * @param slave_fd The file descriptor of the slave's socket + * @return Zero on success, -1 on error, error message will have been printed */ -int create_slave(pthread_t* thread_slot, int socket_fd) +int create_slave(pthread_t* thread_slot, int slave_fd) { - if ((errno = pthread_create(thread_slot, NULL, slave_loop, (void*)(intptr_t)socket_fd))) + if ((errno = pthread_create(thread_slot, NULL, slave_loop, (void*)(intptr_t)slave_fd))) { perror(*argv); with_mutex (slave_mutex, running_slaves--;); @@ -95,10 +95,10 @@ int create_slave(pthread_t* thread_slot, int socket_fd) /** * Initialise a client, except for threading * - * @param socket_fd The file descriptor of the client's socket + * @param client_fd The file descriptor of the client's socket * @return The client information, NULL on error */ -client_t* initialise_client(int socket_fd) +client_t* initialise_client(int client_fd) { ssize_t entry = LINKED_LIST_UNUSED; int locked = 0; @@ -117,14 +117,14 @@ client_t* initialise_client(int socket_fd) fail_if (entry == LINKED_LIST_UNUSED); /* Add client to table. */ - tmp = fd_table_put(&client_map, socket_fd, (size_t)(void*)information); + tmp = fd_table_put(&client_map, client_fd, (size_t)(void*)information); fail_if ((tmp == 0) && errno); pthread_mutex_unlock(&slave_mutex); locked = 0; /* Fill information table. */ information->list_entry = entry; - information->socket_fd = socket_fd; + information->socket_fd = client_fd; information->open = 1; fail_if (mds_message_initialise(&(information->message))); -- cgit v1.2.3-70-g09d2