diff options
author | Gaurav <gaurav@gluster.com> | 2011-05-30 04:51:58 +0000 |
---|---|---|
committer | Anand Avati <avati@gluster.com> | 2011-05-31 09:12:09 -0700 |
commit | 397acf8a6dbcc60686e17acfc1e59af3d034d6a4 (patch) | |
tree | 0f98a45a155737b03b5effb859b2433f744a7b08 /rpc/rpc-lib | |
parent | 02443793c6bf3453c7a937737f5159c060ef6504 (diff) |
RPC : Valid typecasting for ipv4 and ipv6 in rpcsvc_get_listener_port.
Signed-off-by: Gaurav <gaurav@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>
BUG: 2956 (Invalid typecating for ipv4 and ipv6 in rpcsvc_get_listener_port.)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2956
Diffstat (limited to 'rpc/rpc-lib')
-rw-r--r-- | rpc/rpc-lib/src/rpcsvc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rpc/rpc-lib/src/rpcsvc.c b/rpc/rpc-lib/src/rpcsvc.c index fc49a771268..389e27910ea 100644 --- a/rpc/rpc-lib/src/rpcsvc.c +++ b/rpc/rpc-lib/src/rpcsvc.c @@ -1641,11 +1641,11 @@ rpcsvc_get_listener_port (rpcsvc_listener_t *listener) switch (listener->trans->myinfo.sockaddr.ss_family) { case AF_INET: - listener_port = ((struct sockaddr_in6 *)&listener->trans->myinfo.sockaddr)->sin6_port; + listener_port = ((struct sockaddr_in *)&listener->trans->myinfo.sockaddr)->sin_port; break; case AF_INET6: - listener_port = ((struct sockaddr_in *)&listener->trans->myinfo.sockaddr)->sin_port; + listener_port = ((struct sockaddr_in6 *)&listener->trans->myinfo.sockaddr)->sin6_port; break; default: |