diff options
Diffstat (limited to 'Swiften/Examples')
-rw-r--r-- | Swiften/Examples/BenchTool/BenchTool.cpp | 2 | ||||
-rw-r--r-- | Swiften/Examples/ConnectivityTest/ConnectivityTest.cpp | 6 | ||||
-rw-r--r-- | Swiften/Examples/NetworkTool/main.cpp | 6 | ||||
-rw-r--r-- | Swiften/Examples/SendMessage/SendMessage.cpp | 4 |
4 files changed, 9 insertions, 9 deletions
diff --git a/Swiften/Examples/BenchTool/BenchTool.cpp b/Swiften/Examples/BenchTool/BenchTool.cpp index ba6cf84..57edbac 100644 --- a/Swiften/Examples/BenchTool/BenchTool.cpp +++ b/Swiften/Examples/BenchTool/BenchTool.cpp @@ -26,7 +26,7 @@ int numberOfConnectedClients = 0; int numberOfInstances = 100; -void handleConnected() { +static void handleConnected() { numberOfConnectedClients++; std::cout << "Connected " << numberOfConnectedClients << std::endl; } diff --git a/Swiften/Examples/ConnectivityTest/ConnectivityTest.cpp b/Swiften/Examples/ConnectivityTest/ConnectivityTest.cpp index 636a52a..1f49fea 100644 --- a/Swiften/Examples/ConnectivityTest/ConnectivityTest.cpp +++ b/Swiften/Examples/ConnectivityTest/ConnectivityTest.cpp @@ -29,7 +29,7 @@ JID recipient; int exitCode = CANNOT_CONNECT; 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/NetworkTool/main.cpp b/Swiften/Examples/NetworkTool/main.cpp index 00c12d2..698ef4c 100644 --- a/Swiften/Examples/NetworkTool/main.cpp +++ b/Swiften/Examples/NetworkTool/main.cpp @@ -18,7 +18,7 @@ using namespace Swift; SimpleEventLoop eventLoop; -void handleGetPublicIPRequestResponse(const boost::optional<HostAddress>& result) { +static void handleGetPublicIPRequestResponse(const boost::optional<HostAddress>& result) { if (result) { std::cerr << "Result: " << result->toString() << std::endl;; } @@ -28,7 +28,7 @@ void handleGetPublicIPRequestResponse(const boost::optional<HostAddress>& result eventLoop.stop(); } -void handleGetForwardPortRequestResponse(const boost::optional<NATPortMapping>& result) { +static void handleGetForwardPortRequestResponse(const boost::optional<NATPortMapping>& result) { if (result) { std::cerr << "Result: " << result->getPublicPort() << " -> " << result->getLocalPort() << std::endl;; } @@ -38,7 +38,7 @@ void handleGetForwardPortRequestResponse(const boost::optional<NATPortMapping>& eventLoop.stop(); } -void handleRemovePortForwardingRequestResponse(bool result) { +static void handleRemovePortForwardingRequestResponse(bool result) { if (result) { std::cerr << "Result: OK" << std::endl; } diff --git a/Swiften/Examples/SendMessage/SendMessage.cpp b/Swiften/Examples/SendMessage/SendMessage.cpp index 07e289e..7f7a00d 100644 --- a/Swiften/Examples/SendMessage/SendMessage.cpp +++ b/Swiften/Examples/SendMessage/SendMessage.cpp @@ -28,7 +28,7 @@ int exitCode = 2; 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(); |