From b0a2f053064f07d214d05fccc4a876b33f911c95 Mon Sep 17 00:00:00 2001 From: Jan Willamowius Date: Fri, 17 Aug 2018 14:26:41 +0200 Subject: [PATCH] fix ifdefs for H.460 feature detection --- RasSrv.cxx | 4 ++-- RasTbl.cxx | 10 ++++++---- RasTbl.h | 13 +++++++------ 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/RasSrv.cxx b/RasSrv.cxx index 8c5dc7e9..70fd0219 100644 --- a/RasSrv.cxx +++ b/RasSrv.cxx @@ -3969,7 +3969,7 @@ template<> bool RasPDU::Process() } } -#ifdef HAS_H460 +#ifdef H323_H4609 if (request.HasOptionalField(H225_DisengageRequest::e_genericData)) { H225_ArrayOf_GenericData & data = request.m_genericData; for (PINDEX i = 0; i < data.GetSize(); i++) { @@ -4360,7 +4360,7 @@ template<> bool RasPDU::Process() call = CallTbl->FindBySignalAdr(request.m_callSignalAddress[0]); if (call) call->Update(request); -#ifdef HAS_H460 +#ifdef H323_H4609 if (call && request.HasOptionalField(H225_InfoRequestResponse::e_genericData)) { H225_ArrayOf_GenericData & data = request.m_genericData; for (PINDEX i = 0; i < data.GetSize(); i++) { diff --git a/RasTbl.cxx b/RasTbl.cxx index 1491aff4..a965a3a6 100644 --- a/RasTbl.cxx +++ b/RasTbl.cxx @@ -1247,7 +1247,8 @@ bool EndpointRec::BuildPresencePDU(unsigned msgtag, PASN_OctetString & pdu) GkPresence & handler = Toolkit::Instance()->GetPresenceHandler(); return handler.BuildPresenceElement(msgtag, m_endpointIdentifier, pdu); } -#endif + +#else bool EndpointRec::HasPresenceData() { @@ -1257,7 +1258,8 @@ bool EndpointRec::HasPresenceData() m_hasH460PData = false; return true; } -#endif +#endif // HAS_H460P_VER_3 +#endif // HAS_H460P #ifdef H323_H350 static const char * LDAPServiceOID = "1.3.6.1.4.1.17090.2.1"; @@ -5427,7 +5429,7 @@ void CallTable::CheckRTPInactive() } } -#ifdef HAS_H460 +#ifdef H323_H4609 static PTextFile * OpenQoSFile(const PFilePath & fn) { @@ -5657,7 +5659,7 @@ void CallTable::QoSReport(const H225_DisengageRequest & obj_drq, const endptr & PTRACE(4, "QoS\tDRQ Call Statistics decode failure"); } } -#endif // HAS_H460 +#endif // H323_H4609 void CallTable::RemoveCall(const H225_DisengageRequest & obj_drq, const endptr & ep) { diff --git a/RasTbl.h b/RasTbl.h index 3d2aea96..82ff9099 100644 --- a/RasTbl.h +++ b/RasTbl.h @@ -242,13 +242,14 @@ class EndpointRec void SetUsesH460P(bool uses); bool UsesH460P() const { return m_usesH460P; } - bool HasPresenceData(); #ifdef HAS_H460P void ParsePresencePDU(const PASN_OctetString & pdu); -#ifndef HAS_H460P_VER_3 +#ifdef HAS_H460P_VER_3 + bool HasPresenceData(); +#else bool BuildPresencePDU(unsigned msgtag, PASN_OctetString & pdu); -#endif -#endif +#endif // HAS_H460P_VER_3 +#endif // HAS_H460P /** If this Endpoint would be register itself again with all the same data * how would this RRQ would look like? May be implemented with a @@ -1768,11 +1769,11 @@ class CallTable : public Singleton PString PrintStatistics() const; void PrintCallInfo(USocket *client, const PString & callid) const; -#ifdef HAS_H460 +#ifdef H323_H4609 void OnQosMonitoringReport(const PString &, const endptr &, H4609_QosMonitoringReportData &); void QoSReport(const H225_DisengageRequest &, const endptr &, const PASN_OctetString &); void QoSReport(const H225_InfoRequestResponse &, const callptr &, const endptr &, const PASN_OctetString &); -#endif +#endif // H323_H4609 void SupplyEndpointQoS(std::map & epqos) const; void LoadConfig();