diff options
author | truckman <truckman@FreeBSD.org> | 2002-08-21 11:57:12 +0000 |
---|---|---|
committer | truckman <truckman@FreeBSD.org> | 2002-08-21 11:57:12 +0000 |
commit | 7199888e8f06576febc8146d51d09b781470e8ce (patch) | |
tree | 20c70efb8a65a6f9c615daec57afaba3656fe3cc /lib/libc/stdio/vsnprintf.c | |
parent | 2d2341a634a0d5c812cce6d8552614bd05f799c4 (diff) | |
download | FreeBSD-src-7199888e8f06576febc8146d51d09b781470e8ce.zip FreeBSD-src-7199888e8f06576febc8146d51d09b781470e8ce.tar.gz |
Create new functions in_sockaddr(), in6_sockaddr(), and
in6_v4mapsin6_sockaddr() which allocate the appropriate sockaddr_in*
structure and initialize it with the address and port information passed
as arguments. Use calls to these new functions to replace code that is
replicated multiple times in in_setsockaddr(), in_setpeeraddr(),
in6_setsockaddr(), in6_setpeeraddr(), in6_mapped_sockaddr(), and
in6_mapped_peeraddr(). Inline COMMON_END in tcp_usr_accept() so that
we can call in_sockaddr() with temporary copies of the address and port
after the PCB is unlocked.
Fix the lock violation in tcp6_usr_accept() (caused by calling MALLOC()
inside in6_mapped_peeraddr() while the PCB is locked) by changing
the implementation of tcp6_usr_accept() to match tcp_usr_accept().
Reviewed by: suz
Diffstat (limited to 'lib/libc/stdio/vsnprintf.c')
0 files changed, 0 insertions, 0 deletions