From acd4965776507abe1102b3a2bfa5ed9cd0340e14 Mon Sep 17 00:00:00 2001 From: Prasanna Kumar Kalever Date: Thu, 2 Feb 2017 16:45:10 +0530 Subject: gluster-block: refresh logging add more meaningful log messages minor code changes such as renaming, indentation and et cetera. Signed-off-by: Pranith Kumar Karampuri Signed-off-by: Prasanna Kumar Kalever --- rpc/block_svc.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'rpc') diff --git a/rpc/block_svc.c b/rpc/block_svc.c index 1a908ea..3722d51 100644 --- a/rpc/block_svc.c +++ b/rpc/block_svc.c @@ -20,9 +20,6 @@ -pthread_t p_thread1, p_thread2; - - static void gluster_block_cli_1(struct svc_req *rqstp, register SVCXPRT *transp) { @@ -134,7 +131,7 @@ gluster_block_1(struct svc_req *rqstp, register SVCXPRT *transp) } void * -cli_thread(void *vargp) +cli_thread_proc (void *vargp) { register SVCXPRT *transp; struct sockaddr_un saun; @@ -173,7 +170,7 @@ cli_thread(void *vargp) } void * -server_thread(void *vargp) +server_thread_proc(void *vargp) { register SVCXPRT *transp; struct sockaddr_in sain; @@ -213,14 +210,18 @@ server_thread(void *vargp) int main (int argc, char **argv) { + pthread_t cli_thread; + pthread_t server_thread; + + pmap_unset (GLUSTER_BLOCK_CLI, GLUSTER_BLOCK_CLI_VERS); pmap_unset (GLUSTER_BLOCK, GLUSTER_BLOCK_VERS); - pthread_create(&p_thread1, NULL, cli_thread, NULL); - pthread_create(&p_thread2, NULL, server_thread, NULL); + pthread_create(&cli_thread, NULL, cli_thread_proc , NULL); + pthread_create(&server_thread, NULL, server_thread_proc , NULL); - pthread_join(p_thread1, NULL); - pthread_join(p_thread2, NULL); + pthread_join(cli_thread, NULL); + pthread_join(server_thread, NULL); fprintf (stderr, "%s", "svc_run returned"); -- cgit