"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/h460/h46018_h225.cxx" between
h323plus-1_27_0.tar.gz and h323plus-1_27_1.tar.gz

About: H.323 Plus offers libraries for voice (VoIP) and videoconferencing using H.323.

h46018_h225.cxx  (h323plus-1_27_0):h46018_h225.cxx  (h323plus-1_27_1)
skipping to change at line 756 skipping to change at line 756
return i->first; return i->first;
} }
return 0; return 0;
} }
unsigned ResolveMuxIDFromSourceAddress(const muxSocketMap & socMap, muxPortMap & portMap, const PIPSocket::Address & addr, WORD port) unsigned ResolveMuxIDFromSourceAddress(const muxSocketMap & socMap, muxPortMap & portMap, const PIPSocket::Address & addr, WORD port)
{ {
PIPSocketAddressAndPort daddr; PIPSocketAddressAndPort daddr;
daddr.SetAddress(addr, port); daddr.SetAddress(addr, port);
map<PString, unsigned>::const_iterator it = portMap.find(daddr.AsString()); std::map<PString, unsigned>::const_iterator it = portMap.find(daddr.AsString ());
if (it != portMap.end()) if (it != portMap.end())
return it->second; return it->second;
unsigned id = DetectSourceAddress(socMap, addr, port); unsigned id = DetectSourceAddress(socMap, addr, port);
if (id) { if (id) {
PTRACE(2, "H46019M\tUnMUX Packet received from " << daddr.AsString() << " permenant assigned MUX " << id); PTRACE(2, "H46019M\tUnMUX Packet received from " << daddr.AsString() << " permenant assigned MUX " << id);
portMap.insert(pair<PString,unsigned>(daddr.AsString(),id)); portMap.insert(pair<PString,unsigned>(daddr.AsString(),id));
} }
return id; return id;
} }
unsigned ResolveSession(const muxSocketMap & socMap, unsigned muxID, PBoolean rt p, const PIPSocket::Address & addr, WORD port, unsigned & correctMUX) unsigned ResolveSession(const muxSocketMap & socMap, unsigned muxID, PBoolean rt p, const PIPSocket::Address & addr, WORD port, unsigned & correctMUX)
{ {
if (PNatMethod_H46019::IsMultiplexed()) { // Check the send/receive multip lex is around the wrong way if (PNatMethod_H46019::IsMultiplexed()) { // Check the send/receive multip lex is around the wrong way
H46019UDPSocket * mapSocket = NULL; H46019UDPSocket * mapSocket = NULL;
unsigned eraseID = 0; unsigned eraseID = 0;
for (map<unsigned, PUDPSocket*>::const_iterator i = socMap.begin(); i != s ocMap.end(); ++i) { for (std::map<unsigned, PUDPSocket*>::const_iterator i = socMap.begin(); i != socMap.end(); ++i) {
if (((H46019UDPSocket *)i->second)->GetSendMultiplexID() == muxID) { if (((H46019UDPSocket *)i->second)->GetSendMultiplexID() == muxID) {
mapSocket = (H46019UDPSocket *)i->second; mapSocket = (H46019UDPSocket *)i->second;
eraseID = i->first; eraseID = i->first;
correctMUX = eraseID; correctMUX = eraseID;
break; break;
} }
} }
if (eraseID > 0) { if (eraseID > 0) {
mapSocket->SetMultiplexID(muxID,true); mapSocket->SetMultiplexID(muxID,true);
PNatMethod_H46019::RegisterSocket(rtp,muxID, mapSocket); PNatMethod_H46019::RegisterSocket(rtp,muxID, mapSocket);
PNatMethod_H46019::UnregisterSocket(rtp, eraseID); PNatMethod_H46019::UnregisterSocket(rtp, eraseID);
return muxID; return muxID;
} }
} }
return DetectSourceAddress(socMap, addr, port); return DetectSourceAddress(socMap, addr, port);
} }
void CloseAllSessions(const muxSocketMap & socMap) void CloseAllSessions(const muxSocketMap & socMap)
{ {
if (PNatMethod_H46019::IsMultiplexed()) { // Check the send/receive multip lex is around the wrong way if (PNatMethod_H46019::IsMultiplexed()) { // Check the send/receive multip lex is around the wrong way
for (map<unsigned, PUDPSocket*>::const_iterator i = socMap.begin(); i != socMap.end(); ++i) { for (std::map<unsigned, PUDPSocket*>::const_iterator i = socMap.begin(); i != socMap.end(); ++i) {
i->second->Close(); i->second->Close();
} }
} }
} }
void PNatMethod_H46019::StartMultiplexListener() void PNatMethod_H46019::StartMultiplexListener()
{ {
if (m_readThread) if (m_readThread)
return; return;
skipping to change at line 852 skipping to change at line 852
else select = 0; else select = 0;
break; break;
default: default:
select = 0; select = 0;
continue; continue;
} }
if (!muxShutdown && socket && socket->ReadFrom(buffer.GetPointer(), len, add r, port)) { if (!muxShutdown && socket && socket->ReadFrom(buffer.GetPointer(), len, add r, port)) {
int actRead = socket->GetLastReadCount(); int actRead = socket->GetLastReadCount();
int muxHeader = buffer.GetMultiHeaderSize(); int muxHeader = buffer.GetMultiHeaderSize();
map<unsigned, PUDPSocket*>::const_iterator it; std::map<unsigned, PUDPSocket*>::const_iterator it;
switch (socketRead) { switch (socketRead) {
case H46019MultiplexSocket::e_rtp: case H46019MultiplexSocket::e_rtp:
{ {
DWORD multiplexID = 0; DWORD multiplexID = 0;
if (PNatMethod_H46019::IsMultiplexed() && !buffer.IsValidRTPPayl oad()) { if (PNatMethod_H46019::IsMultiplexed() && !buffer.IsValidRTPPayl oad()) {
if (!buffer.IsNotMultiplexed()) { if (!buffer.IsNotMultiplexed()) {
PTRACE(2, "H46019M\tBad RTP MUX Packet received from " < < addr << ":" << port); PTRACE(2, "H46019M\tBad RTP MUX Packet received from " < < addr << ":" << port);
continue; continue;
} }
// We have received a valid RTP UnMuxed Packet. // We have received a valid RTP UnMuxed Packet.
 End of changes. 4 change blocks. 
4 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)