Skip to content

Commit

Permalink
fix ifdefs for H.460 feature detection
Browse files Browse the repository at this point in the history
  • Loading branch information
willamowius committed Aug 17, 2018
1 parent 0b9d723 commit b0a2f05
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
4 changes: 2 additions & 2 deletions RasSrv.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -3969,7 +3969,7 @@ template<> bool RasPDU<H225_DisengageRequest>::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++) {
Expand Down Expand Up @@ -4360,7 +4360,7 @@ template<> bool RasPDU<H225_InfoRequestResponse>::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++) {
Expand Down
10 changes: 6 additions & 4 deletions RasTbl.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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()
{
Expand All @@ -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";
Expand Down Expand Up @@ -5427,7 +5429,7 @@ void CallTable::CheckRTPInactive()
}
}

#ifdef HAS_H460
#ifdef H323_H4609

static PTextFile * OpenQoSFile(const PFilePath & fn)
{
Expand Down Expand Up @@ -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)
{
Expand Down
13 changes: 7 additions & 6 deletions RasTbl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -1768,11 +1769,11 @@ class CallTable : public Singleton<CallTable>
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<PString, EPQoS> & epqos) const;

void LoadConfig();
Expand Down

0 comments on commit b0a2f05

Please sign in to comment.