summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Examples/SendMessage')
-rw-r--r--Swiften/Examples/SendMessage/SConscript4
-rw-r--r--Swiften/Examples/SendMessage/SendMessage.cpp18
2 files changed, 11 insertions, 11 deletions
diff --git a/Swiften/Examples/SendMessage/SConscript b/Swiften/Examples/SendMessage/SConscript
index 8907d25..0466187 100644
--- a/Swiften/Examples/SendMessage/SConscript
+++ b/Swiften/Examples/SendMessage/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("SendMessage", ["SendMessage.cpp"])
diff --git a/Swiften/Examples/SendMessage/SendMessage.cpp b/Swiften/Examples/SendMessage/SendMessage.cpp
index 07e289e..2a3170f 100644
--- a/Swiften/Examples/SendMessage/SendMessage.cpp
+++ b/Swiften/Examples/SendMessage/SendMessage.cpp
@@ -18,17 +18,17 @@
using namespace Swift;
-SimpleEventLoop eventLoop;
-BoostNetworkFactories networkFactories(&eventLoop);
+static SimpleEventLoop eventLoop;
+static BoostNetworkFactories networkFactories(&eventLoop);
-Client* client = 0;
-JID recipient;
-std::string messageBody;
-int exitCode = 2;
-boost::bsignals::connection errorConnection;
+static Client* client = 0;
+static JID recipient;
+static std::string messageBody;
+static int exitCode = 2;
+static boost::bsignals::connection errorConnection;
-void handleConnected() {
+static void handleConnected() {
boost::shared_ptr<Message> message(new Message());
message->setBody(messageBody);
message->setTo(recipient);
@@ -39,7 +39,7 @@ void handleConnected() {
eventLoop.stop();
}
-void handleDisconnected(const boost::optional<ClientError>&) {
+static void handleDisconnected(const boost::optional<ClientError>&) {
std::cerr << "Error!" << std::endl;
exitCode = 1;
eventLoop.stop();