summaryrefslogtreecommitdiffstats
path: root/rpc/rpc-transport
diff options
context:
space:
mode:
authorRaghavendra G <raghavendra@gluster.com>2010-08-17 05:35:42 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-08-18 00:37:03 -0700
commit4e01a54eaa6da1bd6817d62dcc51a75e22699e2b (patch)
tree7832f4070729ef43f0ee1560bf3c737b2e123d49 /rpc/rpc-transport
parentd8a8a66523e06abc0f44e1cdfe528cbf28d881a9 (diff)
rpc - cleanup and changes related to rdma
- remove rpc_conn_state structure. - add a member to point struct rpc_req in rpc_transport_req structure. This is needed for rdma to store rdma specific per request data. Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 875 (Implement a new protocol to provide proper backward/forward compatibility) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=875
Diffstat (limited to 'rpc/rpc-transport')
-rw-r--r--rpc/rpc-transport/socket/src/socket.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/rpc/rpc-transport/socket/src/socket.c b/rpc/rpc-transport/socket/src/socket.c
index 961fcdd7ad7..ccddfbc8d76 100644
--- a/rpc/rpc-transport/socket/src/socket.c
+++ b/rpc/rpc-transport/socket/src/socket.c
@@ -1663,6 +1663,7 @@ socket_server_event_handler (int fd, int idx, void *data,
new_trans->xl = this->xl;
new_trans->mydata = this->mydata;
new_trans->notify = this->notify;
+ new_trans->listener = this;
new_priv = new_trans->private;
pthread_mutex_lock (&new_priv->lock);
@@ -2204,7 +2205,7 @@ out:
int32_t
socket_getpeeraddr (rpc_transport_t *this, char *peeraddr, int addrlen,
- struct sockaddr *sa, socklen_t salen)
+ struct sockaddr_storage *sa, socklen_t salen)
{
int32_t ret = -1;
@@ -2212,7 +2213,7 @@ socket_getpeeraddr (rpc_transport_t *this, char *peeraddr, int addrlen,
goto out;
}
- *sa = *((struct sockaddr *)&this->peerinfo.sockaddr);
+ *sa = this->peerinfo.sockaddr;
if (peeraddr != NULL) {
ret = socket_getpeername (this, peeraddr, addrlen);
@@ -2245,7 +2246,7 @@ out:
int32_t
socket_getmyaddr (rpc_transport_t *this, char *myaddr, int addrlen,
- struct sockaddr *sa, socklen_t salen)
+ struct sockaddr_storage *sa, socklen_t salen)
{
int32_t ret = 0;
@@ -2253,7 +2254,7 @@ socket_getmyaddr (rpc_transport_t *this, char *myaddr, int addrlen,
goto out;
}
- *sa = *((struct sockaddr *)&this->myinfo.sockaddr);
+ *sa = this->myinfo.sockaddr;
if (myaddr != NULL) {
ret = socket_getmyname (this, myaddr, addrlen);