mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-24 02:42:55 +00:00
do not copy socket address structure in qt_socket_getPortAndAddress() function
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
284f61d138
commit
45b4071517
1 changed files with 1 additions and 3 deletions
|
@ -57,10 +57,8 @@ static inline void qt_socket_getPortAndAddress(const struct sockaddr_storage *ss
|
|||
#if !defined(QT_NO_IPV6)
|
||||
if (ss->ss_family == AF_INET6) {
|
||||
struct sockaddr_in6 *si6 = (struct sockaddr_in6 *)ss;
|
||||
Q_IPV6ADDR tmp;
|
||||
memcpy(&tmp, &si6->sin6_addr, sizeof(tmp));
|
||||
if (addr) {
|
||||
addr->setAddress(tmp);
|
||||
addr->setAddress(si6->sin6_addr.s6_addr);
|
||||
#ifndef QT_NO_IPV6IFNAME
|
||||
QSTACKARRAY(char, scopeid, IFNAMSIZ);
|
||||
if (::if_indextoname(si6->sin6_scope_id, scopeid)) {
|
||||
|
|
Loading…
Add table
Reference in a new issue