- conn = new_connection(socket.accept());
- // TODO: poner lock.
- connections.push_back(conn);
- // TODO: sacar lock.
- // TODO: esto va en Server::new_connection()
+ connection = new_connection(socket.accept());
+#ifdef DEBUG
+ cerr << __FILE__ << ": real_run(): connection = " << connection
+ << endl;
+#endif // DEBUG
+ Glib::Mutex::Lock lock(connections_mutex);
+ // XXX connections_mutex.lock();
+ connections.push_back(connection);
+#ifdef DEBUG
+ cerr << __FILE__ << ": real_run(): lista de conexiones" << endl;
+ for (ConnectionList::const_iterator i = connections.begin();
+ i != connections.end(); i++) {
+ cerr << "\t " << *i << endl;
+ }
+#endif // DEBUG
+ // XXX connections_mutex.unlock(); // Si pongo el mutex antes del run(),
+ // muere.