mirror of
https://github.com/LX3JL/xlxd.git
synced 2025-12-06 07:42:01 +01:00
fix ambed to allow it to be used by multiple xlxd
the static Ip var was being shared by all instances of cstream class, then using same ambed by multiple xlxd's (on different ip's) would be a problem, we can just use m_Ip (that already stores the ip of the client reflector, set by controller class when creating cstream) to send packets back
This commit is contained in:
parent
53fdde921e
commit
b962b4883e
|
|
@ -174,7 +174,7 @@ void CStream::Thread(CStream *This)
|
|||
void CStream::Task(void)
|
||||
{
|
||||
CBuffer Buffer;
|
||||
static CIp Ip;
|
||||
CIp Ip;
|
||||
uint8 uiPid;
|
||||
uint8 Ambe[AMBE_FRAME_SIZE];
|
||||
CAmbePacket *packet;
|
||||
|
|
@ -207,7 +207,7 @@ void CStream::Task(void)
|
|||
queue->pop();
|
||||
// send it to client
|
||||
EncodeDvFramePacket(&Buffer, packet->GetPid(), packet->GetAmbe());
|
||||
m_Socket.Send(Buffer, Ip, m_uiPort);
|
||||
m_Socket.Send(Buffer, m_Ip, m_uiPort);
|
||||
// and done
|
||||
delete packet;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue