| 2709 | } |
| 2710 | |
| 2711 | void ECNotifier::NextPacketToSocket() |
| 2712 | { |
| 2713 | for(std::map<CECServerSocket *, ECUpdateMsgSource **>::iterator i = m_msg_source.begin(); |
| 2714 | i != m_msg_source.end(); ++i) { |
| 2715 | CECServerSocket *sock = i->first; |
| 2716 | if ( sock->HaveNotificationSupport() && !sock->DataPending() ) { |
| 2717 | ECUpdateMsgSource **notifier_array = i->second; |
| 2718 | // Same ownership contract as WriteDoneAndQueueEmpty: the |
| 2719 | // CECPacket from GetNextPacket is caller-owned and |
| 2720 | // SendPacket only serialises it. Wrap so it's freed at |
| 2721 | // scope exit (#765). |
| 2722 | CSmartPtr<CECPacket> packet(GetNextPacket(notifier_array)); |
| 2723 | if (packet) { |
| 2724 | //printf("[EC] sending update packet; opcode=%x\n",packet->GetOpCode()); |
| 2725 | sock->SendPacket(packet.get()); |
| 2726 | } |
| 2727 | } |
| 2728 | } |
| 2729 | } |
| 2730 | |
| 2731 | // File_checked_for_headers |
nothing calls this directly
no test coverage detected