X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/7e74b790d290cd7d776349503bb361c47933c01f..212f9ae5dc8899bab8b23ed13d81c28c510db3c3:/Server/src/transmitter.cpp diff --git a/Server/src/transmitter.cpp b/Server/src/transmitter.cpp index b59992e..4348da6 100644 --- a/Server/src/transmitter.cpp +++ b/Server/src/transmitter.cpp @@ -71,24 +71,25 @@ void Transmitter::real_run(void) { << ": real_run()." << endl; #endif // DEBUG // No hace nada, porque solo actua cuando se manda algo con send(). - while (!stop) { + while (!stop()) { Glib::usleep(500000); // 1/2 segundo } } void Transmitter::send(const string& data) { #ifdef DEBUG - cerr << __FILE__ << "(" << __LINE__ << ")" - << ": send(data = " << data << ")." << endl; + cerr << __FILE__ << "(" << __LINE__ << ")" + << ": send()." << endl; +// << ": send(data = " << data << ")." << endl; #endif // DEBUG - if (stop) { + if (stop()) { return; } try { socket << data << flush; } catch (const sockerr& e) { - error(e.serrno(), e.errstr()); - stop = true; + signal_error().emit(e.serrno(), e.errstr()); + stop(true); } }