| 211 | } |
| 212 | |
| 213 | static bool get_socket_by_id(TCPSocket *socket, ConsoleServer &cs, u32 id) |
| 214 | { |
| 215 | ScopedMutex scoped_mutex(cs._clients_mutex); |
| 216 | |
| 217 | const u32 num_clients = vector::size(cs._clients); |
| 218 | for (u32 cc = 0; cc < num_clients; ++cc) { |
| 219 | if (cs._clients[cc].id == id) { |
| 220 | *socket = cs._clients[cc].socket; |
| 221 | return true; |
| 222 | } |
| 223 | } |
| 224 | |
| 225 | return false; |
| 226 | } |
| 227 | |
| 228 | } // namespace console_server_internal |
| 229 |
no test coverage detected