Date: Sun, 24 Jan 2016 22:31:34 +0000 (UTC) From: Michael Tuexen <tuexen@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r294694 - head/lib/libc/net Message-ID: <201601242231.u0OMVYKa033756@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: tuexen Date: Sun Jan 24 22:31:34 2016 New Revision: 294694 URL: https://svnweb.freebsd.org/changeset/base/294694 Log: sctp_sendx() needs to provide the assoc_id back. MFC after: 3 days Modified: head/lib/libc/net/sctp_sys_calls.c Modified: head/lib/libc/net/sctp_sys_calls.c ============================================================================== --- head/lib/libc/net/sctp_sys_calls.c Sun Jan 24 22:28:18 2016 (r294693) +++ head/lib/libc/net/sctp_sys_calls.c Sun Jan 24 22:31:34 2016 (r294694) @@ -700,14 +700,19 @@ sctp_sendx(int sd, const void *msg, size #ifdef SYS_sctp_generic_sendmsg if (addrcnt == 1) { socklen_t l; + ssize_t ret; /* * Quick way, we don't need to do a connectx so lets use the * syscall directly. */ l = addrs->sa_len; - return (syscall(SYS_sctp_generic_sendmsg, sd, - msg, msg_len, addrs, l, sinfo, flags)); + ret = syscall(SYS_sctp_generic_sendmsg, sd, + msg, msg_len, addrs, l, sinfo, flags); + if ((ret >= 0) && (sinfo != NULL)) { + sinfo->sinfo_assoc_id = sctp_getassocid(sd, addrs); + } + return (ret); } #endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601242231.u0OMVYKa033756>