diff options
author | Prasanna Kumar Kalever <prasanna.kalever@redhat.com> | 2017-02-02 16:45:10 +0530 |
---|---|---|
committer | Prasanna Kumar Kalever <prasanna.kalever@redhat.com> | 2017-02-05 20:53:35 +0530 |
commit | acd4965776507abe1102b3a2bfa5ed9cd0340e14 (patch) | |
tree | 6bbf67ce94d1140e6550d2ea4ecc128f3e8123ed /rpc | |
parent | ff74a2144e02af11373375f8d40e9b312a0dd0c6 (diff) |
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 <pkarampu@redhat.com>
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
Diffstat (limited to 'rpc')
-rw-r--r-- | rpc/block_svc.c | 19 |
1 files changed, 10 insertions, 9 deletions
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"); |