diff options
Diffstat (limited to 'src/http')
-rw-r--r-- | src/http/HTTPClientReceiver.cpp | 6 | ||||
-rw-r--r-- | src/http/HTTPClientSender.cpp | 12 | ||||
-rw-r--r-- | src/http/HTTPClientSender.hpp | 3 |
3 files changed, 9 insertions, 12 deletions
diff --git a/src/http/HTTPClientReceiver.cpp b/src/http/HTTPClientReceiver.cpp index dc1235e7..bb4b9c3b 100644 --- a/src/http/HTTPClientReceiver.cpp +++ b/src/http/HTTPClientReceiver.cpp @@ -166,14 +166,14 @@ HTTPClientReceiver::message_callback(SoupSession* session, SoupMessage* msg, voi } if (path == "/") { - me->_target->response_ok(0); + me->_target->response(0, SUCCESS); } else if (path == "/plugins") { if (msg->response_body->data == NULL) { LOG(error) << "Empty response" << endl; } else { Glib::Mutex::Lock lock(me->_mutex); - me->_target->response_ok(0); + me->_target->response(0, SUCCESS); me->_world->parser()->parse_string(me->_world, me->_target.get(), Glib::ustring(msg->response_body->data), me->_url); } @@ -183,7 +183,7 @@ HTTPClientReceiver::message_callback(SoupSession* session, SoupMessage* msg, voi LOG(error) << "Empty response" << endl; } else { Glib::Mutex::Lock lock(me->_mutex); - me->_target->response_ok(0); + me->_target->response(0, SUCCESS); me->_world->parser()->parse_string( me->_world, me->_target.get(), diff --git a/src/http/HTTPClientSender.cpp b/src/http/HTTPClientSender.cpp index 979d1e64..ea983ca4 100644 --- a/src/http/HTTPClientSender.cpp +++ b/src/http/HTTPClientSender.cpp @@ -36,14 +36,12 @@ namespace Ingen { namespace Server { void -HTTPClientSender::response_ok(int32_t id) +HTTPClientSender::response(int32_t id, Status status) { -} - -void -HTTPClientSender::response_error(int32_t id, const std::string& msg) -{ - warn << "HTTP Error " << id << " (" << msg << ")" << endl; + if (status) { + warn << "HTTP Error " << id + << " (" << ingen_status_string(status) << ")" << endl; + } } void diff --git a/src/http/HTTPClientSender.hpp b/src/http/HTTPClientSender.hpp index 761a60a6..c0af96df 100644 --- a/src/http/HTTPClientSender.hpp +++ b/src/http/HTTPClientSender.hpp @@ -63,8 +63,7 @@ public: /* *** ClientInterface Implementation Below *** */ - void response_ok(int32_t id); - void response_error(int32_t id, const std::string& msg); + void response(int32_t id, Status status); void error(const std::string& msg); |