Stefan,
Thanks! Done.

Bernard.



From:   Stefan Metzmacher <[email protected]>
To:     Bernard Metzler <[email protected]>
Cc:     Stefan Metzmacher <[email protected]>, [email protected]
Date:   06/27/2014 05:03 PM
Subject:        [PATCH] siw_cm: use to_sockaddr_in() also within dprint()
            statements



Signed-off-by: Stefan Metzmacher <[email protected]>
---
 softiwarp/siw_cm.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/softiwarp/siw_cm.c b/softiwarp/siw_cm.c
index ad3d617..e4d97bb 100644
--- a/softiwarp/siw_cm.c
+++ b/softiwarp/siw_cm.c
@@ -1303,10 +1303,10 @@ int siw_connect(struct iw_cm_id *id, struct
iw_cm_conn_param *params)
                                 id, QP_ID(qp), sdev->ofa_dev.name, 
sdev->netdev->
name);
                 dprint(DBG_CM, "(id=0x%p, QP%d): laddr=(0x%x,%d), raddr=
(0x%x,%d)\n",
                                 id, QP_ID(qp),
-                                ntohl(id->local_addr.sin_addr.s_addr),
-                                ntohs(id->local_addr.sin_port),
-                                ntohl(id->remote_addr.sin_addr.s_addr),
-                                ntohs(id->remote_addr.sin_port));
+                                ntohl(to_sockaddr_in(id->
local_addr).sin_addr.s_addr),
+                                ntohs(to_sockaddr_in(id->local_addr).sin_port),
+                                ntohl(to_sockaddr_in(id->
remote_addr).sin_addr.s_addr),
+                                
ntohs(to_sockaddr_in(id->remote_addr).sin_port));

                 laddr = (struct sockaddr *)&id->local_addr;
                 raddr = (struct sockaddr *)&id->remote_addr;
@@ -1832,9 +1832,9 @@ int siw_create_listen(struct iw_cm_id *id, int
backlog)
                                                 "raddr(id)  : ipv4=%d.%d.%d.%d,
port=%d\n",
                                                 id,
                                                 l_ip[0], l_ip[1], l_ip[2], 
l_ip[3],
-                                                ntohs(id->local_addr.sin_port),
+                                                ntohs(to_sockaddr_in(id->
local_addr).sin_port),
                                                 r_ip[0], r_ip[1], r_ip[2], 
r_ip[3],
-                                                
ntohs(id->remote_addr.sin_port));
+                                                ntohs(to_sockaddr_in(id->
remote_addr).sin_port));

                                 in_dev = in_dev_get(sdev->netdev);
                                 if (!in_dev) {
--
1.9.1



--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to