* [PATCH 1/3] lksctp-tools: Fix -e option of sctp_darn
@ 2009-01-09 5:58 Wei Yongjun
0 siblings, 0 replies; only message in thread
From: Wei Yongjun @ 2009-01-09 5:58 UTC (permalink / raw)
To: linux-sctp
If sctp_darn -e option is used, sctp_darn will send back different message
to which it received. This is because test_print_message() will change the
received message when print out it.
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
---
src/apps/sctp_darn.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/apps/sctp_darn.c b/src/apps/sctp_darn.c
index 14e864f..61673a2 100644
--- a/src/apps/sctp_darn.c
+++ b/src/apps/sctp_darn.c
@@ -720,7 +720,6 @@ command_listen(char *argv0, int sk)
}
break;
}
- test_print_message(sk, &inmessage, error);
/* Update the associd when a notification is received on a
* UDP-style socket.
@@ -730,12 +729,13 @@ command_listen(char *argv0, int sk)
if (echo) {
if( !(MSG_NOTIFICATION & inmessage.msg_flags)) {
- sendto(sk, inmessage.msg_iov->iov_base,
+ sendto(recvsk, inmessage.msg_iov->iov_base,
error, 0, (struct sockaddr *)&msgname,
sizeof(msgname));
}
}
+ test_print_message(sk, &inmessage, error);
inmessage.msg_control = incmsg;
inmessage.msg_controllen = sizeof(incmsg);
--
1.5.3.8
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2009-01-09 5:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-09 5:58 [PATCH 1/3] lksctp-tools: Fix -e option of sctp_darn Wei Yongjun
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.