Skip to content

Commit

Permalink
use sslConfiguration on socket
Browse files Browse the repository at this point in the history
A public accessor and mutator was provided for using a QSslConfiguration
with a QAmqpClient, however the configuration was never actually assigned
to the internal socket. This patch fixes that, and removes the needless
storage of a copy of the QSslConfiguration as well
  • Loading branch information
Matt Broadstone committed Feb 10, 2015
1 parent c4524b5 commit 99b0d32
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
5 changes: 2 additions & 3 deletions src/qamqpclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -789,17 +789,16 @@ QString QAmqpClient::errorString() const
QSslConfiguration QAmqpClient::sslConfiguration() const
{
Q_D(const QAmqpClient);
return d->sslConfiguration;
return d->socket->sslConfiguration();
}

void QAmqpClient::setSslConfiguration(const QSslConfiguration &config)
{
Q_D(QAmqpClient);
d->sslConfiguration = config;

if (!config.isNull()) {
d->useSsl = true;
d->port = AMQP_SSL_PORT;
d->socket->setSslConfiguration(config);
}
}

Expand Down
3 changes: 0 additions & 3 deletions src/qamqpclient_p.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include <QSharedPointer>
#include <QPointer>
#include <QAbstractSocket>
#include <QSslConfiguration>
#include <QSslError>

#include "qamqpglobal.h"
Expand Down Expand Up @@ -101,8 +100,6 @@ class QAMQP_EXPORT QAmqpClientPrivate : public QAmqpMethodFrameHandler
QAMQP::Error error;
QString errorString;

QSslConfiguration sslConfiguration;

QAmqpClient * const q_ptr;
Q_DECLARE_PUBLIC(QAmqpClient)

Expand Down

0 comments on commit 99b0d32

Please sign in to comment.