[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.19-706-ge5415e9

hausmann at webkit.org hausmann at webkit.org
Thu Feb 4 21:35:18 UTC 2010


The following commit has been merged in the webkit-1.1 branch:
commit f336b512db32ab541e7ae25e62048df76df0d2f8
Author: hausmann at webkit.org <hausmann at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Feb 1 15:03:26 2010 +0000

    [Qt] Build without SSL support is broken
    
    Patch by Henry Haverinen <henry.haverinen at nokia.com> on 2010-02-01
    Reviewed by Simon Hausmann.
    
    Added missing #ifdefs for OpenSSL support and one null-pointer
    check for the socket.
    
    https://bugs.webkit.org/show_bug.cgi?id=34416
    
    * platform/network/qt/SocketStreamHandlePrivate.h:
    * platform/network/qt/SocketStreamHandleQt.cpp:
    (WebCore::SocketStreamHandlePrivate::SocketStreamHandlePrivate):
    (WebCore::SocketStreamHandlePrivate::send):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54134 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 894d9d3..1f93200 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2010-02-01  Henry Haverinen  <henry.haverinen at nokia.com>
+
+        Reviewed by Simon Hausmann.
+
+        [Qt] Build without SSL support is broken
+
+        Added missing #ifdefs for OpenSSL support and one null-pointer
+        check for the socket.
+
+        https://bugs.webkit.org/show_bug.cgi?id=34416
+
+        * platform/network/qt/SocketStreamHandlePrivate.h:
+        * platform/network/qt/SocketStreamHandleQt.cpp:
+        (WebCore::SocketStreamHandlePrivate::SocketStreamHandlePrivate):
+        (WebCore::SocketStreamHandlePrivate::send):
+
 2010-02-01  Pavel Feldman  <pfeldman at chromium.org>
 
         Reviewed by Timothy Hatcher.
diff --git a/WebCore/platform/network/qt/SocketStreamHandlePrivate.h b/WebCore/platform/network/qt/SocketStreamHandlePrivate.h
index 9433d3f..235f1b1 100644
--- a/WebCore/platform/network/qt/SocketStreamHandlePrivate.h
+++ b/WebCore/platform/network/qt/SocketStreamHandlePrivate.h
@@ -59,7 +59,9 @@ public slots:
     void socketError(QAbstractSocket::SocketError);
     void socketClosedCallback();
     void socketErrorCallback(int);
+#ifndef QT_NO_OPENSSL
     void socketSslErrors(const QList<QSslError>&);
+#endif
 public:
     QTcpSocket* m_socket;
     SocketStreamHandle* m_streamHandle;
diff --git a/WebCore/platform/network/qt/SocketStreamHandleQt.cpp b/WebCore/platform/network/qt/SocketStreamHandleQt.cpp
index d61d901..e666ff7 100644
--- a/WebCore/platform/network/qt/SocketStreamHandleQt.cpp
+++ b/WebCore/platform/network/qt/SocketStreamHandleQt.cpp
@@ -45,10 +45,17 @@ SocketStreamHandlePrivate::SocketStreamHandlePrivate(SocketStreamHandle* streamH
     m_streamHandle = streamHandle;
     m_socket = 0;
     bool isSecure = url.protocolIs("wss");
-    if (isSecure)
+
+    if (isSecure) {
+#ifndef QT_NO_OPENSSL
         m_socket = new QSslSocket(this);
-    else
+#endif
+    } else
         m_socket = new QTcpSocket(this);
+
+    if (!m_socket)
+        return;
+
     connect(m_socket, SIGNAL(connected()), this, SLOT(socketConnected()));
     connect(m_socket, SIGNAL(readyRead()), this, SLOT(socketReadyRead()));
     connect(m_socket, SIGNAL(disconnected()), this, SLOT(socketClosed()));
@@ -59,9 +66,11 @@ SocketStreamHandlePrivate::SocketStreamHandlePrivate(SocketStreamHandle* streamH
     unsigned int port = url.hasPort() ? url.port() : (isSecure ? 443 : 80);
 
     QString host = url.host();
-    if (isSecure)
+    if (isSecure) {
+#ifndef QT_NO_OPENSSL
         static_cast<QSslSocket*>(m_socket)->connectToHostEncrypted(host, port);
-    else
+#endif
+    } else
         m_socket->connectToHost(host, port);
 }
 
@@ -88,7 +97,7 @@ void SocketStreamHandlePrivate::socketReadyRead()
 
 int SocketStreamHandlePrivate::send(const char* data, int len)
 {
-    if (m_socket->state() != QAbstractSocket::ConnectedState)
+    if (!m_socket || m_socket->state() != QAbstractSocket::ConnectedState)
         return 0;
     quint64 sentSize = m_socket->write(data, len);
     QMetaObject::invokeMethod(this, "socketSentData", Qt::QueuedConnection);
@@ -138,6 +147,7 @@ void SocketStreamHandlePrivate::socketErrorCallback(int error)
     }
 }
 
+#ifndef QT_NO_OPENSSL
 void SocketStreamHandlePrivate::socketSslErrors(const QList<QSslError>&)
 {
     // FIXME: based on http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol-68#page-15
@@ -145,6 +155,8 @@ void SocketStreamHandlePrivate::socketSslErrors(const QList<QSslError>&)
     // We don't abort while this is still work in progress.
     static_cast<QSslSocket*>(m_socket)->ignoreSslErrors();
 }
+#endif
+
 SocketStreamHandle::SocketStreamHandle(const KURL& url, SocketStreamHandleClient* client)
     : SocketStreamHandleBase(url, client)
 {

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list