diff options
author | Gerald Begumisa <ben_g@users.sourceforge.net> | 2008-08-21 20:05:24 +0000 |
---|---|---|
committer | Gerald Begumisa <ben_g@users.sourceforge.net> | 2008-08-21 20:05:24 +0000 |
commit | 758c81485d816de9fbf76889979e6bd853f118dd (patch) | |
tree | ed8fe0011a66d22f9e277992cd7f7f92310e2725 /orkaudio/audiocaptureplugins/voip/VoIp.cpp | |
parent | 4d379dedb4894c89d8ce13ccd313e027cb5459a8 (diff) |
Adjusted the CCM5 packet parser to assume that Ccm5CallInfo packets have parties section of variable length.
git-svn-id: https://oreka.svn.sourceforge.net/svnroot/oreka/trunk@556 09dcff7a-b715-0410-9601-b79a96267cd0
Diffstat (limited to 'orkaudio/audiocaptureplugins/voip/VoIp.cpp')
-rw-r--r-- | orkaudio/audiocaptureplugins/voip/VoIp.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/orkaudio/audiocaptureplugins/voip/VoIp.cpp b/orkaudio/audiocaptureplugins/voip/VoIp.cpp index 418b685..1f8620b 100644 --- a/orkaudio/audiocaptureplugins/voip/VoIp.cpp +++ b/orkaudio/audiocaptureplugins/voip/VoIp.cpp @@ -1917,10 +1917,13 @@ void HandleSkinnyMessage(SkinnyHeaderStruct* skinnyHeader, IpHeaderStruct* ipHea { // Extract Calling and Called number. CStdString callingParty; + int partiesLen = 0; char* parties = (char*)(&ccm5CallInfo->parties); - GrabToken(parties, parties+SKINNY_CCM5_PARTIES_BLOCK_SIZE, callingParty); + + partiesLen = (int)packetEnd - (int)ccm5CallInfo - sizeof(SkCcm5CallInfoStruct); + GrabToken(parties, parties+partiesLen, callingParty); CStdString calledParty; - GrabToken(parties+callingParty.size()+1, parties+SKINNY_CCM5_PARTIES_BLOCK_SIZE, calledParty); + GrabToken(parties+callingParty.size()+1, parties+partiesLen, calledParty); CStdString callingPartyName; if(DLLCONFIG.m_skinnyNameAsLocalParty) @@ -1930,10 +1933,10 @@ void HandleSkinnyMessage(SkinnyHeaderStruct* skinnyHeader, IpHeaderStruct* ipHea char *partiesPtr = NULL; partiesPtr = parties; - while(tokenNr < 9 && partiesPtr < parties+SKINNY_CCM5_PARTIES_BLOCK_SIZE) + while(tokenNr < 9 && partiesPtr < parties+partiesLen) { callingPartyName = ""; - GrabTokenAcceptSpace(partiesPtr, parties+SKINNY_CCM5_PARTIES_BLOCK_SIZE, callingPartyName); + GrabTokenAcceptSpace(partiesPtr, parties+partiesLen, callingPartyName); partiesPtr += callingPartyName.size() + 1; tokenNr += 1; } |