- 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
+ std::cerr << __FILE__ << ": real_run(): connection = " << connection
+ << std::endl;
+#endif // DEBUG
+ mutex.lock();
+ connections.push_back(connection);
+#ifdef DEBUG
+ std::cerr << __FILE__ << ": real_run(): lista de conexiones" << std::endl;
+ for (ConnectionList::const_iterator i = connections.begin();
+ i != connections.end(); i++) {
+ std::cerr << "\t " << *i << std::endl;
+ }
+#endif // DEBUG
+ mutex.unlock();