diff options
author | axis <qt-info@nokia.com> | 2009-07-07 08:50:33 (GMT) |
---|---|---|
committer | axis <qt-info@nokia.com> | 2009-07-07 08:50:33 (GMT) |
commit | 1e192edd72789241e7397dcbc5ee326b2aed5790 (patch) | |
tree | 430961aed08cdfa25717bde84c3f74a2f75673fe /src/network/access/qhttpnetworkconnection.cpp | |
parent | 2aac0c8b71fffd7c0335c1429bd1f2405adaa5e7 (diff) | |
parent | 343e8b7e75c98a4fd1b692a230de8d1132988705 (diff) | |
download | Qt-1e192edd72789241e7397dcbc5ee326b2aed5790.zip Qt-1e192edd72789241e7397dcbc5ee326b2aed5790.tar.gz Qt-1e192edd72789241e7397dcbc5ee326b2aed5790.tar.bz2 |
Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qt
Conflicts:
configure.exe
src/network/access/qhttpnetworkconnection_p.h
tests/auto/qstyle/qstyle.pro
tests/auto/qstyle/tst_qstyle.cpp
tools/configure/configureapp.cpp
configure.exe will be recompiled in next commit. Took ours.
Diffstat (limited to 'src/network/access/qhttpnetworkconnection.cpp')
-rw-r--r-- | src/network/access/qhttpnetworkconnection.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp index 7755721..d53f93d 100644 --- a/src/network/access/qhttpnetworkconnection.cpp +++ b/src/network/access/qhttpnetworkconnection.cpp @@ -137,7 +137,9 @@ int QHttpNetworkConnectionPrivate::indexOf(QAbstractSocket *socket) const for (int i = 0; i < channelCount; ++i) if (channels[i].socket == socket) return i; - return -1; + + qFatal("Called with unknown socket object."); + return 0; } bool QHttpNetworkConnectionPrivate::isSocketBusy(QAbstractSocket *socket) const @@ -517,7 +519,7 @@ void QHttpNetworkConnectionPrivate::receiveReply(QAbstractSocket *socket, QHttpN // try to reconnect/resend before sending an error. if (channels[i].reconnectAttempts-- > 0) { resendCurrentRequest(socket); - } else { + } else if (reply) { reply->d_func()->errorString = errorDetail(QNetworkReply::RemoteHostClosedError, socket); emit reply->finishedWithError(QNetworkReply::RemoteHostClosedError, reply->d_func()->errorString); QMetaObject::invokeMethod(q, "_q_startNextRequest", Qt::QueuedConnection); @@ -790,6 +792,7 @@ void QHttpNetworkConnectionPrivate::createAuthorization(QAbstractSocket *socket, Q_ASSERT(socket); int i = indexOf(socket); + if (channels[i].authMehtod != QAuthenticatorPrivate::None) { if (!(channels[i].authMehtod == QAuthenticatorPrivate::Ntlm && channels[i].lastStatus != 401)) { QAuthenticatorPrivate *priv = QAuthenticatorPrivate::getPrivate(channels[i].authenticator); @@ -1324,7 +1327,8 @@ void QHttpNetworkConnectionPrivate::_q_encrypted() QAbstractSocket *socket = qobject_cast<QAbstractSocket*>(q->sender()); if (!socket) return; // ### error - channels[indexOf(socket)].state = IdleState; + int i = indexOf(socket); + channels[i].state = IdleState; sendRequest(socket); } |