summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Examples/ConnectivityTest/ConnectivityTest.cpp')
-rw-r--r--Swiften/Examples/ConnectivityTest/ConnectivityTest.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/Swiften/Examples/ConnectivityTest/ConnectivityTest.cpp b/Swiften/Examples/ConnectivityTest/ConnectivityTest.cpp
index 636a52a..df2a23d 100644
--- a/Swiften/Examples/ConnectivityTest/ConnectivityTest.cpp
+++ b/Swiften/Examples/ConnectivityTest/ConnectivityTest.cpp
@@ -21,15 +21,15 @@ using namespace Swift;
enum ExitCodes {OK = 0, CANNOT_CONNECT, CANNOT_AUTH, NO_RESPONSE, DISCO_ERROR};
-SimpleEventLoop eventLoop;
-BoostNetworkFactories networkFactories(&eventLoop);
+static SimpleEventLoop eventLoop;
+static BoostNetworkFactories networkFactories(&eventLoop);
-Client* client = 0;
-JID recipient;
-int exitCode = CANNOT_CONNECT;
-boost::bsignals::connection errorConnection;
+static Client* client = 0;
+static JID recipient;
+static int exitCode = CANNOT_CONNECT;
+static boost::bsignals::connection errorConnection;
-void handleServerDiscoInfoResponse(boost::shared_ptr<DiscoInfo> /*info*/, ErrorPayload::ref error) {
+static void handleServerDiscoInfoResponse(boost::shared_ptr<DiscoInfo> /*info*/, ErrorPayload::ref error) {
if (!error) {
errorConnection.disconnect();
client->disconnect();
@@ -41,14 +41,14 @@ void handleServerDiscoInfoResponse(boost::shared_ptr<DiscoInfo> /*info*/, ErrorP
}
}
-void handleConnected() {
+static void handleConnected() {
exitCode = NO_RESPONSE;
GetDiscoInfoRequest::ref discoInfoRequest = GetDiscoInfoRequest::create(JID(), client->getIQRouter());
discoInfoRequest->onResponse.connect(&handleServerDiscoInfoResponse);
discoInfoRequest->send();
}
-void handleDisconnected(const boost::optional<ClientError>&) {
+static void handleDisconnected(const boost::optional<ClientError>&) {
exitCode = CANNOT_AUTH;
eventLoop.stop();
}