X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/7e74b790d290cd7d776349503bb361c47933c01f..1855f998e5c0e51e2c1958724ac84cc13a87d84c:/Server/src/controlserver.cpp 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