Merged revisions 177162 via svnmerge from

https://origsvn.digium.com/svn/asterisk/trunk

........
  r177162 | jpeeler | 2009-02-18 14:11:57 -0600 (Wed, 18 Feb 2009) | 14 lines
  
  Modify h323 to build against PTLib as well as the older PWLib
  
  Several changes in PTLib have occurred requiring build time detection. Changes
  accounted for include the library name change, config option change, install
  location change, and a boolean type change which is handled by ast_ptlib.h.
  Also, the sed check has been modified to properly work with autoconf >= 2.62.
  
  (closes issue #14224)
  Reported by: bergolth
  Patches:
        asterisk-autoconf-sed.patch uploaded by bergolth (license 661)
        asterisk-pwlib-v3.patch uploaded by bergolth (license 661)
  Tested by: jpeeler
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@177164 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.6.1
Jeff Peeler 16 years ago
parent 2b58929510
commit 10f903a9de

@ -103,12 +103,12 @@ if test "${HAS_PWLIB:-unset}" = "unset" ; then
else else
AC_CHECK_HEADER(/usr/local/include/ptlib.h, HAS_PWLIB=1, ) AC_CHECK_HEADER(/usr/local/include/ptlib.h, HAS_PWLIB=1, )
if test "${HAS_PWLIB:-unset}" != "unset" ; then if test "${HAS_PWLIB:-unset}" != "unset" ; then
AC_PATH_PROG(PTLIB_CONFIG, ptlib-config, , /usr/local/bin) AC_PATH_PROG(PTLIB_CONFIG, ptlib-config, , /usr/local/bin$PATH_SEPARATOR/usr/local/share/pwlib/make)
if test "${PTLIB_CONFIG:-unset}" = "unset" ; then
AC_PATH_PROG(PTLIB_CONFIG, ptlib-config, , /usr/local/share/pwlib/make)
fi
PWLIB_INCDIR="/usr/local/include" PWLIB_INCDIR="/usr/local/include"
PWLIB_LIBDIR=`${PTLIB_CONFIG} --pwlibdir` PWLIB_LIBDIR=`${PTLIB_CONFIG} --pwlibdir 2>/dev/null`
if test "${PWLIB_LIBDIR:-unset}" = "unset"; then
PWLIB_LIBDIR=`${PTLIB_CONFIG} --ptlibdir 2>/dev/null`
fi
if test "${PWLIB_LIBDIR:-unset}" = "unset"; then if test "${PWLIB_LIBDIR:-unset}" = "unset"; then
if test "x$LIB64" != "x"; then if test "x$LIB64" != "x"; then
PWLIB_LIBDIR="/usr/local/lib64" PWLIB_LIBDIR="/usr/local/lib64"
@ -121,9 +121,12 @@ if test "${HAS_PWLIB:-unset}" = "unset" ; then
else else
AC_CHECK_HEADER(/usr/include/ptlib.h, HAS_PWLIB=1, ) AC_CHECK_HEADER(/usr/include/ptlib.h, HAS_PWLIB=1, )
if test "${HAS_PWLIB:-unset}" != "unset" ; then if test "${HAS_PWLIB:-unset}" != "unset" ; then
AC_PATH_PROG(PTLIB_CONFIG, ptlib-config, , /usr/share/pwlib/make) AC_PATH_PROG(PTLIB_CONFIG, ptlib-config, , /usr/bin$PATH_SEPARATOR/usr/share/pwlib/make)
PWLIB_INCDIR="/usr/include" PWLIB_INCDIR="/usr/include"
PWLIB_LIBDIR=`${PTLIB_CONFIG} --pwlibdir` PWLIB_LIBDIR=`${PTLIB_CONFIG} --pwlibdir 2>/dev/null`
if test "${PWLIB_LIBDIR:-unset}" = "unset"; then
PWLIB_LIBDIR=`${PTLIB_CONFIG} --ptlibdir 2>/dev/null`
fi
if test "${PWLIB_LIBDIR:-unset}" = "unset"; then if test "${PWLIB_LIBDIR:-unset}" = "unset"; then
if test "x$LIB64" != "x"; then if test "x$LIB64" != "x"; then
PWLIB_LIBDIR="/usr/lib64" PWLIB_LIBDIR="/usr/lib64"
@ -188,8 +191,14 @@ fi
]) ])
AC_DEFUN([AST_CHECK_PWLIB_VERSION], [ AC_DEFUN([AST_CHECK_PWLIB_VERSION], [
if test "x$7" != "x"; then
VNAME="$7"
else
VNAME="$2_VERSION"
fi
if test "${HAS_$2:-unset}" != "unset"; then if test "${HAS_$2:-unset}" != "unset"; then
$2_VERSION=`grep "$2_VERSION" ${$2_INCDIR}/$3 | sed -e 's/[[[:space:]]]\{1,\}/ /g' | cut -f3 -d ' ' | sed -e 's/"//g'` $2_VERSION=`grep "$VNAME" ${$2_INCDIR}/$3 | sed -e 's/[[[:space:]]]\{1,\}/ /g' | cut -f3 -d ' ' | sed -e 's/"//g'`
$2_MAJOR_VERSION=`echo ${$2_VERSION} | cut -f1 -d.` $2_MAJOR_VERSION=`echo ${$2_VERSION} | cut -f1 -d.`
$2_MINOR_VERSION=`echo ${$2_VERSION} | cut -f2 -d.` $2_MINOR_VERSION=`echo ${$2_VERSION} | cut -f2 -d.`
$2_BUILD_NUMBER=`echo ${$2_VERSION} | cut -f3 -d.` $2_BUILD_NUMBER=`echo ${$2_VERSION} | cut -f3 -d.`

@ -12,7 +12,8 @@ AC_DEFUN([AST_PROG_SED],
done done
echo "$ac_script" | sed 99q >conftest.sed echo "$ac_script" | sed 99q >conftest.sed
$as_unset ac_script || ac_script= $as_unset ac_script || ac_script=
_AC_PATH_PROG_FEATURE_CHECK(SED, [sed gsed], ifdef([_AC_PATH_PROGS_FEATURE_CHECK],[],[define([_AC_PATH_PROGS_FEATURE_CHECK],defn([_AC_PATH_PROG_FEATURE_CHECK]))])
_AC_PATH_PROGS_FEATURE_CHECK(SED, [sed gsed],
[_AC_FEATURE_CHECK_LENGTH([ac_path_SED], [ac_cv_path_SED], [_AC_FEATURE_CHECK_LENGTH([ac_path_SED], [ac_cv_path_SED],
["$ac_path_SED" -f conftest.sed])])]) ["$ac_path_SED" -f conftest.sed])])])
SED="$ac_cv_path_SED" SED="$ac_cv_path_SED"

@ -63,8 +63,6 @@ extern "C" {
#include "cisco-h225.h" #include "cisco-h225.h"
#include "caps_h323.h" #include "caps_h323.h"
#include <ptbuildopts.h>
#if PWLIB_MAJOR * 10000 + PWLIB_MINOR * 100 + PWLIB_BUILD >= 1 * 10000 + 12 * 100 + 0 #if PWLIB_MAJOR * 10000 + PWLIB_MINOR * 100 + PWLIB_BUILD >= 1 * 10000 + 12 * 100 + 0
#define SKIP_PWLIB_PIPE_BUG_WORKAROUND 1 #define SKIP_PWLIB_PIPE_BUG_WORKAROUND 1
#endif #endif
@ -331,7 +329,7 @@ void MyH323EndPoint::SetGateway(void)
terminalType = e_GatewayOnly; terminalType = e_GatewayOnly;
} }
BOOL MyH323EndPoint::ClearCall(const PString & token, H323Connection::CallEndReason reason) PBoolean MyH323EndPoint::ClearCall(const PString & token, H323Connection::CallEndReason reason)
{ {
if (h323debug) { if (h323debug) {
#ifdef PTRACING #ifdef PTRACING
@ -343,7 +341,7 @@ BOOL MyH323EndPoint::ClearCall(const PString & token, H323Connection::CallEndRea
return H323EndPoint::ClearCall(token, reason); return H323EndPoint::ClearCall(token, reason);
} }
BOOL MyH323EndPoint::ClearCall(const PString & token) PBoolean MyH323EndPoint::ClearCall(const PString & token)
{ {
if (h323debug) { if (h323debug) {
cout << "\t-- ClearCall: Request to clear call with token " << token << endl; cout << "\t-- ClearCall: Request to clear call with token " << token << endl;
@ -371,7 +369,7 @@ void MyH323EndPoint::OnClosedLogicalChannel(H323Connection & connection, const H
H323EndPoint::OnClosedLogicalChannel(connection, channel); H323EndPoint::OnClosedLogicalChannel(connection, channel);
} }
BOOL MyH323EndPoint::OnConnectionForwarded(H323Connection & connection, PBoolean MyH323EndPoint::OnConnectionForwarded(H323Connection & connection,
const PString & forwardParty, const PString & forwardParty,
const H323SignalPDU & pdu) const H323SignalPDU & pdu)
{ {
@ -381,7 +379,7 @@ BOOL MyH323EndPoint::OnConnectionForwarded(H323Connection & connection,
return FALSE; return FALSE;
} }
BOOL MyH323EndPoint::ForwardConnection(H323Connection & connection, PBoolean MyH323EndPoint::ForwardConnection(H323Connection & connection,
const PString & forwardParty, const PString & forwardParty,
const H323SignalPDU & pdu) const H323SignalPDU & pdu)
{ {
@ -585,9 +583,9 @@ MyH323Connection::~MyH323Connection()
return; return;
} }
BOOL MyH323Connection::OnReceivedProgress(const H323SignalPDU &pdu) PBoolean MyH323Connection::OnReceivedProgress(const H323SignalPDU &pdu)
{ {
BOOL isInband; PBoolean isInband;
unsigned pi; unsigned pi;
if (!H323Connection::OnReceivedProgress(pdu)) { if (!H323Connection::OnReceivedProgress(pdu)) {
@ -613,7 +611,7 @@ BOOL MyH323Connection::OnReceivedProgress(const H323SignalPDU &pdu)
return connectionState != ShuttingDownConnection; return connectionState != ShuttingDownConnection;
} }
BOOL MyH323Connection::MySendProgress() PBoolean MyH323Connection::MySendProgress()
{ {
/* The code taken from H323Connection::AnsweringCall() but ALWAYS send /* The code taken from H323Connection::AnsweringCall() but ALWAYS send
PROGRESS message, including slow start operations */ PROGRESS message, including slow start operations */
@ -693,7 +691,7 @@ H323Connection::AnswerCallResponse MyH323Connection::OnAnswerCall(const PString
return ((pi || (fastStartState != FastStartDisabled)) ? AnswerCallDeferredWithMedia : AnswerCallDeferred); return ((pi || (fastStartState != FastStartDisabled)) ? AnswerCallDeferredWithMedia : AnswerCallDeferred);
} }
BOOL MyH323Connection::OnAlerting(const H323SignalPDU & alertingPDU, const PString & username) PBoolean MyH323Connection::OnAlerting(const H323SignalPDU & alertingPDU, const PString & username)
{ {
if (h323debug) { if (h323debug) {
cout << "\t=-= In OnAlerting for call " << GetCallReference() cout << "\t=-= In OnAlerting for call " << GetCallReference()
@ -702,7 +700,7 @@ BOOL MyH323Connection::OnAlerting(const H323SignalPDU & alertingPDU, const PStri
} }
if (on_progress) { if (on_progress) {
BOOL isInband; PBoolean isInband;
unsigned alertingPI; unsigned alertingPI;
if (!alertingPDU.GetQ931().GetProgressIndicator(alertingPI)) { if (!alertingPDU.GetQ931().GetProgressIndicator(alertingPI)) {
@ -726,7 +724,7 @@ BOOL MyH323Connection::OnAlerting(const H323SignalPDU & alertingPDU, const PStri
return connectionState != ShuttingDownConnection; return connectionState != ShuttingDownConnection;
} }
void MyH323Connection::SetCallOptions(void *o, BOOL isIncoming) void MyH323Connection::SetCallOptions(void *o, PBoolean isIncoming)
{ {
call_options_t *opts = (call_options_t *)o; call_options_t *opts = (call_options_t *)o;
@ -757,7 +755,7 @@ void MyH323Connection::SetCallOptions(void *o, BOOL isIncoming)
tunnelOptions = opts->tunnelOptions; tunnelOptions = opts->tunnelOptions;
} }
void MyH323Connection::SetCallDetails(void *callDetails, const H323SignalPDU &setupPDU, BOOL isIncoming) void MyH323Connection::SetCallDetails(void *callDetails, const H323SignalPDU &setupPDU, PBoolean isIncoming)
{ {
PString sourceE164; PString sourceE164;
PString destE164; PString destE164;
@ -852,7 +850,7 @@ void MyH323Connection::SetCallDetails(void *callDetails, const H323SignalPDU &se
} }
#ifdef TUNNELLING #ifdef TUNNELLING
static BOOL FetchInformationElements(Q931 &q931, const PBYTEArray &data) static PBoolean FetchInformationElements(Q931 &q931, const PBYTEArray &data)
{ {
PINDEX offset = 0; PINDEX offset = 0;
@ -910,9 +908,9 @@ static BOOL FetchInformationElements(Q931 &q931, const PBYTEArray &data)
return TRUE; return TRUE;
} }
static BOOL FetchCiscoTunneledInfo(Q931 &q931, const H323SignalPDU &pdu) static PBoolean FetchCiscoTunneledInfo(Q931 &q931, const H323SignalPDU &pdu)
{ {
BOOL res = FALSE; PBoolean res = FALSE;
const H225_H323_UU_PDU &uuPDU = pdu.m_h323_uu_pdu; const H225_H323_UU_PDU &uuPDU = pdu.m_h323_uu_pdu;
if(uuPDU.HasOptionalField(H225_H323_UU_PDU::e_nonStandardControl)) { if(uuPDU.HasOptionalField(H225_H323_UU_PDU::e_nonStandardControl)) {
@ -929,7 +927,7 @@ static BOOL FetchCiscoTunneledInfo(Q931 &q931, const H323SignalPDU &pdu)
CISCO_H225_H323_UU_NonStdInfo c; CISCO_H225_H323_UU_NonStdInfo c;
PPER_Stream strm(data); PPER_Stream strm(data);
if (c.Decode(strm)) { if (c.Decode(strm)) {
BOOL haveIEs = FALSE; PBoolean haveIEs = FALSE;
if (h323debug) if (h323debug)
cout << setprecision(0) << "H323_UU_NonStdInfo = " << c << endl; cout << setprecision(0) << "H323_UU_NonStdInfo = " << c << endl;
if (c.HasOptionalField(CISCO_H225_H323_UU_NonStdInfo::e_protoParam)) { if (c.HasOptionalField(CISCO_H225_H323_UU_NonStdInfo::e_protoParam)) {
@ -954,19 +952,19 @@ static BOOL FetchCiscoTunneledInfo(Q931 &q931, const H323SignalPDU &pdu)
return res; return res;
} }
static BOOL EmbedCiscoTunneledInfo(H323SignalPDU &pdu) static PBoolean EmbedCiscoTunneledInfo(H323SignalPDU &pdu)
{ {
static const struct { static const struct {
Q931::InformationElementCodes ie; Q931::InformationElementCodes ie;
BOOL dontDelete; PBoolean dontDelete;
} codes[] = { } codes[] = {
{ Q931::RedirectingNumberIE, }, { Q931::RedirectingNumberIE, },
{ Q931::FacilityIE, }, { Q931::FacilityIE, },
// { Q931::CallingPartyNumberIE, TRUE }, // { Q931::CallingPartyNumberIE, TRUE },
}; };
BOOL res = FALSE; PBoolean res = FALSE;
BOOL notRedirOnly = FALSE; PBoolean notRedirOnly = FALSE;
Q931 tmpQ931; Q931 tmpQ931;
Q931 &q931 = pdu.GetQ931(); Q931 &q931 = pdu.GetQ931();
@ -1024,9 +1022,9 @@ static BOOL EmbedCiscoTunneledInfo(H323SignalPDU &pdu)
static const char OID_QSIG[] = "1.3.12.9"; static const char OID_QSIG[] = "1.3.12.9";
static BOOL FetchQSIGTunneledInfo(Q931 &q931, const H323SignalPDU &pdu) static PBoolean FetchQSIGTunneledInfo(Q931 &q931, const H323SignalPDU &pdu)
{ {
BOOL res = FALSE; PBoolean res = FALSE;
const H225_H323_UU_PDU &uuPDU = pdu.m_h323_uu_pdu; const H225_H323_UU_PDU &uuPDU = pdu.m_h323_uu_pdu;
if (uuPDU.HasOptionalField(H225_H323_UU_PDU::e_tunnelledSignallingMessage)) { if (uuPDU.HasOptionalField(H225_H323_UU_PDU::e_tunnelledSignallingMessage)) {
const H225_H323_UU_PDU_tunnelledSignallingMessage &sig = uuPDU.m_tunnelledSignallingMessage; const H225_H323_UU_PDU_tunnelledSignallingMessage &sig = uuPDU.m_tunnelledSignallingMessage;
@ -1074,7 +1072,7 @@ static H225_EndpointType *GetEndpointType(H323SignalPDU &pdu)
return NULL; return NULL;
} }
static BOOL QSIGTunnelRequested(H323SignalPDU &pdu) static PBoolean QSIGTunnelRequested(H323SignalPDU &pdu)
{ {
H225_EndpointType *epType = GetEndpointType(pdu); H225_EndpointType *epType = GetEndpointType(pdu);
if (epType) { if (epType) {
@ -1093,7 +1091,7 @@ static BOOL QSIGTunnelRequested(H323SignalPDU &pdu)
return FALSE; return FALSE;
} }
static BOOL EmbedQSIGTunneledInfo(H323SignalPDU &pdu) static PBoolean EmbedQSIGTunneledInfo(H323SignalPDU &pdu)
{ {
static const Q931::InformationElementCodes codes[] = static const Q931::InformationElementCodes codes[] =
{ Q931::RedirectingNumberIE, Q931::FacilityIE }; { Q931::RedirectingNumberIE, Q931::FacilityIE };
@ -1118,7 +1116,7 @@ static BOOL EmbedQSIGTunneledInfo(H323SignalPDU &pdu)
(*epType).m_supportedTunnelledProtocols.SetSize(0); (*epType).m_supportedTunnelledProtocols.SetSize(0);
} }
H225_ArrayOf_TunnelledProtocol &protos = (*epType).m_supportedTunnelledProtocols; H225_ArrayOf_TunnelledProtocol &protos = (*epType).m_supportedTunnelledProtocols;
BOOL addQSIG = TRUE; PBoolean addQSIG = TRUE;
for (int i = 0; i < protos.GetSize(); ++i) for (int i = 0; i < protos.GetSize(); ++i)
{ {
if ((protos[i].GetTag() == H225_TunnelledProtocol_id::e_tunnelledProtocolObjectID) && if ((protos[i].GetTag() == H225_TunnelledProtocol_id::e_tunnelledProtocolObjectID) &&
@ -1150,7 +1148,7 @@ static BOOL EmbedQSIGTunneledInfo(H323SignalPDU &pdu)
return TRUE; return TRUE;
} }
BOOL MyH323Connection::EmbedTunneledInfo(H323SignalPDU &pdu) PBoolean MyH323Connection::EmbedTunneledInfo(H323SignalPDU &pdu)
{ {
if ((tunnelOptions & H323_TUNNEL_QSIG) || (remoteTunnelOptions & H323_TUNNEL_QSIG)) if ((tunnelOptions & H323_TUNNEL_QSIG) || (remoteTunnelOptions & H323_TUNNEL_QSIG))
EmbedQSIGTunneledInfo(pdu); EmbedQSIGTunneledInfo(pdu);
@ -1161,7 +1159,7 @@ BOOL MyH323Connection::EmbedTunneledInfo(H323SignalPDU &pdu)
} }
/* Handle tunneled messages */ /* Handle tunneled messages */
BOOL MyH323Connection::HandleSignalPDU(H323SignalPDU &pdu) PBoolean MyH323Connection::HandleSignalPDU(H323SignalPDU &pdu)
{ {
if (pdu.GetQ931().HasIE(Q931::UserUserIE)) { if (pdu.GetQ931().HasIE(Q931::UserUserIE)) {
Q931 tunneledInfo; Q931 tunneledInfo;
@ -1196,7 +1194,7 @@ BOOL MyH323Connection::HandleSignalPDU(H323SignalPDU &pdu)
} }
#endif #endif
BOOL MyH323Connection::OnReceivedSignalSetup(const H323SignalPDU & setupPDU) PBoolean MyH323Connection::OnReceivedSignalSetup(const H323SignalPDU & setupPDU)
{ {
call_details_t cd; call_details_t cd;
@ -1232,7 +1230,7 @@ BOOL MyH323Connection::OnReceivedSignalSetup(const H323SignalPDU & setupPDU)
return H323Connection::OnReceivedSignalSetup(setupPDU); return H323Connection::OnReceivedSignalSetup(setupPDU);
} }
BOOL MyH323Connection::OnSendSignalSetup(H323SignalPDU & setupPDU) PBoolean MyH323Connection::OnSendSignalSetup(H323SignalPDU & setupPDU)
{ {
call_details_t cd; call_details_t cd;
@ -1282,7 +1280,7 @@ BOOL MyH323Connection::OnSendSignalSetup(H323SignalPDU & setupPDU)
return H323Connection::OnSendSignalSetup(setupPDU); return H323Connection::OnSendSignalSetup(setupPDU);
} }
static BOOL BuildFastStartList(const H323Channel & channel, static PBoolean BuildFastStartList(const H323Channel & channel,
H225_ArrayOf_PASN_OctetString & array, H225_ArrayOf_PASN_OctetString & array,
H323Channel::Directions reverseDirection) H323Channel::Directions reverseDirection)
{ {
@ -1471,7 +1469,7 @@ H323Connection::CallEndReason MyH323Connection::SendSignalSetup(const PString &
signallingChannel->SetWriteTimeout(100); signallingChannel->SetWriteTimeout(100);
BOOL connectFailed = !signallingChannel->Connect(); PBoolean connectFailed = !signallingChannel->Connect();
// Lock while checking for shutting down. // Lock while checking for shutting down.
if (!Lock()) if (!Lock())
@ -1546,14 +1544,14 @@ H323Connection::CallEndReason MyH323Connection::SendSignalSetup(const PString &
setupPDU.GetQ931().GetCalledPartyNumber(remotePartyNumber); setupPDU.GetQ931().GetCalledPartyNumber(remotePartyNumber);
fastStartState = FastStartDisabled; fastStartState = FastStartDisabled;
BOOL set_lastPDUWasH245inSETUP = FALSE; PBoolean set_lastPDUWasH245inSETUP = FALSE;
if (h245Tunneling && doH245inSETUP) { if (h245Tunneling && doH245inSETUP) {
h245TunnelTxPDU = &setupPDU; h245TunnelTxPDU = &setupPDU;
// Try and start the master/slave and capability exchange through the tunnel // Try and start the master/slave and capability exchange through the tunnel
// Note: this used to be disallowed but is now allowed as of H323v4 // Note: this used to be disallowed but is now allowed as of H323v4
BOOL ok = StartControlNegotiations(); PBoolean ok = StartControlNegotiations();
h245TunnelTxPDU = NULL; h245TunnelTxPDU = NULL;
@ -1587,7 +1585,7 @@ H323Connection::CallEndReason MyH323Connection::SendSignalSetup(const PString &
} }
BOOL MyH323Connection::OnSendReleaseComplete(H323SignalPDU & releaseCompletePDU) PBoolean MyH323Connection::OnSendReleaseComplete(H323SignalPDU & releaseCompletePDU)
{ {
if (h323debug) { if (h323debug) {
cout << "\t-- Sending RELEASE COMPLETE" << endl; cout << "\t-- Sending RELEASE COMPLETE" << endl;
@ -1602,7 +1600,7 @@ BOOL MyH323Connection::OnSendReleaseComplete(H323SignalPDU & releaseCompletePDU)
return H323Connection::OnSendReleaseComplete(releaseCompletePDU); return H323Connection::OnSendReleaseComplete(releaseCompletePDU);
} }
BOOL MyH323Connection::OnReceivedFacility(const H323SignalPDU & pdu) PBoolean MyH323Connection::OnReceivedFacility(const H323SignalPDU & pdu)
{ {
if (h323debug) { if (h323debug) {
cout << "\t-- Received Facility message... " << endl; cout << "\t-- Received Facility message... " << endl;
@ -1620,7 +1618,7 @@ void MyH323Connection::OnReceivedReleaseComplete(const H323SignalPDU & pdu)
return H323Connection::OnReceivedReleaseComplete(pdu); return H323Connection::OnReceivedReleaseComplete(pdu);
} }
BOOL MyH323Connection::OnClosingLogicalChannel(H323Channel & channel) PBoolean MyH323Connection::OnClosingLogicalChannel(H323Channel & channel)
{ {
if (h323debug) { if (h323debug) {
cout << "\t-- Closing logical channel..." << endl; cout << "\t-- Closing logical channel..." << endl;
@ -1693,7 +1691,7 @@ void MyH323Connection::OnSetLocalCapabilities()
on_setcapabilities(GetCallReference(), (const char *)callToken); on_setcapabilities(GetCallReference(), (const char *)callToken);
} }
BOOL MyH323Connection::OnReceivedCapabilitySet(const H323Capabilities & remoteCaps, PBoolean MyH323Connection::OnReceivedCapabilitySet(const H323Capabilities & remoteCaps,
const H245_MultiplexCapability * muxCap, const H245_MultiplexCapability * muxCap,
H245_TerminalCapabilitySetReject & reject) H245_TerminalCapabilitySetReject & reject)
{ {
@ -1860,7 +1858,7 @@ H323Channel * MyH323Connection::CreateRealTimeLogicalChannel(const H323Capabilit
/** This callback function is invoked once upon creation of each /** This callback function is invoked once upon creation of each
* channel for an H323 session * channel for an H323 session
*/ */
BOOL MyH323Connection::OnStartLogicalChannel(H323Channel & channel) PBoolean MyH323Connection::OnStartLogicalChannel(H323Channel & channel)
{ {
/* Increase the count of channels we have open */ /* Increase the count of channels we have open */
channelsOpen++; channelsOpen++;
@ -2036,7 +2034,7 @@ void MyH323Connection::SetCapabilities(int caps, int dtmf_mode, void *_prefs, in
} }
} }
BOOL MyH323Connection::StartControlChannel(const H225_TransportAddress & h245Address) PBoolean MyH323Connection::StartControlChannel(const H225_TransportAddress & h245Address)
{ {
// Check that it is an IP address, all we support at the moment // Check that it is an IP address, all we support at the moment
if (h245Address.GetTag() != H225_TransportAddress::e_ipAddress if (h245Address.GetTag() != H225_TransportAddress::e_ipAddress
@ -2092,7 +2090,7 @@ void MyH323Connection::OnReceivedLocalCallRetrieve(int linkedId)
} }
#endif #endif
void MyH323Connection::MyHoldCall(BOOL isHold) void MyH323Connection::MyHoldCall(PBoolean isHold)
{ {
if (((holdHandling & H323_HOLD_NOTIFY) != 0) || ((holdHandling & H323_HOLD_Q931ONLY) != 0)) { if (((holdHandling & H323_HOLD_NOTIFY) != 0) || ((holdHandling & H323_HOLD_Q931ONLY) != 0)) {
PBYTEArray x ((const BYTE *)(isHold ? "\xF9" : "\xFA"), 1); PBYTEArray x ((const BYTE *)(isHold ? "\xF9" : "\xFA"), 1);
@ -2155,7 +2153,7 @@ MyH323_ExternalRTPChannel::~MyH323_ExternalRTPChannel()
} }
} }
BOOL MyH323_ExternalRTPChannel::Start(void) PBoolean MyH323_ExternalRTPChannel::Start(void)
{ {
/* Call ancestor first */ /* Call ancestor first */
if (!H323_ExternalRTPChannel::Start()) { if (!H323_ExternalRTPChannel::Start()) {
@ -2182,7 +2180,7 @@ BOOL MyH323_ExternalRTPChannel::Start(void)
return TRUE; return TRUE;
} }
BOOL MyH323_ExternalRTPChannel::OnReceivedAckPDU(const H245_H2250LogicalChannelAckParameters & param) PBoolean MyH323_ExternalRTPChannel::OnReceivedAckPDU(const H245_H2250LogicalChannelAckParameters & param)
{ {
if (h323debug) { if (h323debug) {
cout << " MyH323_ExternalRTPChannel::OnReceivedAckPDU" << endl; cout << " MyH323_ExternalRTPChannel::OnReceivedAckPDU" << endl;
@ -2580,7 +2578,7 @@ int h323_answering_call(const char *token, int busy)
int h323_soft_hangup(const char *data) int h323_soft_hangup(const char *data)
{ {
PString token(data); PString token(data);
BOOL result; PBoolean result;
cout << "Soft hangup" << endl; cout << "Soft hangup" << endl;
result = endPoint->ClearCall(token); result = endPoint->ClearCall(token);
return result; return result;
@ -2615,7 +2613,7 @@ int h323_hold_call(const char *token, int is_hold)
cout << "ERROR: No connection found, this is bad" << endl; cout << "ERROR: No connection found, this is bad" << endl;
return -1; return -1;
} }
conn->MyHoldCall((BOOL)is_hold); conn->MyHoldCall((PBoolean)is_hold);
conn->Unlock(); conn->Unlock();
return 0; return 0;
} }

@ -29,6 +29,8 @@
#ifndef AST_H323_H #ifndef AST_H323_H
#define AST_H323_H #define AST_H323_H
#include "ast_ptlib.h"
#define VERSION(a,b,c) ((a)*10000+(b)*100+(c)) #define VERSION(a,b,c) ((a)*10000+(b)*100+(c))
class MyH323EndPoint : public H323EndPoint class MyH323EndPoint : public H323EndPoint
@ -38,16 +40,16 @@ class MyH323EndPoint : public H323EndPoint
public: public:
MyH323EndPoint(); MyH323EndPoint();
int MyMakeCall(const PString &, PString &, void *_callReference, void *_opts); int MyMakeCall(const PString &, PString &, void *_callReference, void *_opts);
BOOL ClearCall(const PString &, H323Connection::CallEndReason reason); PBoolean ClearCall(const PString &, H323Connection::CallEndReason reason);
BOOL ClearCall(const PString &); PBoolean ClearCall(const PString &);
void OnClosedLogicalChannel(H323Connection &, const H323Channel &); void OnClosedLogicalChannel(H323Connection &, const H323Channel &);
void OnConnectionEstablished(H323Connection &, const PString &); void OnConnectionEstablished(H323Connection &, const PString &);
void OnConnectionCleared(H323Connection &, const PString &); void OnConnectionCleared(H323Connection &, const PString &);
virtual H323Connection * CreateConnection(unsigned, void *, H323Transport *, H323SignalPDU *); virtual H323Connection * CreateConnection(unsigned, void *, H323Transport *, H323SignalPDU *);
void SendUserTone(const PString &, char); void SendUserTone(const PString &, char);
BOOL OnConnectionForwarded(H323Connection &, const PString &, const H323SignalPDU &); PBoolean OnConnectionForwarded(H323Connection &, const PString &, const H323SignalPDU &);
BOOL ForwardConnection(H323Connection &, const PString &, const H323SignalPDU &); PBoolean ForwardConnection(H323Connection &, const PString &, const H323SignalPDU &);
void SetEndpointTypeInfo( H225_EndpointType & info ) const; void SetEndpointTypeInfo( H225_EndpointType & info ) const;
void SetGateway(void); void SetGateway(void);
PStringArray SupportedPrefixes; PStringArray SupportedPrefixes;
@ -69,31 +71,31 @@ public:
const H323SignalPDU &, const H323SignalPDU &,
H323SignalPDU &); H323SignalPDU &);
void OnReceivedReleaseComplete(const H323SignalPDU &); void OnReceivedReleaseComplete(const H323SignalPDU &);
BOOL OnAlerting(const H323SignalPDU &, const PString &); PBoolean OnAlerting(const H323SignalPDU &, const PString &);
BOOL OnSendReleaseComplete(H323SignalPDU &); PBoolean OnSendReleaseComplete(H323SignalPDU &);
BOOL OnReceivedSignalSetup(const H323SignalPDU &); PBoolean OnReceivedSignalSetup(const H323SignalPDU &);
BOOL OnReceivedFacility(const H323SignalPDU &); PBoolean OnReceivedFacility(const H323SignalPDU &);
BOOL OnSendSignalSetup(H323SignalPDU &); PBoolean OnSendSignalSetup(H323SignalPDU &);
BOOL OnStartLogicalChannel(H323Channel &); PBoolean OnStartLogicalChannel(H323Channel &);
BOOL OnClosingLogicalChannel(H323Channel &); PBoolean OnClosingLogicalChannel(H323Channel &);
virtual void SendUserInputTone(char tone, unsigned duration = 0, unsigned logicalChannel = 0, unsigned rtpTimestamp = 0); virtual void SendUserInputTone(char tone, unsigned duration = 0, unsigned logicalChannel = 0, unsigned rtpTimestamp = 0);
virtual void OnUserInputTone(char, unsigned, unsigned, unsigned); virtual void OnUserInputTone(char, unsigned, unsigned, unsigned);
virtual void OnUserInputString(const PString &value); virtual void OnUserInputString(const PString &value);
BOOL OnReceivedProgress(const H323SignalPDU &); PBoolean OnReceivedProgress(const H323SignalPDU &);
BOOL MySendProgress(); PBoolean MySendProgress();
void OnSendCapabilitySet(H245_TerminalCapabilitySet &); void OnSendCapabilitySet(H245_TerminalCapabilitySet &);
void OnSetLocalCapabilities(); void OnSetLocalCapabilities();
void SetCapabilities(int, int, void *, int); void SetCapabilities(int, int, void *, int);
BOOL OnReceivedCapabilitySet(const H323Capabilities &, const H245_MultiplexCapability *, PBoolean OnReceivedCapabilitySet(const H323Capabilities &, const H245_MultiplexCapability *,
H245_TerminalCapabilitySetReject &); H245_TerminalCapabilitySetReject &);
void SetCause(int _cause) { cause = _cause; }; void SetCause(int _cause) { cause = _cause; };
virtual BOOL StartControlChannel(const H225_TransportAddress & h245Address); virtual PBoolean StartControlChannel(const H225_TransportAddress & h245Address);
void SetCallOptions(void *opts, BOOL isIncoming); void SetCallOptions(void *opts, PBoolean isIncoming);
void SetCallDetails(void *callDetails, const H323SignalPDU &setupPDU, BOOL isIncoming); void SetCallDetails(void *callDetails, const H323SignalPDU &setupPDU, PBoolean isIncoming);
virtual H323Connection::CallEndReason SendSignalSetup(const PString&, const H323TransportAddress&); virtual H323Connection::CallEndReason SendSignalSetup(const PString&, const H323TransportAddress&);
#ifdef TUNNELLING #ifdef TUNNELLING
virtual BOOL HandleSignalPDU(H323SignalPDU &pdu); virtual PBoolean HandleSignalPDU(H323SignalPDU &pdu);
BOOL EmbedTunneledInfo(H323SignalPDU &pdu); PBoolean EmbedTunneledInfo(H323SignalPDU &pdu);
#endif #endif
#ifdef H323_H450 #ifdef H323_H450
virtual void OnReceivedLocalCallHold(int linkedId); virtual void OnReceivedLocalCallHold(int linkedId);
@ -112,7 +114,7 @@ public:
int transfer_capability; int transfer_capability;
WORD sessionId; WORD sessionId;
BOOL bridging; PBoolean bridging;
#ifdef TUNNELLING #ifdef TUNNELLING
int remoteTunnelOptions; int remoteTunnelOptions;
int tunnelOptions; int tunnelOptions;
@ -141,8 +143,8 @@ public:
~MyH323_ExternalRTPChannel(); ~MyH323_ExternalRTPChannel();
/* Overrides */ /* Overrides */
BOOL Start(void); PBoolean Start(void);
BOOL OnReceivedAckPDU(const H245_H2250LogicalChannelAckParameters & param); PBoolean OnReceivedAckPDU(const H245_H2250LogicalChannelAckParameters & param);
protected: protected:
BYTE payloadCode; BYTE payloadCode;

@ -0,0 +1,34 @@
/*
* Asterisk -- An open source telephony toolkit.
*
* Copyright (C) 2009, Digium, Inc.
*
* See http://www.asterisk.org for more information about
* the Asterisk project. Please do not directly contact
* any of the maintainers of this project for assistance;
* the project provides a web site, mailing lists and IRC
* channels for your use.
*
* This program is free software, distributed under the terms of
* the GNU General Public License Version 2. See the LICENSE file
* at the top of the source tree.
*/
/* PTLib is Copyright (c) 2003 Equivalence Pty. Ltd. */
/*!
* \file
* \brief PTLib compatibility with previous versions of OPAL/PTLib/PWLib
*/
#ifndef AST_PTLIB_H
#define AST_PTLIB_H
#include <ptbuildopts.h>
#if !defined(P_USE_STANDARD_CXX_BOOL) && !defined(P_USE_INTEGER_BOOL)
typedef BOOL PBoolean;
#define PTrue TRUE
#define PFalse FALSE
#endif
#endif /* !defined AST_PTLIB_H */

@ -159,7 +159,7 @@ H323Codec * AST_G711Capability::CreateCodec(H323Codec::Direction direction) cons
/* /*
* Capability: G.723.1 * Capability: G.723.1
*/ */
AST_G7231Capability::AST_G7231Capability(int rx_frames, BOOL annexA_) AST_G7231Capability::AST_G7231Capability(int rx_frames, PBoolean annexA_)
: H323AudioCapability(rx_frames, 4) : H323AudioCapability(rx_frames, 4)
{ {
annexA = annexA_; annexA = annexA_;
@ -196,7 +196,7 @@ unsigned AST_G7231Capability::GetSubType() const
return H245_AudioCapability::e_g7231; return H245_AudioCapability::e_g7231;
} }
BOOL AST_G7231Capability::OnSendingPDU(H245_AudioCapability & cap, PBoolean AST_G7231Capability::OnSendingPDU(H245_AudioCapability & cap,
unsigned packetSize) const unsigned packetSize) const
{ {
cap.SetTag(H245_AudioCapability::e_g7231); cap.SetTag(H245_AudioCapability::e_g7231);
@ -206,7 +206,7 @@ BOOL AST_G7231Capability::OnSendingPDU(H245_AudioCapability & cap,
return TRUE; return TRUE;
} }
BOOL AST_G7231Capability::OnReceivedPDU(const H245_AudioCapability & cap, PBoolean AST_G7231Capability::OnReceivedPDU(const H245_AudioCapability & cap,
unsigned & packetSize) unsigned & packetSize)
{ {
if (cap.GetTag() != H245_AudioCapability::e_g7231) { if (cap.GetTag() != H245_AudioCapability::e_g7231) {
@ -299,7 +299,7 @@ unsigned AST_GSM0610Capability::GetSubType() const
return H245_AudioCapability::e_gsmFullRate; return H245_AudioCapability::e_gsmFullRate;
} }
BOOL AST_GSM0610Capability::OnSendingPDU(H245_AudioCapability & cap, PBoolean AST_GSM0610Capability::OnSendingPDU(H245_AudioCapability & cap,
unsigned packetSize) const unsigned packetSize) const
{ {
cap.SetTag(H245_AudioCapability::e_gsmFullRate); cap.SetTag(H245_AudioCapability::e_gsmFullRate);
@ -310,7 +310,7 @@ BOOL AST_GSM0610Capability::OnSendingPDU(H245_AudioCapability & cap,
return TRUE; return TRUE;
} }
BOOL AST_GSM0610Capability::OnReceivedPDU(const H245_AudioCapability & cap, PBoolean AST_GSM0610Capability::OnReceivedPDU(const H245_AudioCapability & cap,
unsigned & packetSize) unsigned & packetSize)
{ {
if (cap.GetTag() != H245_AudioCapability::e_gsmFullRate) if (cap.GetTag() != H245_AudioCapability::e_gsmFullRate)

@ -26,17 +26,17 @@ class AST_G7231Capability : public H323AudioCapability
PCLASSINFO(AST_G7231Capability, H323AudioCapability); PCLASSINFO(AST_G7231Capability, H323AudioCapability);
public: public:
AST_G7231Capability(int rx_frames = 7, BOOL annexA = TRUE); AST_G7231Capability(int rx_frames = 7, PBoolean annexA = TRUE);
Comparison Compare(const PObject & obj) const; Comparison Compare(const PObject & obj) const;
virtual PObject * Clone() const; virtual PObject * Clone() const;
virtual H323Codec * CreateCodec(H323Codec::Direction direction) const; virtual H323Codec * CreateCodec(H323Codec::Direction direction) const;
virtual unsigned GetSubType() const; virtual unsigned GetSubType() const;
virtual PString GetFormatName() const; virtual PString GetFormatName() const;
virtual BOOL OnSendingPDU(H245_AudioCapability & pdu, unsigned packetSize) const; virtual PBoolean OnSendingPDU(H245_AudioCapability & pdu, unsigned packetSize) const;
virtual BOOL OnReceivedPDU(const H245_AudioCapability & pdu, unsigned & packetSize); virtual PBoolean OnReceivedPDU(const H245_AudioCapability & pdu, unsigned & packetSize);
protected: protected:
BOOL annexA; PBoolean annexA;
}; };
/**This class describes the (fake) G729 codec capability. /**This class describes the (fake) G729 codec capability.
@ -114,8 +114,8 @@ public:
/* Get the name of the media data format this class represents. */ /* Get the name of the media data format this class represents. */
virtual PString GetFormatName() const; virtual PString GetFormatName() const;
BOOL OnSendingPDU(H245_AudioCapability & pdu, unsigned packetSize) const; PBoolean OnSendingPDU(H245_AudioCapability & pdu, unsigned packetSize) const;
BOOL OnReceivedPDU(const H245_AudioCapability & pdu, unsigned & packetSize); PBoolean OnReceivedPDU(const H245_AudioCapability & pdu, unsigned & packetSize);
protected: protected:
int comfortNoise; int comfortNoise;

@ -26,6 +26,9 @@
* Version Info: $Id$ * Version Info: $Id$
*/ */
#ifndef CHAN_H323_H
#define CHAN_H323_H
#include <arpa/inet.h> #include <arpa/inet.h>
/* /*
@ -207,10 +210,6 @@ extern int h323debug;
#define H323_DTMF_RFC2833_PT 101 #define H323_DTMF_RFC2833_PT 101
#define H323_DTMF_CISCO_PT 121 #define H323_DTMF_CISCO_PT 121
#ifndef BOOL
#define BOOL int
#endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
@ -267,3 +266,5 @@ extern "C" {
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif

@ -61,7 +61,7 @@ PINDEX CISCO_H225_RedirectIEinfo::GetDataLength() const
} }
BOOL CISCO_H225_RedirectIEinfo::Decode(PASN_Stream & strm) PBoolean CISCO_H225_RedirectIEinfo::Decode(PASN_Stream & strm)
{ {
if (!PreambleDecode(strm)) if (!PreambleDecode(strm))
return FALSE; return FALSE;
@ -137,7 +137,7 @@ PINDEX CISCO_H225_ProgIndIEinfo::GetDataLength() const
} }
BOOL CISCO_H225_ProgIndIEinfo::Decode(PASN_Stream & strm) PBoolean CISCO_H225_ProgIndIEinfo::Decode(PASN_Stream & strm)
{ {
if (!PreambleDecode(strm)) if (!PreambleDecode(strm))
return FALSE; return FALSE;
@ -217,7 +217,7 @@ PINDEX CISCO_H225_QsigNonStdInfo::GetDataLength() const
} }
BOOL CISCO_H225_QsigNonStdInfo::Decode(PASN_Stream & strm) PBoolean CISCO_H225_QsigNonStdInfo::Decode(PASN_Stream & strm)
{ {
if (!PreambleDecode(strm)) if (!PreambleDecode(strm))
return FALSE; return FALSE;
@ -300,7 +300,7 @@ PINDEX CISCO_H225_CallMgrParam::GetDataLength() const
} }
BOOL CISCO_H225_CallMgrParam::Decode(PASN_Stream & strm) PBoolean CISCO_H225_CallMgrParam::Decode(PASN_Stream & strm)
{ {
if (!PreambleDecode(strm)) if (!PreambleDecode(strm))
return FALSE; return FALSE;
@ -379,7 +379,7 @@ PINDEX CISCO_H225_CallPreserveParam::GetDataLength() const
} }
BOOL CISCO_H225_CallPreserveParam::Decode(PASN_Stream & strm) PBoolean CISCO_H225_CallPreserveParam::Decode(PASN_Stream & strm)
{ {
if (!PreambleDecode(strm)) if (!PreambleDecode(strm))
return FALSE; return FALSE;
@ -458,7 +458,7 @@ PINDEX CISCO_H225_CallSignallingParam::GetDataLength() const
} }
BOOL CISCO_H225_CallSignallingParam::Decode(PASN_Stream & strm) PBoolean CISCO_H225_CallSignallingParam::Decode(PASN_Stream & strm)
{ {
if (!PreambleDecode(strm)) if (!PreambleDecode(strm))
return FALSE; return FALSE;
@ -535,7 +535,7 @@ PINDEX CISCO_H225_CommonParam::GetDataLength() const
} }
BOOL CISCO_H225_CommonParam::Decode(PASN_Stream & strm) PBoolean CISCO_H225_CommonParam::Decode(PASN_Stream & strm)
{ {
if (!PreambleDecode(strm)) if (!PreambleDecode(strm))
return FALSE; return FALSE;
@ -611,7 +611,7 @@ PINDEX CISCO_H225_ProgIndParam::GetDataLength() const
} }
BOOL CISCO_H225_ProgIndParam::Decode(PASN_Stream & strm) PBoolean CISCO_H225_ProgIndParam::Decode(PASN_Stream & strm)
{ {
if (!PreambleDecode(strm)) if (!PreambleDecode(strm))
return FALSE; return FALSE;
@ -687,7 +687,7 @@ PINDEX CISCO_H225_ProtoParam::GetDataLength() const
} }
BOOL CISCO_H225_ProtoParam::Decode(PASN_Stream & strm) PBoolean CISCO_H225_ProtoParam::Decode(PASN_Stream & strm)
{ {
if (!PreambleDecode(strm)) if (!PreambleDecode(strm))
return FALSE; return FALSE;
@ -789,7 +789,7 @@ PINDEX CISCO_H225_H323_UU_NonStdInfo::GetDataLength() const
} }
BOOL CISCO_H225_H323_UU_NonStdInfo::Decode(PASN_Stream & strm) PBoolean CISCO_H225_H323_UU_NonStdInfo::Decode(PASN_Stream & strm)
{ {
if (!PreambleDecode(strm)) if (!PreambleDecode(strm))
return FALSE; return FALSE;

@ -14,6 +14,7 @@
#endif #endif
#include <ptclib/asner.h> #include <ptclib/asner.h>
#include "ast_ptlib.h"
// //
// RedirectIEinfo // RedirectIEinfo
@ -30,7 +31,7 @@ class CISCO_H225_RedirectIEinfo : public PASN_Sequence
PASN_OctetString m_redirectIE; PASN_OctetString m_redirectIE;
PINDEX GetDataLength() const; PINDEX GetDataLength() const;
BOOL Decode(PASN_Stream & strm); PBoolean Decode(PASN_Stream & strm);
void Encode(PASN_Stream & strm) const; void Encode(PASN_Stream & strm) const;
#ifndef PASN_NOPRINTON #ifndef PASN_NOPRINTON
void PrintOn(ostream & strm) const; void PrintOn(ostream & strm) const;
@ -55,7 +56,7 @@ class CISCO_H225_ProgIndIEinfo : public PASN_Sequence
PASN_OctetString m_progIndIE; PASN_OctetString m_progIndIE;
PINDEX GetDataLength() const; PINDEX GetDataLength() const;
BOOL Decode(PASN_Stream & strm); PBoolean Decode(PASN_Stream & strm);
void Encode(PASN_Stream & strm) const; void Encode(PASN_Stream & strm) const;
#ifndef PASN_NOPRINTON #ifndef PASN_NOPRINTON
void PrintOn(ostream & strm) const; void PrintOn(ostream & strm) const;
@ -81,7 +82,7 @@ class CISCO_H225_QsigNonStdInfo : public PASN_Sequence
PASN_OctetString m_rawMesg; PASN_OctetString m_rawMesg;
PINDEX GetDataLength() const; PINDEX GetDataLength() const;
BOOL Decode(PASN_Stream & strm); PBoolean Decode(PASN_Stream & strm);
void Encode(PASN_Stream & strm) const; void Encode(PASN_Stream & strm) const;
#ifndef PASN_NOPRINTON #ifndef PASN_NOPRINTON
void PrintOn(ostream & strm) const; void PrintOn(ostream & strm) const;
@ -107,7 +108,7 @@ class CISCO_H225_CallMgrParam : public PASN_Sequence
PASN_OctetString m_enterpriseID; PASN_OctetString m_enterpriseID;
PINDEX GetDataLength() const; PINDEX GetDataLength() const;
BOOL Decode(PASN_Stream & strm); PBoolean Decode(PASN_Stream & strm);
void Encode(PASN_Stream & strm) const; void Encode(PASN_Stream & strm) const;
#ifndef PASN_NOPRINTON #ifndef PASN_NOPRINTON
void PrintOn(ostream & strm) const; void PrintOn(ostream & strm) const;
@ -132,7 +133,7 @@ class CISCO_H225_CallPreserveParam : public PASN_Sequence
PASN_Boolean m_callPreserveIE; PASN_Boolean m_callPreserveIE;
PINDEX GetDataLength() const; PINDEX GetDataLength() const;
BOOL Decode(PASN_Stream & strm); PBoolean Decode(PASN_Stream & strm);
void Encode(PASN_Stream & strm) const; void Encode(PASN_Stream & strm) const;
#ifndef PASN_NOPRINTON #ifndef PASN_NOPRINTON
void PrintOn(ostream & strm) const; void PrintOn(ostream & strm) const;
@ -161,7 +162,7 @@ class CISCO_H225_CallSignallingParam : public PASN_Sequence
PASN_OctetString m_connectedNumber; PASN_OctetString m_connectedNumber;
PINDEX GetDataLength() const; PINDEX GetDataLength() const;
BOOL Decode(PASN_Stream & strm); PBoolean Decode(PASN_Stream & strm);
void Encode(PASN_Stream & strm) const; void Encode(PASN_Stream & strm) const;
#ifndef PASN_NOPRINTON #ifndef PASN_NOPRINTON
void PrintOn(ostream & strm) const; void PrintOn(ostream & strm) const;
@ -186,7 +187,7 @@ class CISCO_H225_CommonParam : public PASN_Sequence
CISCO_H225_RedirectIEinfo m_redirectIEinfo; CISCO_H225_RedirectIEinfo m_redirectIEinfo;
PINDEX GetDataLength() const; PINDEX GetDataLength() const;
BOOL Decode(PASN_Stream & strm); PBoolean Decode(PASN_Stream & strm);
void Encode(PASN_Stream & strm) const; void Encode(PASN_Stream & strm) const;
#ifndef PASN_NOPRINTON #ifndef PASN_NOPRINTON
void PrintOn(ostream & strm) const; void PrintOn(ostream & strm) const;
@ -211,7 +212,7 @@ class CISCO_H225_ProgIndParam : public PASN_Sequence
CISCO_H225_ProgIndIEinfo m_progIndIEinfo; CISCO_H225_ProgIndIEinfo m_progIndIEinfo;
PINDEX GetDataLength() const; PINDEX GetDataLength() const;
BOOL Decode(PASN_Stream & strm); PBoolean Decode(PASN_Stream & strm);
void Encode(PASN_Stream & strm) const; void Encode(PASN_Stream & strm) const;
#ifndef PASN_NOPRINTON #ifndef PASN_NOPRINTON
void PrintOn(ostream & strm) const; void PrintOn(ostream & strm) const;
@ -236,7 +237,7 @@ class CISCO_H225_ProtoParam : public PASN_Sequence
CISCO_H225_QsigNonStdInfo m_qsigNonStdInfo; CISCO_H225_QsigNonStdInfo m_qsigNonStdInfo;
PINDEX GetDataLength() const; PINDEX GetDataLength() const;
BOOL Decode(PASN_Stream & strm); PBoolean Decode(PASN_Stream & strm);
void Encode(PASN_Stream & strm) const; void Encode(PASN_Stream & strm) const;
#ifndef PASN_NOPRINTON #ifndef PASN_NOPRINTON
void PrintOn(ostream & strm) const; void PrintOn(ostream & strm) const;
@ -281,7 +282,7 @@ class CISCO_H225_H323_UU_NonStdInfo : public PASN_Sequence
CISCO_H225_CallPreserveParam m_callPreserveParam; CISCO_H225_CallPreserveParam m_callPreserveParam;
PINDEX GetDataLength() const; PINDEX GetDataLength() const;
BOOL Decode(PASN_Stream & strm); PBoolean Decode(PASN_Stream & strm);
void Encode(PASN_Stream & strm) const; void Encode(PASN_Stream & strm) const;
#ifndef PASN_NOPRINTON #ifndef PASN_NOPRINTON
void PrintOn(ostream & strm) const; void PrintOn(ostream & strm) const;

@ -38,12 +38,12 @@
MyH323TransportTCP::MyH323TransportTCP( MyH323TransportTCP::MyH323TransportTCP(
H323EndPoint & endpoint, H323EndPoint & endpoint,
PIPSocket::Address binding, PIPSocket::Address binding,
BOOL listen) PBoolean listen)
: H323TransportTCP(endpoint, binding, listen) : H323TransportTCP(endpoint, binding, listen)
{ {
} }
BOOL MyH323TransportTCP::Connect() PBoolean MyH323TransportTCP::Connect()
{ {
if (IsListening()) if (IsListening())
return TRUE; return TRUE;
@ -91,7 +91,7 @@ BOOL MyH323TransportTCP::Connect()
} }
#endif #endif
BOOL MyH323TransportUDP::DiscoverGatekeeper(H323Gatekeeper &gk, H323RasPDU &pdu, const H323TransportAddress &address) PBoolean MyH323TransportUDP::DiscoverGatekeeper(H323Gatekeeper &gk, H323RasPDU &pdu, const H323TransportAddress &address)
{ {
PThread *thd = PThread::Current(); PThread *thd = PThread::Current();

@ -14,11 +14,11 @@ public:
MyH323TransportTCP( MyH323TransportTCP(
H323EndPoint & endpoint, ///< H323 End Point object H323EndPoint & endpoint, ///< H323 End Point object
PIPSocket::Address binding = PIPSocket::GetDefaultIpAny(), ///< Local interface to use PIPSocket::Address binding = PIPSocket::GetDefaultIpAny(), ///< Local interface to use
BOOL listen = FALSE ///< Flag for need to wait for remote to connect PBoolean listen = FALSE ///< Flag for need to wait for remote to connect
); );
/**Connect to the remote party. /**Connect to the remote party.
*/ */
virtual BOOL Connect(); virtual PBoolean Connect();
}; };
#else #else
#define MyH323TransportTCP H323TransportTCP #define MyH323TransportTCP H323TransportTCP
@ -35,7 +35,7 @@ public:
WORD remotePort = 0): H323TransportUDP(endpoint, binding, localPort, remotePort) WORD remotePort = 0): H323TransportUDP(endpoint, binding, localPort, remotePort)
{ {
} }
virtual BOOL DiscoverGatekeeper(H323Gatekeeper &, virtual PBoolean DiscoverGatekeeper(H323Gatekeeper &,
H323RasPDU &, H323RasPDU &,
const H323TransportAddress &); const H323TransportAddress &);
protected: protected:
@ -43,8 +43,8 @@ protected:
H323Gatekeeper *discoverGatekeeper; H323Gatekeeper *discoverGatekeeper;
H323RasPDU *discoverPDU; H323RasPDU *discoverPDU;
const H323TransportAddress *discoverAddress; const H323TransportAddress *discoverAddress;
BOOL discoverResult; PBoolean discoverResult;
BOOL discoverReady; PBoolean discoverReady;
PMutex discoverMutex; PMutex discoverMutex;
}; };

75
configure vendored

@ -6141,6 +6141,7 @@ else
done done
echo "$ac_script" | sed 99q >conftest.sed echo "$ac_script" | sed 99q >conftest.sed
$as_unset ac_script || ac_script= $as_unset ac_script || ac_script=
# Extract the first word of "sed gsed" to use in msg output # Extract the first word of "sed gsed" to use in msg output
if test -z "$SED"; then if test -z "$SED"; then
set dummy sed gsed; ac_prog_name=$2 set dummy sed gsed; ac_prog_name=$2
@ -41338,7 +41339,7 @@ else
;; ;;
*) *)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in /usr/local/bin for as_dir in /usr/local/bin$PATH_SEPARATOR/usr/local/share/pwlib/make
do do
IFS=$as_save_IFS IFS=$as_save_IFS
test -z "$as_dir" && as_dir=. test -z "$as_dir" && as_dir=.
@ -41365,50 +41366,11 @@ echo "${ECHO_T}no" >&6; }
fi fi
if test "${PTLIB_CONFIG:-unset}" = "unset" ; then
# Extract the first word of "ptlib-config", so it can be a program name with args.
set dummy ptlib-config; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_PTLIB_CONFIG+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
case $PTLIB_CONFIG in
[\\/]* | ?:[\\/]*)
ac_cv_path_PTLIB_CONFIG="$PTLIB_CONFIG" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in /usr/local/share/pwlib/make
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_PTLIB_CONFIG="$as_dir/$ac_word$ac_exec_ext"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
;;
esac
fi
PTLIB_CONFIG=$ac_cv_path_PTLIB_CONFIG
if test -n "$PTLIB_CONFIG"; then
{ echo "$as_me:$LINENO: result: $PTLIB_CONFIG" >&5
echo "${ECHO_T}$PTLIB_CONFIG" >&6; }
else
{ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi
fi
PWLIB_INCDIR="/usr/local/include" PWLIB_INCDIR="/usr/local/include"
PWLIB_LIBDIR=`${PTLIB_CONFIG} --pwlibdir` PWLIB_LIBDIR=`${PTLIB_CONFIG} --pwlibdir 2>/dev/null`
if test "${PWLIB_LIBDIR:-unset}" = "unset"; then
PWLIB_LIBDIR=`${PTLIB_CONFIG} --ptlibdir 2>/dev/null`
fi
if test "${PWLIB_LIBDIR:-unset}" = "unset"; then if test "${PWLIB_LIBDIR:-unset}" = "unset"; then
if test "x$LIB64" != "x"; then if test "x$LIB64" != "x"; then
PWLIB_LIBDIR="/usr/local/lib64" PWLIB_LIBDIR="/usr/local/lib64"
@ -41568,7 +41530,7 @@ else
;; ;;
*) *)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in /usr/share/pwlib/make for as_dir in /usr/bin$PATH_SEPARATOR/usr/share/pwlib/make
do do
IFS=$as_save_IFS IFS=$as_save_IFS
test -z "$as_dir" && as_dir=. test -z "$as_dir" && as_dir=.
@ -41596,7 +41558,10 @@ fi
PWLIB_INCDIR="/usr/include" PWLIB_INCDIR="/usr/include"
PWLIB_LIBDIR=`${PTLIB_CONFIG} --pwlibdir` PWLIB_LIBDIR=`${PTLIB_CONFIG} --pwlibdir 2>/dev/null`
if test "${PWLIB_LIBDIR:-unset}" = "unset"; then
PWLIB_LIBDIR=`${PTLIB_CONFIG} --ptlibdir 2>/dev/null`
fi
if test "${PWLIB_LIBDIR:-unset}" = "unset"; then if test "${PWLIB_LIBDIR:-unset}" = "unset"; then
if test "x$LIB64" != "x"; then if test "x$LIB64" != "x"; then
PWLIB_LIBDIR="/usr/lib64" PWLIB_LIBDIR="/usr/lib64"
@ -41665,8 +41630,14 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test "xP[WT]LIB_VERSION" != "x"; then
VNAME="P[WT]LIB_VERSION"
else
VNAME="PWLIB_VERSION"
fi
if test "${HAS_PWLIB:-unset}" != "unset"; then if test "${HAS_PWLIB:-unset}" != "unset"; then
PWLIB_VERSION=`grep "PWLIB_VERSION" ${PWLIB_INCDIR}/ptbuildopts.h | sed -e 's/[[:space:]]\{1,\}/ /g' | cut -f3 -d ' ' | sed -e 's/"//g'` PWLIB_VERSION=`grep "$VNAME" ${PWLIB_INCDIR}/ptbuildopts.h | sed -e 's/[[:space:]]\{1,\}/ /g' | cut -f3 -d ' ' | sed -e 's/"//g'`
PWLIB_MAJOR_VERSION=`echo ${PWLIB_VERSION} | cut -f1 -d.` PWLIB_MAJOR_VERSION=`echo ${PWLIB_VERSION} | cut -f1 -d.`
PWLIB_MINOR_VERSION=`echo ${PWLIB_VERSION} | cut -f2 -d.` PWLIB_MINOR_VERSION=`echo ${PWLIB_VERSION} | cut -f2 -d.`
PWLIB_BUILD_NUMBER=`echo ${PWLIB_VERSION} | cut -f3 -d.` PWLIB_BUILD_NUMBER=`echo ${PWLIB_VERSION} | cut -f3 -d.`
@ -41807,7 +41778,7 @@ cat >>conftest.$ac_ext <<_ACEOF
int int
main () main ()
{ {
BOOL q = PTime::IsDaylightSavings(); int q = (int) PTime::IsDaylightSavings();
; ;
return 0; return 0;
} }
@ -42613,8 +42584,14 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test "x" != "x"; then
VNAME=""
else
VNAME="OPENH323_VERSION"
fi
if test "${HAS_OPENH323:-unset}" != "unset"; then if test "${HAS_OPENH323:-unset}" != "unset"; then
OPENH323_VERSION=`grep "OPENH323_VERSION" ${OPENH323_INCDIR}/openh323buildopts.h | sed -e 's/[[:space:]]\{1,\}/ /g' | cut -f3 -d ' ' | sed -e 's/"//g'` OPENH323_VERSION=`grep "$VNAME" ${OPENH323_INCDIR}/openh323buildopts.h | sed -e 's/[[:space:]]\{1,\}/ /g' | cut -f3 -d ' ' | sed -e 's/"//g'`
OPENH323_MAJOR_VERSION=`echo ${OPENH323_VERSION} | cut -f1 -d.` OPENH323_MAJOR_VERSION=`echo ${OPENH323_VERSION} | cut -f1 -d.`
OPENH323_MINOR_VERSION=`echo ${OPENH323_VERSION} | cut -f2 -d.` OPENH323_MINOR_VERSION=`echo ${OPENH323_VERSION} | cut -f2 -d.`
OPENH323_BUILD_NUMBER=`echo ${OPENH323_VERSION} | cut -f3 -d.` OPENH323_BUILD_NUMBER=`echo ${OPENH323_VERSION} | cut -f3 -d.`

@ -1371,7 +1371,7 @@ if test "${USE_PWLIB}" != "no"; then
PWLIBDIR="${PWLIB_DIR}" PWLIBDIR="${PWLIB_DIR}"
fi fi
AST_CHECK_PWLIB() AST_CHECK_PWLIB()
AST_CHECK_PWLIB_VERSION([PWLib], [PWLIB], [ptbuildopts.h], [1], [9], [2]) AST_CHECK_PWLIB_VERSION([PWLib], [PWLIB], [ptbuildopts.h], [1], [9], [2], [P[[WT]]LIB_VERSION])
if test "${HAS_PWLIB:-unset}" != "unset"; then if test "${HAS_PWLIB:-unset}" != "unset"; then
AST_CHECK_PWLIB_PLATFORM() AST_CHECK_PWLIB_PLATFORM()
@ -1381,7 +1381,7 @@ if test "${USE_PWLIB}" != "no"; then
AST_CHECK_PWLIB_BUILD([PWLib], [PWLIB], AST_CHECK_PWLIB_BUILD([PWLib], [PWLIB],
[Define if your system has the PWLib libraries.], [Define if your system has the PWLib libraries.],
[#include "ptlib.h"], [#include "ptlib.h"],
[BOOL q = PTime::IsDaylightSavings();]) [int q = (int) PTime::IsDaylightSavings();])
fi fi
fi fi

Loading…
Cancel
Save