[PATCH 1/2] rds-tools user space part of change for rds-stress -D option failure

David Dai
2016-03-01T01:47:25Z

---
rds-stress.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/rds-stress.c b/rds-stress.c
index 9f0623c..6632d58 100755
--- a/rds-stress.c
+++ b/rds-stress.c
@@ -1400,7 +1400,7 @@ static int recv_message(int fd,
return ret;
if (ret && ret < sizeof(struct header))
die("recvmsg() returned short data: %zd", ret);
- if (msg.msg_namelen < sizeof(struct sockaddr_in))
+ if (ret && msg.msg_namelen < sizeof(struct sockaddr_in))
die("socklen = %d < sizeof(sin) (%zu)\n",
msg.msg_namelen, sizeof(struct sockaddr_in));

--
1.7.1