check sctp_sendmsg returned value in sctp_xconnect. Signed-off-by: Xin Long <lucien.xin@xxxxxxxxx> --- src/apps/sctp_xconnect.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/apps/sctp_xconnect.c b/src/apps/sctp_xconnect.c index c319761..6759c0e 100644 --- a/src/apps/sctp_xconnect.c +++ b/src/apps/sctp_xconnect.c @@ -256,15 +256,15 @@ void data_received(struct msghdr *inmessage, int len, int stream, int socket) { (char *)inmessage->msg_iov->iov_base); if (active) { - sctp_sendmsg(socket, - ping, - strlen(ping) + 1, - (struct sockaddr *)&server_loop, - sizeof (server_loop), - ppid, - 0, - stream, - 0, 0); + error = sctp_sendmsg(socket, ping, strlen(ping) + 1, + (struct sockaddr *)&server_loop, + sizeof(server_loop), ppid, 0, + stream, 0, 0); + if (error < 0) { + printf("Send Failure: %s.\n", + strerror(errno)); + DUMP_CORE; + } } } } -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-sctp" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html