X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/7e74b790d290cd7d776349503bb361c47933c01f..ffc9f02ea0544d4b1aa86e29afe12a2b4bace953:/Server/src/controlserver.cpp?ds=inline diff --git a/Server/src/controlserver.cpp b/Server/src/controlserver.cpp index a9cf729..1c253c5 100644 --- a/Server/src/controlserver.cpp +++ b/Server/src/controlserver.cpp @@ -57,23 +57,23 @@ ControlServer::ControlServer(const sockbuf::sockdesc& sd): #endif // DEBUG } -void ControlServer::real_run(void) { +void ControlServer::real_run(void) throw() { #ifdef DEBUG cerr << __FILE__ << "(" << __LINE__ << ")" << ": real_run()" << endl; #endif // DEBUG //char buf[BUFSIZ]; - while (!stop) { + while (!stop()) { Command command; try { //Glib::Mutex::Lock lock(socket_mutex); socket >> command; } catch (const ios::failure& e) { // TODO poner buenos codigos de error. - error(1000000, "Se desconectó."); + signal_error().emit(1000000, "Se desconectó."); return; } catch (const sockerr& e) { - error(e.serrno(), e.errstr()); + signal_error().emit(e.serrno(), e.errstr()); return; // Si se cerró el socket. //} catch (const ios::failure& e) { @@ -142,7 +142,7 @@ void ControlServer::real_run(void) { } } -void ControlServer::send(const HTTPResponse& response) { +void ControlServer::send(const Response& response) { //Glib::Mutex::Lock lock(socket_mutex); socket << response << flush; #ifdef DEBUG