]> git.llucax.com Git - z.facultad/75.42/plaqui.git/blobdiff - Server/src/controlserver.cpp
-Se arregla lo del id cuando se carga una planta
[z.facultad/75.42/plaqui.git] / Server / src / controlserver.cpp
index f5c6c730ca017c8b0610d860e7045e8c6d52fef0..32d3306254d717919069c56f0f8cb6c68f743f58 100644 (file)
@@ -63,7 +63,7 @@ void ControlServer::real_run(void) {
        while (!stop) {
                Command command;
                try {
        while (!stop) {
                Command command;
                try {
-                       Glib::Mutex::Lock lock(socket_mutex);
+                       //Glib::Mutex::Lock lock(socket_mutex);
                        socket >> command;
                // Si se cerró el socket.
                } catch (const ios::failure& e) {
                        socket >> command;
                // Si se cerró el socket.
                } catch (const ios::failure& e) {
@@ -77,6 +77,7 @@ void ControlServer::real_run(void) {
                                << e.code << " | reason = " << HTTPMessage::reason(e.code)
                                << " | desc = " << e.what() << endl;
 #endif // DEBUG
                                << e.code << " | reason = " << HTTPMessage::reason(e.code)
                                << " | desc = " << e.what() << endl;
 #endif // DEBUG
+                       //Glib::Mutex::Lock lock(socket_mutex);
                        socket << HTTPResponse(e) << flush;
                        continue;
                }
                        socket << HTTPResponse(e) << flush;
                        continue;
                }
@@ -178,8 +179,11 @@ Accept-Ranges: bytes
 }
 
 void ControlServer::send(const HTTPResponse& response) {
 }
 
 void ControlServer::send(const HTTPResponse& response) {
-       Glib::Mutex::Lock lock(socket_mutex);
+       //Glib::Mutex::Lock lock(socket_mutex);
        socket << response << flush;
        socket << response << flush;
+#ifdef DEBUG
+       cerr << __FILE__ << ": send() Enviado!" << endl;
+#endif // DEBUG
 }
 
 ControlServer::SignalCommandReceived& ControlServer::signal_command_received(void) {
 }
 
 ControlServer::SignalCommandReceived& ControlServer::signal_command_received(void) {