summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Examples/ConnectivityTest')
-rw-r--r--Swiften/Examples/ConnectivityTest/ConnectivityTest.cpp18
-rw-r--r--Swiften/Examples/ConnectivityTest/SConscript4
2 files changed, 11 insertions, 11 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();
}
diff --git a/Swiften/Examples/ConnectivityTest/SConscript b/Swiften/Examples/ConnectivityTest/SConscript
index 7bc3892..55a0821 100644
--- a/Swiften/Examples/ConnectivityTest/SConscript
+++ b/Swiften/Examples/ConnectivityTest/SConscript
@@ -1,7 +1,7 @@
Import("env")
myenv = env.Clone()
-myenv.MergeFlags(myenv["SWIFTEN_FLAGS"])
-myenv.MergeFlags(myenv["SWIFTEN_DEP_FLAGS"])
+myenv.UseFlags(myenv["SWIFTEN_FLAGS"])
+myenv.UseFlags(myenv["SWIFTEN_DEP_FLAGS"])
tester = myenv.Program("ConnectivityTest", ["ConnectivityTest.cpp"])