diff options
author | Gaurav <gaurav@gluster.com> | 2011-05-30 05:00:50 +0000 |
---|---|---|
committer | Anand Avati <avati@gluster.com> | 2011-05-31 05:11:14 -0700 |
commit | 793aba82fa9585985b4285a92f9bce5b28f5c8db (patch) | |
tree | 8665036afa7a52175536b0fef91a7c4da52978f3 /rpc | |
parent | d7497c4f1b361b1d1c42c157cbcf7ce8bc16fd44 (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')
-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 159edba53..457d76d4e 100644 --- a/rpc/rpc-lib/src/rpcsvc.c +++ b/rpc/rpc-lib/src/rpcsvc.c @@ -1126,11 +1126,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: |