| 310 | |
| 311 | |
| 312 | const CECPacket *CECServerSocket::OnPacketReceived(const CECPacket *packet, uint32 trueSize) |
| 313 | { |
| 314 | packet->DebugPrint(true, trueSize); |
| 315 | |
| 316 | const CECPacket *reply = NULL; |
| 317 | |
| 318 | if (m_conn_state == CONN_FAILED) { |
| 319 | // Client didn't close the socket when authentication failed. |
| 320 | AddLogLineN(_("Client sent packet after authentication failed.")); |
| 321 | CloseSocket(); |
| 322 | } |
| 323 | |
| 324 | if (m_conn_state != CONN_ESTABLISHED) { |
| 325 | // This is called twice: |
| 326 | // 1) send salt |
| 327 | // 2) verify password |
| 328 | reply = Authenticate(packet); |
| 329 | } else { |
| 330 | reply = ProcessRequest2(packet); |
| 331 | } |
| 332 | return reply; |
| 333 | } |
| 334 | |
| 335 | |
| 336 | void CECServerSocket::OnLost() |
nothing calls this directly
no test coverage detected