]> granicus.if.org Git - pdns/commitdiff
Added endl to log messages in send/recv wrapper
authorAki Tuomi <cmouse@desteem.org>
Mon, 8 Jul 2013 09:56:46 +0000 (12:56 +0300)
committerAki Tuomi <cmouse@desteem.org>
Mon, 8 Jul 2013 09:56:46 +0000 (12:56 +0300)
modules/remotebackend/remotebackend.cc

index e0de6043a5e3d4857e2232c732ac02da70cce839..7adedf43047a578f0a04bafc2f65b8cf59cb99a9 100644 (file)
@@ -66,35 +66,31 @@ RemoteBackend::~RemoteBackend() {
 }
 
 bool RemoteBackend::send(rapidjson::Document &value) {
-   bool result = false;
    try {
-     result = connector->send(value);
+     return connector->send(value);
    } catch (AhuException &ex) {
-     L<<Logger::Error<<"Exception caught when sending: " << ex.reason;
-     delete this->connector;
-     build();
+     L<<Logger::Error<<"Exception caught when sending: "<<ex.reason<<std::endl;
    } catch (...) {
-     L<<Logger::Error<<"Exception caught when sending";
-     delete this->connector;
-     build();
+     L<<Logger::Error<<"Exception caught when sending"<<std::endl;
    }
-   return result;
+
+   delete this->connector;
+   build();
+   return false;
 }
 
 bool RemoteBackend::recv(rapidjson::Document &value) {
-   bool result = false;
    try {
-     result = connector->recv(value);
+     return connector->recv(value);
    } catch (AhuException &ex) {
-     L<<Logger::Error<<"Exception caught when receiving: " << ex.reason;
-     delete this->connector;
-     build();
+     L<<Logger::Error<<"Exception caught when receiving: "<<ex.reason<<std::endl;
    } catch (...) {
-     L<<Logger::Error<<"Exception caught when receiving";
-     delete this->connector;
-     build();
+     L<<Logger::Error<<"Exception caught when receiving"<<std::endl;;
    }
-   return result;
+
+   delete this->connector;
+   build();
+   return false;
 }