diff options
author | Gerald Begumisa <ben_g@users.sourceforge.net> | 2007-06-12 11:15:29 +0000 |
---|---|---|
committer | Gerald Begumisa <ben_g@users.sourceforge.net> | 2007-06-12 11:15:29 +0000 |
commit | 503bb1cbfd003bb272ab952245905b0093160559 (patch) | |
tree | 179f0593406e9fc98f26099fec7a2fbdba36eb8e /orkaudio/audiocaptureplugins/voip/VoIp.cpp | |
parent | a88bf65cdb8fbac1ece84a67bf7031f138f2bfa2 (diff) |
Added support for a configuration value, UseMacIfNoLocalParty, which sets the local party to the MAC address, instead of the IP address, if local party is not present from signalling information
git-svn-id: https://oreka.svn.sourceforge.net/svnroot/oreka/trunk@446 09dcff7a-b715-0410-9601-b79a96267cd0
Diffstat (limited to 'orkaudio/audiocaptureplugins/voip/VoIp.cpp')
-rw-r--r-- | orkaudio/audiocaptureplugins/voip/VoIp.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/orkaudio/audiocaptureplugins/voip/VoIp.cpp b/orkaudio/audiocaptureplugins/voip/VoIp.cpp index c008bfc..f5f70e0 100644 --- a/orkaudio/audiocaptureplugins/voip/VoIp.cpp +++ b/orkaudio/audiocaptureplugins/voip/VoIp.cpp @@ -136,7 +136,6 @@ char* memFindEOL(char* start, char* limit) return start; } - // Grabs a string in memory until encountering null char, a space a CR or LF chars void GrabToken(char* in, char* limit, CStdString& out) { @@ -1014,6 +1013,8 @@ bool TryRtp(EthernetHeaderStruct* ethernetHeader, IpHeaderStruct* ipHeader, UdpH rtpInfo->m_timestamp = ntohl(rtpHeader->ts); rtpInfo->m_payload = payload; rtpInfo->m_arrivalTimestamp = time(NULL); + memcpy(rtpInfo->m_sourceMac, ethernetHeader->sourceMac, sizeof(rtpInfo->m_sourceMac)); + memcpy(rtpInfo->m_destMac, ethernetHeader->destinationMac, sizeof(rtpInfo->m_destMac)); if(s_rtpPacketLog->isDebugEnabled()) { @@ -1352,6 +1353,8 @@ bool TrySipInvite(EthernetHeaderStruct* ethernetHeader, IpHeaderStruct* ipHeader } info->m_senderIp = ipHeader->ip_src; info->m_receiverIp = ipHeader->ip_dest; + memcpy(info->m_senderMac, ethernetHeader->sourceMac, sizeof(info->m_senderMac)); + memcpy(info->m_receiverMac, ethernetHeader->destinationMac, sizeof(info->m_receiverMac)); CStdString logMsg; info->ToString(logMsg); |