summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Swift/Controllers/AccountController.cpp28
-rw-r--r--Swift/Controllers/Settings/XMLSettingsProvider.cpp6
-rw-r--r--Swift/QtUI/QtSwift.cpp32
-rw-r--r--Swift/QtUI/Roster/QtFilterWidget.cpp2
-rw-r--r--Swiften/Chat/ChatStateTracker.cpp2
-rw-r--r--Swiften/Client/ClientSession.cpp14
-rw-r--r--Swiften/Elements/JingleFileTransferFileInfo.h2
-rw-r--r--Swiften/Elements/StreamInitiationFileInfo.h2
-rw-r--r--Swiften/Examples/ConnectivityTest/ConnectivityTest.cpp2
-rw-r--r--Swiften/FileTransfer/IncrementalBytestreamHashCalculator.cpp4
-rw-r--r--Swiften/Serializer/PayloadSerializers/WhiteboardSerializer.cpp6
-rw-r--r--Swiften/TLS/SecureTransport/SecureTransportContext.mm2
12 files changed, 49 insertions, 53 deletions
diff --git a/Swift/Controllers/AccountController.cpp b/Swift/Controllers/AccountController.cpp
index 27655c0..b877ce9 100644
--- a/Swift/Controllers/AccountController.cpp
+++ b/Swift/Controllers/AccountController.cpp
@@ -837,37 +837,37 @@ void AccountController::handleQuitRequest() {
#define SERIALIZE_STRING(option) result += Base64::encode(createByteArray(options.option)); result += ",";
#define SERIALIZE_SAFE_STRING(option) result += safeByteArrayToString(Base64::encode(options.option)); result += ",";
#define SERIALIZE_URL(option) SERIALIZE_STRING(option.toString())
std::string AccountController::serializeClientOptions(const ClientOptions& options) {
std::string result;
- SERIALIZE_BOOL(useStreamCompression);
+ SERIALIZE_BOOL(useStreamCompression)
switch (options.useTLS) {
case ClientOptions::NeverUseTLS: result += "1";break;
case ClientOptions::UseTLSWhenAvailable: result += "2";break;
case ClientOptions::RequireTLS: result += "3";break;
}
result += ",";
- SERIALIZE_BOOL(allowPLAINWithoutTLS);
- SERIALIZE_BOOL(useStreamResumption);
- SERIALIZE_BOOL(useAcks);
- SERIALIZE_STRING(manualHostname);
- SERIALIZE_INT(manualPort);
+ SERIALIZE_BOOL(allowPLAINWithoutTLS)
+ SERIALIZE_BOOL(useStreamResumption)
+ SERIALIZE_BOOL(useAcks)
+ SERIALIZE_STRING(manualHostname)
+ SERIALIZE_INT(manualPort)
switch (options.proxyType) {
case ClientOptions::NoProxy: result += "1";break;
case ClientOptions::SystemConfiguredProxy: result += "2";break;
case ClientOptions::SOCKS5Proxy: result += "3";break;
case ClientOptions::HTTPConnectProxy: result += "4";break;
}
result += ",";
- SERIALIZE_STRING(manualProxyHostname);
- SERIALIZE_INT(manualProxyPort);
- SERIALIZE_URL(boshURL);
- SERIALIZE_URL(boshHTTPConnectProxyURL);
- SERIALIZE_SAFE_STRING(boshHTTPConnectProxyAuthID);
- SERIALIZE_SAFE_STRING(boshHTTPConnectProxyAuthPassword);
- SERIALIZE_BOOL(tlsOptions.schannelTLS1_0Workaround);
- SERIALIZE_BOOL(singleSignOn);
+ SERIALIZE_STRING(manualProxyHostname)
+ SERIALIZE_INT(manualProxyPort)
+ SERIALIZE_URL(boshURL)
+ SERIALIZE_URL(boshHTTPConnectProxyURL)
+ SERIALIZE_SAFE_STRING(boshHTTPConnectProxyAuthID)
+ SERIALIZE_SAFE_STRING(boshHTTPConnectProxyAuthPassword)
+ SERIALIZE_BOOL(tlsOptions.schannelTLS1_0Workaround)
+ SERIALIZE_BOOL(singleSignOn)
return result;
}
}
diff --git a/Swift/Controllers/Settings/XMLSettingsProvider.cpp b/Swift/Controllers/Settings/XMLSettingsProvider.cpp
index 8415209..f1049f1 100644
--- a/Swift/Controllers/Settings/XMLSettingsProvider.cpp
+++ b/Swift/Controllers/Settings/XMLSettingsProvider.cpp
@@ -65,13 +65,13 @@ void XMLSettingsProvider::storeSetting(const Setting<bool>& /*settingPath*/, con
}
int XMLSettingsProvider::getSetting(const Setting<int>& setting) {
if (values_.find(setting.getKey()) != values_.end()) {
std::string value = values_[setting.getKey()];
try {
- return value.empty() ? setting.getDefaultValue() : boost::lexical_cast<int>(value);;
+ return value.empty() ? setting.getDefaultValue() : boost::lexical_cast<int>(value);
}
catch(boost::bad_lexical_cast &) {}
}
return setting.getDefaultValue();
}
@@ -120,10 +120,6 @@ void XMLSettingsProvider::handleCharacterData(const std::string& data) {
currentText_ += data;
}
}
}
-
-
-
-
diff --git a/Swift/QtUI/QtSwift.cpp b/Swift/QtUI/QtSwift.cpp
index 8de5d70..f1ad38e 100644
--- a/Swift/QtUI/QtSwift.cpp
+++ b/Swift/QtUI/QtSwift.cpp
@@ -443,40 +443,40 @@ ClientOptions QtSwift::parseClientOptions(const std::string& optionString) {
ClientOptions result;
size_t i = 0;
int intVal = 0;
std::string stringVal;
std::vector<std::string> segments = String::split(optionString, ',');
- PARSE_BOOL(useStreamCompression, 1);
- PARSE_INT_RAW(-1);
+ PARSE_BOOL(useStreamCompression, 1)
+ PARSE_INT_RAW(-1)
switch (intVal) {
case 1: result.useTLS = ClientOptions::NeverUseTLS; break;
case 2: result.useTLS = ClientOptions::UseTLSWhenAvailable; break;
case 3: result.useTLS = ClientOptions::RequireTLS; break;
default:;
}
- PARSE_BOOL(allowPLAINWithoutTLS, 0);
- PARSE_BOOL(useStreamResumption, 0);
- PARSE_BOOL(useAcks, 1);
- PARSE_STRING(manualHostname);
- PARSE_INT(manualPort, -1);
- PARSE_INT_RAW(-1);
+ PARSE_BOOL(allowPLAINWithoutTLS, 0)
+ PARSE_BOOL(useStreamResumption, 0)
+ PARSE_BOOL(useAcks, 1)
+ PARSE_STRING(manualHostname)
+ PARSE_INT(manualPort, -1)
+ PARSE_INT_RAW(-1)
switch (intVal) {
case 1: result.proxyType = ClientOptions::NoProxy; break;
case 2: result.proxyType = ClientOptions::SystemConfiguredProxy; break;
case 3: result.proxyType = ClientOptions::SOCKS5Proxy; break;
case 4: result.proxyType = ClientOptions::HTTPConnectProxy; break;
}
- PARSE_STRING(manualProxyHostname);
- PARSE_INT(manualProxyPort, -1);
- PARSE_URL(boshURL);
- PARSE_URL(boshHTTPConnectProxyURL);
- PARSE_SAFE_STRING(boshHTTPConnectProxyAuthID);
- PARSE_SAFE_STRING(boshHTTPConnectProxyAuthPassword);
- PARSE_BOOL(tlsOptions.schannelTLS1_0Workaround, false);
- PARSE_BOOL(singleSignOn, false);
+ PARSE_STRING(manualProxyHostname)
+ PARSE_INT(manualProxyPort, -1)
+ PARSE_URL(boshURL)
+ PARSE_URL(boshHTTPConnectProxyURL)
+ PARSE_SAFE_STRING(boshHTTPConnectProxyAuthID)
+ PARSE_SAFE_STRING(boshHTTPConnectProxyAuthPassword)
+ PARSE_BOOL(tlsOptions.schannelTLS1_0Workaround, false)
+ PARSE_BOOL(singleSignOn, false)
return result;
}
}
diff --git a/Swift/QtUI/Roster/QtFilterWidget.cpp b/Swift/QtUI/Roster/QtFilterWidget.cpp
index 2f561bd..c017d29 100644
--- a/Swift/QtUI/Roster/QtFilterWidget.cpp
+++ b/Swift/QtUI/Roster/QtFilterWidget.cpp
@@ -79,13 +79,13 @@ bool QtFilterWidget::eventFilter(QObject*, QEvent* event) {
return false;
} else if (keyEvent->key() == Qt::Key_Alt && event->type() == QEvent::KeyPress) {
isModifierSinglePressed_ = true;
} else if ((keyEvent->key() == Qt::Key_Alt && event->type() == QEvent::KeyRelease && isModifierSinglePressed_)
|| (keyEvent->key() == Qt::Key_Menu)) {
QPoint itemOffset(2,2);
- QPoint contextMenuPosition = treeView_->visualRect(treeView_->currentIndex()).topLeft() + itemOffset;;
+ QPoint contextMenuPosition = treeView_->visualRect(treeView_->currentIndex()).topLeft() + itemOffset;
QApplication::postEvent(treeView_, new QContextMenuEvent(QContextMenuEvent::Keyboard, contextMenuPosition, treeView_->mapToGlobal(contextMenuPosition)));
return true;
} else if (keyEvent->key() == Qt::Key_Return) {
JID target = treeView_->selectedJID();
if (target.isValid()) {
eventStream_->send(std::make_shared<RequestChatUIEvent>(target));
diff --git a/Swiften/Chat/ChatStateTracker.cpp b/Swiften/Chat/ChatStateTracker.cpp
index 25ecd1c..839f47d 100644
--- a/Swiften/Chat/ChatStateTracker.cpp
+++ b/Swiften/Chat/ChatStateTracker.cpp
@@ -14,13 +14,13 @@ ChatStateTracker::ChatStateTracker() {
void ChatStateTracker::handleMessageReceived(std::shared_ptr<Message> message) {
if (message->getType() == Message::Error) {
return;
}
std::shared_ptr<ChatState> statePayload = message->getPayload<ChatState>();
if (statePayload) {
- changeState(statePayload->getChatState());;
+ changeState(statePayload->getChatState());
}
}
void ChatStateTracker::handlePresenceChange(std::shared_ptr<Presence> newPresence) {
if (newPresence->getType() == Presence::Unavailable) {
onChatStateChange(ChatState::Gone);
diff --git a/Swiften/Client/ClientSession.cpp b/Swiften/Client/ClientSession.cpp
index bb9be58..4e34417 100644
--- a/Swiften/Client/ClientSession.cpp
+++ b/Swiften/Client/ClientSession.cpp
@@ -119,13 +119,13 @@ void ClientSession::sendStanza(std::shared_ptr<Stanza> stanza) {
if (stanzaAckRequester_) {
stanzaAckRequester_->handleStanzaSent(stanza);
}
}
void ClientSession::handleStreamStart(const ProtocolHeader&) {
- CHECK_STATE_OR_RETURN(State::WaitingForStreamStart);
+ CHECK_STATE_OR_RETURN(State::WaitingForStreamStart)
state = State::Negotiating;
}
void ClientSession::handleStreamEnd() {
if (state == State::Finishing) {
// We are already in finishing state if we iniated the close of the session.
@@ -211,13 +211,13 @@ void ClientSession::handleElement(std::shared_ptr<ToplevelElement> element) {
stanzaAckResponder_->handleStanzaReceived();
}
onStanzaReceived(stanza);
}
}
else if (StreamFeatures* streamFeatures = dynamic_cast<StreamFeatures*>(element.get())) {
- CHECK_STATE_OR_RETURN(State::Negotiating);
+ CHECK_STATE_OR_RETURN(State::Negotiating)
if (streamFeatures->hasStartTLS() && stream->supportsTLSEncryption() && useTLS != NeverUseTLS) {
state = State::WaitingForEncrypt;
stream->writeElement(std::make_shared<StartTLSRequest>());
}
else if (useTLS == RequireTLS && !stream->isTLSEncrypted()) {
@@ -317,13 +317,13 @@ void ClientSession::handleElement(std::shared_ptr<ToplevelElement> element) {
else {
continueSessionInitialization();
}
}
}
else if (std::dynamic_pointer_cast<Compressed>(element)) {
- CHECK_STATE_OR_RETURN(State::Compressing);
+ CHECK_STATE_OR_RETURN(State::Compressing)
state = State::WaitingForStreamStart;
stream->addZLibCompression();
stream->resetXMPPParser();
sendStreamHeader();
}
else if (std::dynamic_pointer_cast<CompressFailure>(element)) {
@@ -340,13 +340,13 @@ void ClientSession::handleElement(std::shared_ptr<ToplevelElement> element) {
}
else if (std::dynamic_pointer_cast<StreamManagementFailed>(element)) {
needAcking = false;
continueSessionInitialization();
}
else if (AuthChallenge* challenge = dynamic_cast<AuthChallenge*>(element.get())) {
- CHECK_STATE_OR_RETURN(State::Authenticating);
+ CHECK_STATE_OR_RETURN(State::Authenticating)
assert(authenticator);
if (authenticator->setChallenge(challenge->getValue())) {
stream->writeElement(std::make_shared<AuthResponse>(authenticator->getResponse()));
}
#ifdef SWIFTEN_PLATFORM_WIN32
else if (WindowsGSSAPIClientAuthenticator* gssapiAuthenticator = dynamic_cast<WindowsGSSAPIClientAuthenticator*>(authenticator)) {
@@ -358,13 +358,13 @@ void ClientSession::handleElement(std::shared_ptr<ToplevelElement> element) {
#endif
else {
finishSession(Error::AuthenticationFailedError);
}
}
else if (AuthSuccess* authSuccess = dynamic_cast<AuthSuccess*>(element.get())) {
- CHECK_STATE_OR_RETURN(State::Authenticating);
+ CHECK_STATE_OR_RETURN(State::Authenticating)
assert(authenticator);
if (!authenticator->setChallenge(authSuccess->getValue())) {
finishSession(Error::ServerVerificationFailedError);
}
else {
state = State::WaitingForStreamStart;
@@ -375,13 +375,13 @@ void ClientSession::handleElement(std::shared_ptr<ToplevelElement> element) {
}
}
else if (dynamic_cast<AuthFailure*>(element.get())) {
finishSession(Error::AuthenticationFailedError);
}
else if (dynamic_cast<TLSProceed*>(element.get())) {
- CHECK_STATE_OR_RETURN(State::WaitingForEncrypt);
+ CHECK_STATE_OR_RETURN(State::WaitingForEncrypt)
state = State::Encrypting;
stream->addTLSEncryption();
}
else if (dynamic_cast<StartTLSFailure*>(element.get())) {
finishSession(Error::TLSError);
}
@@ -430,13 +430,13 @@ void ClientSession::sendCredentials(const SafeByteArray& password) {
authenticator->setCredentials(localJID.getNode(), password);
stream->writeElement(std::make_shared<AuthRequest>(authenticator->getName(), authenticator->getResponse()));
}
void ClientSession::handleTLSEncrypted() {
if (!std::dynamic_pointer_cast<BOSHSessionStream>(stream)) {
- CHECK_STATE_OR_RETURN(State::Encrypting);
+ CHECK_STATE_OR_RETURN(State::Encrypting)
}
std::vector<Certificate::ref> certificateChain = stream->getPeerCertificateChain();
std::shared_ptr<CertificateVerificationError> verificationError = stream->getPeerCertificateVerificationError();
if (verificationError) {
checkTrustOrFinish(certificateChain, verificationError);
diff --git a/Swiften/Elements/JingleFileTransferFileInfo.h b/Swiften/Elements/JingleFileTransferFileInfo.h
index 9fd8756..0e8ccd4 100644
--- a/Swiften/Elements/JingleFileTransferFileInfo.h
+++ b/Swiften/Elements/JingleFileTransferFileInfo.h
@@ -33,13 +33,13 @@ namespace Swift {
public:
typedef std::map<std::string, ByteArray> HashElementMap;
public:
void setName(const std::string& name) {
- name_ = name;;
+ name_ = name;
}
const std::string& getName() const {
return name_;
}
diff --git a/Swiften/Elements/StreamInitiationFileInfo.h b/Swiften/Elements/StreamInitiationFileInfo.h
index f2dc5b9..773814f 100644
--- a/Swiften/Elements/StreamInitiationFileInfo.h
+++ b/Swiften/Elements/StreamInitiationFileInfo.h
@@ -23,13 +23,13 @@ public:
public:
StreamInitiationFileInfo(const std::string& name = "", const std::string& description = "", unsigned long long size = 0,
const std::string& hash = "", const boost::posix_time::ptime &date = boost::posix_time::ptime(), const std::string& algo="md5") :
name(name), description(description), size(size), hash(hash), date(date), algo(algo), supportsRangeRequests(false), rangeOffset(0) {}
void setName(const std::string& name) {
- this->name = name;;
+ this->name = name;
}
const std::string& getName() const {
return this->name;
}
diff --git a/Swiften/Examples/ConnectivityTest/ConnectivityTest.cpp b/Swiften/Examples/ConnectivityTest/ConnectivityTest.cpp
index 607038f..cc783c6 100644
--- a/Swiften/Examples/ConnectivityTest/ConnectivityTest.cpp
+++ b/Swiften/Examples/ConnectivityTest/ConnectivityTest.cpp
@@ -74,13 +74,13 @@ int main(int argc, char* argv[]) {
char* timeoutChar = argv[argi++];
int timeout = atoi(timeoutChar);
timeout = (timeout ? timeout : 30) * 1000;
ClientXMLTracer* tracer = new ClientXMLTracer(client);
client->onConnected.connect(&handleConnected);
errorConnection = client->onDisconnected.connect(&handleDisconnected);
- std::cout << "Connecting to JID " << jid << " with timeout " << timeout << "ms on host: "; ;
+ std::cout << "Connecting to JID " << jid << " with timeout " << timeout << "ms on host: ";
if (!connectHost.empty()) {
std::cout << connectHost << std::endl;
ClientOptions options;
options.manualHostname = connectHost;
client->connect(options);
} else {
diff --git a/Swiften/FileTransfer/IncrementalBytestreamHashCalculator.cpp b/Swiften/FileTransfer/IncrementalBytestreamHashCalculator.cpp
index f177304..faddcb9 100644
--- a/Swiften/FileTransfer/IncrementalBytestreamHashCalculator.cpp
+++ b/Swiften/FileTransfer/IncrementalBytestreamHashCalculator.cpp
@@ -61,15 +61,15 @@ ByteArray IncrementalBytestreamHashCalculator::getMD5Hash() {
}
return *md5Hash;
}
std::string IncrementalBytestreamHashCalculator::getSHA1String() {
assert(sha1Hasher);
- return Hexify::hexify(getSHA1Hash());;
+ return Hexify::hexify(getSHA1Hash());
}
std::string IncrementalBytestreamHashCalculator::getMD5String() {
assert(md5Hasher);
- return Hexify::hexify(getMD5Hash());;
+ return Hexify::hexify(getMD5Hash());
}
}
diff --git a/Swiften/Serializer/PayloadSerializers/WhiteboardSerializer.cpp b/Swiften/Serializer/PayloadSerializers/WhiteboardSerializer.cpp
index 4743089..8c05c6f 100644
--- a/Swiften/Serializer/PayloadSerializers/WhiteboardSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/WhiteboardSerializer.cpp
@@ -64,26 +64,26 @@ namespace Swift {
element->setAttribute("x", std::to_string(rect.getX()));
element->setAttribute("y", std::to_string(rect.getY()));
element->setAttribute("width", std::to_string(rect.getWidth()));
element->setAttribute("height", std::to_string(rect.getHeight()));
element->setAttribute("id", rect.getID());
element->setAttribute("stroke", rect.getPenColor().toHex());
- element->setAttribute("fill", rect.getBrushColor().toHex());;
+ element->setAttribute("fill", rect.getBrushColor().toHex());
element->setAttribute("stroke-width", std::to_string(rect.getPenWidth()));
element->setAttribute("opacity", alphaToOpacity(rect.getPenColor().getAlpha()));
element->setAttribute("fill-opacity", alphaToOpacity(rect.getBrushColor().getAlpha()));
} catch (boost::bad_lexical_cast&) {
}
}
void WhiteboardElementSerializingVisitor::visit(WhiteboardPolygonElement& polygon) {
element = std::make_shared<XMLElement>("polygon");
try {
element->setAttribute("id", polygon.getID());
element->setAttribute("stroke", polygon.getPenColor().toHex());
- element->setAttribute("fill", polygon.getBrushColor().toHex());;
+ element->setAttribute("fill", polygon.getBrushColor().toHex());
element->setAttribute("stroke-width", std::to_string(polygon.getPenWidth()));
element->setAttribute("opacity", alphaToOpacity(polygon.getPenColor().getAlpha()));
element->setAttribute("fill-opacity", alphaToOpacity(polygon.getBrushColor().getAlpha()));
std::string points;
std::vector<std::pair<int, int> >::const_iterator it = polygon.getPoints().begin();
for (; it != polygon.getPoints().end(); ++it) {
@@ -114,13 +114,13 @@ namespace Swift {
element->setAttribute("cx", std::to_string(ellipse.getCX()));
element->setAttribute("cy", std::to_string(ellipse.getCY()));
element->setAttribute("rx", std::to_string(ellipse.getRX()));
element->setAttribute("ry", std::to_string(ellipse.getRY()));
element->setAttribute("id", ellipse.getID());
element->setAttribute("stroke", ellipse.getPenColor().toHex());
- element->setAttribute("fill", ellipse.getBrushColor().toHex());;
+ element->setAttribute("fill", ellipse.getBrushColor().toHex());
element->setAttribute("stroke-width", std::to_string(ellipse.getPenWidth()));
element->setAttribute("opacity", alphaToOpacity(ellipse.getPenColor().getAlpha()));
element->setAttribute("fill-opacity", alphaToOpacity(ellipse.getBrushColor().getAlpha()));
} catch (boost::bad_lexical_cast&) {
}
}
diff --git a/Swiften/TLS/SecureTransport/SecureTransportContext.mm b/Swiften/TLS/SecureTransport/SecureTransportContext.mm
index 1ed636b..25f476f 100644
--- a/Swiften/TLS/SecureTransport/SecureTransportContext.mm
+++ b/Swiften/TLS/SecureTransport/SecureTransportContext.mm
@@ -373,13 +373,13 @@ std::vector<Certificate::ref> SecureTransportContext::getPeerCertificateChain()
std::vector<Certificate::ref> peerCertificateChain;
if (sslContext_) {
typedef boost::remove_pointer<SecTrustRef>::type SecTrust;
std::shared_ptr<SecTrust> securityTrust;
- SecTrustRef secTrust = nullptr;;
+ SecTrustRef secTrust = nullptr;
OSStatus error = SSLCopyPeerTrust(sslContext_.get(), &secTrust);
if (error == noErr) {
securityTrust = std::shared_ptr<SecTrust>(secTrust, CFRelease);
CFIndex chainSize = SecTrustGetCertificateCount(securityTrust.get());
for (CFIndex n = 0; n < chainSize; n++) {