Set localAddress and localPort on socket binding.

This should have always been the case, as it simply makes sense, but the
upcoming moving of binding to QAbstractSocket will require this for autotesting.

Change-Id: Ieef70196616227e7914c76fff5388a4068c36efb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
This commit is contained in:
Robin Burchell 2011-10-24 18:36:23 +02:00 committed by Sergio Ahumada
parent 0b924cdaee
commit 3aa81c55e2
2 changed files with 6 additions and 0 deletions

View File

@ -536,6 +536,9 @@ bool QNativeSocketEnginePrivate::nativeBind(const QHostAddress &address, quint16
return false;
}
localPort = port;
localAddress = address;
#if defined (QNATIVESOCKETENGINE_DEBUG)
qDebug("QNativeSocketEnginePrivate::nativeBind(%s, %i) == true",
address.toString().toLatin1().constData(), port);

View File

@ -768,6 +768,9 @@ bool QNativeSocketEnginePrivate::nativeBind(const QHostAddress &a, quint16 port)
return false;
}
localPort = port;
localAddress = address;
#if defined (QNATIVESOCKETENGINE_DEBUG)
qDebug("QNativeSocketEnginePrivate::nativeBind(%s, %i) == true",
address.toString().toLatin1().constData(), port);