From 503bb1cbfd003bb272ab952245905b0093160559 Mon Sep 17 00:00:00 2001 From: Gerald Begumisa Date: Tue, 12 Jun 2007 11:15:29 +0000 Subject: 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 --- orkaudio/audiocaptureplugins/voip/VoIp.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'orkaudio/audiocaptureplugins/voip/VoIp.cpp') 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); -- cgit v1.2.3