summaryrefslogtreecommitdiffstats
path: root/xlators/nfs/lib/src/rpc-socket.c
diff options
context:
space:
mode:
authorShehjar Tikoo <shehjart@gluster.com>2010-08-10 02:41:54 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-08-10 02:44:22 -0700
commit0af39ff8d03173a7ba3df1b13476b7ed447131aa (patch)
tree2180ff57269b73aa8fee6a5802a8d5d4a169f624 /xlators/nfs/lib/src/rpc-socket.c
parentb0304d47f67aa8fa677e4898fa46b96df88c8322 (diff)
nfs, nfs/rpc: Rename functions to prevent gfrpcsvc conflict
Signed-off-by: Shehjar Tikoo <shehjart@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1274 (nfs fails to start) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1274
Diffstat (limited to 'xlators/nfs/lib/src/rpc-socket.c')
-rw-r--r--xlators/nfs/lib/src/rpc-socket.c34
1 files changed, 18 insertions, 16 deletions
diff --git a/xlators/nfs/lib/src/rpc-socket.c b/xlators/nfs/lib/src/rpc-socket.c
index 01f114a8530..aacf7ff03d2 100644
--- a/xlators/nfs/lib/src/rpc-socket.c
+++ b/xlators/nfs/lib/src/rpc-socket.c
@@ -38,10 +38,10 @@
#include <netinet/tcp.h>
static int
-rpcsvc_socket_server_get_local_socket (int addrfam, char *listenhost,
- uint16_t listenport,
- struct sockaddr *addr,
- socklen_t *addr_len)
+nfs_rpcsvc_socket_server_get_local_socket (int addrfam, char *listenhost,
+ uint16_t listenport,
+ struct sockaddr *addr,
+ socklen_t *addr_len)
{
struct addrinfo hints, *res = 0;
char service[NI_MAXSERV];
@@ -76,7 +76,7 @@ err:
int
-rpcsvc_socket_listen (int addrfam, char *listenhost, uint16_t listenport)
+nfs_rpcsvc_socket_listen (int addrfam, char *listenhost, uint16_t listenport)
{
int sock = -1;
struct sockaddr_storage sockaddr;
@@ -85,9 +85,10 @@ rpcsvc_socket_listen (int addrfam, char *listenhost, uint16_t listenport)
int ret = -1;
int opt = 1;
- ret = rpcsvc_socket_server_get_local_socket (addrfam, listenhost,
- listenport,SA (&sockaddr),
- &sockaddr_len);
+ ret = nfs_rpcsvc_socket_server_get_local_socket (addrfam, listenhost,
+ listenport,
+ SA (&sockaddr),
+ &sockaddr_len);
if (ret == -1)
return ret;
@@ -149,7 +150,7 @@ err:
int
-rpcsvc_socket_accept (int listenfd)
+nfs_rpcsvc_socket_accept (int listenfd)
{
int new_sock = -1;
struct sockaddr_storage new_sockaddr = {0, };
@@ -197,7 +198,7 @@ err:
}
ssize_t
-rpcsvc_socket_read (int sockfd, char *readaddr, size_t readsize)
+nfs_rpcsvc_socket_read (int sockfd, char *readaddr, size_t readsize)
{
ssize_t dataread = 0;
ssize_t readlen = -1;
@@ -226,7 +227,7 @@ rpcsvc_socket_read (int sockfd, char *readaddr, size_t readsize)
ssize_t
-rpcsvc_socket_write (int sockfd, char *buffer, size_t size)
+nfs_rpcsvc_socket_write (int sockfd, char *buffer, size_t size)
{
size_t writelen = -1;
ssize_t written = 0;
@@ -255,7 +256,7 @@ rpcsvc_socket_write (int sockfd, char *buffer, size_t size)
int
-rpcsvc_socket_peername (int sockfd, char *hostname, int hostlen)
+nfs_rpcsvc_socket_peername (int sockfd, char *hostname, int hostlen)
{
struct sockaddr sa;
socklen_t sl = sizeof (sa);
@@ -282,8 +283,8 @@ err:
int
-rpcsvc_socket_peeraddr (int sockfd, char *addrstr, int addrlen,
- struct sockaddr *returnsa, socklen_t sasize)
+nfs_rpcsvc_socket_peeraddr (int sockfd, char *addrstr, int addrlen,
+ struct sockaddr *returnsa, socklen_t sasize)
{
struct sockaddr sa;
int ret = EAI_FAIL;
@@ -323,8 +324,9 @@ err:
int
-rpcsvc_socket_block_tx (int sockfd)
+nfs_rpcsvc_socket_block_tx (int sockfd)
{
+
int ret = -1;
int on = 1;
@@ -341,7 +343,7 @@ rpcsvc_socket_block_tx (int sockfd)
int
-rpcsvc_socket_unblock_tx (int sockfd)
+nfs_rpcsvc_socket_unblock_tx (int sockfd)
{
int ret = -1;
int off = 0;