Hello community, here is the log from the commit of package isdngw for openSUSE:Factory checked in at 2012-02-23 15:33:17 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/isdngw (Old) and /work/SRC/openSUSE:Factory/.isdngw.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "isdngw", Maintainer is "[email protected]" Changes: -------- --- /work/SRC/openSUSE:Factory/isdngw/isdngw.changes 2012-02-08 17:18:14.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.isdngw.new/isdngw.changes 2012-02-23 15:33:20.000000000 +0100 @@ -1,0 +2,9 @@ +Tue Feb 21 16:43:41 UTC 2012 - [email protected] + +- update to latest upstream version 0.4.0 + * update for PBoolean chnage in PTLib and H323Plus + * fix small memory corruption bug + * fix gcc 4.3.x warnings + * remove use of exceptions for easier compatibility + +------------------------------------------------------------------- Old: ---- isdngw-0.3.4.tar.bz2 New: ---- isdngw-0.4.0.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ isdngw.spec ++++++ --- /var/tmp/diff_new_pack.43A45a/_old 2012-02-23 15:33:21.000000000 +0100 +++ /var/tmp/diff_new_pack.43A45a/_new 2012-02-23 15:33:21.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package isdngw # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -29,22 +29,21 @@ BuildRequires: sgml-skel BuildRequires: sgmltool BuildRequires: speex-devel -URL: http://www.gnugk.org/h323-isdn-gw.html +Url: http://www.gnugk.org/h323-isdn-gw.html BuildRoot: %{_tmppath}/%{name}-%{version}-build PreReq: %insserv_prereq %fillup_prereq %if %suse_version > 1130 PreReq: sysvinit(network) %endif -Requires: pwlib openh323 -Obsoletes: isdn2h323 +Requires: openh323 +Recommends: logrotate Summary: An ISDN to H.323 Gateway License: GPL-2.0+ Group: Productivity/Telephony/H323/Utilities -Version: 0.3.4 +Version: 0.4.0 Release: 0 Source0: isdngw-%{version}.tar.bz2 Source1: rc.isdngw -#Patch: openh323gk.dif %description isdngw is a gateway between telephony on ISDN and telephony on IP @@ -53,8 +52,7 @@ (pots, mobiles, etc.) can call and be called. %prep -%setup -n isdngw -#%patch +%setup -q %build make RPM_OPT_FLAGS="$RPM_OPT_FLAGS -fexceptions" OPENH323DIR=/usr/share/openh323 PREFIX=/usr OH323_LIBDIR=%{_libdir} opt %{?_smp_mflags} @@ -91,7 +89,11 @@ %post %{insserv_force_if_yast etc/init.d/isdngw } +%preun +%{stop_on_removal isdngw } + %postun +%{restart_on_update isdngw } %{insserv_cleanup} %files @@ -102,7 +104,7 @@ %config /etc/isdngw/isdngw.conf %{_sbindir}/isdngw %{_sbindir}/rcisdngw -/etc/logrotate.d/isdngw +%config /etc/logrotate.d/isdngw %dir /var/log/isdngw %changelog ++++++ isdngw-0.3.4.tar.bz2 -> isdngw-0.4.0.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/isdngw/Makefile new/isdngw-0.4.0/Makefile --- old/isdngw/Makefile 2004-09-19 19:43:31.000000000 +0200 +++ new/isdngw-0.4.0/Makefile 2008-02-10 11:35:19.000000000 +0100 @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.1.1.1 2004/09/19 17:43:31 jan Exp $ +# $Id: Makefile,v 1.2 2008/02/10 10:35:19 jan Exp $ # # Makefile for isdngw, an ISDN-H.323 gateway # based on isdn2h323 by telos EDV Systementwicklung GmbH. @@ -46,3 +46,4 @@ endif include $(OPENH323DIR)/openh323u.mak + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/isdngw/README new/isdngw-0.4.0/README --- old/isdngw/README 2004-09-19 19:52:50.000000000 +0200 +++ new/isdngw-0.4.0/README 2009-05-23 00:51:59.000000000 +0200 @@ -6,13 +6,6 @@ make and receive calls but any type of phone (pots, mobiles...) can call and be called. -See homepage for documentation. - -Original Homepage: http://www.virtual-net.fr/h323/isdngw (offline) -Original Contact: [email protected] - -Updates by Niklas �gren ([email protected], http://www.7l.se/software/h323/isdngw) - -Homepage for this version: http://www.gnugk.org/h323-isdn-gw.html +See the web page for documentation: http://www.gnugk.org/h323-isdn-gw.html diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/isdngw/audio_delay.hxx new/isdngw-0.4.0/audio_delay.hxx --- old/isdngw/audio_delay.hxx 2004-09-19 19:43:31.000000000 +0200 +++ new/isdngw-0.4.0/audio_delay.hxx 2009-05-23 00:50:33.000000000 +0200 @@ -1,5 +1,5 @@ /* - $Id: audio_delay.hxx,v 1.1.1.1 2004/09/19 17:43:31 jan Exp $ + $Id: audio_delay.hxx,v 1.2 2009/05/22 22:50:33 jan Exp $ Copyright (c) 2000 Virtual Net @@ -22,6 +22,10 @@ #ifndef _AUDIO_DELAY_HXX_ #define _AUDIO_DELAY_HXX_ +#if !defined(P_USE_STANDARD_CXX_BOOL) && !defined(P_USE_INTEGER_BOOL) + typedef int PBoolean; +#endif + #include <ptlib.h> class AudioDelay : public PObject @@ -38,7 +42,7 @@ protected: PTime previousTime; - BOOL firstTime; + PBoolean firstTime; int NumAllOctets; }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/isdngw/changes.txt new/isdngw-0.4.0/changes.txt --- old/isdngw/changes.txt 2004-09-19 20:20:52.000000000 +0200 +++ new/isdngw-0.4.0/changes.txt 2009-05-23 00:49:25.000000000 +0200 @@ -1,3 +1,13 @@ +Changes from version 0.3.5 to 0.4.0 +----------------------------------- +- update for PBoolean chnage in PTLib and H323Plus +- fix small memory corruption bug +- fix gcc 4.3.x warnings + +Changes from version 0.3.4 to 0.3.5 +----------------------------------- +- remove use of exceptions for easier compatibility + Changes from version 0.3.3 to 0.3.4 ----------------------------------- - port to PWLib 1.8.1 and OpenH323 1.15.1 (incl. plugable codecs) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/isdngw/config.cxx new/isdngw-0.4.0/config.cxx --- old/isdngw/config.cxx 2004-09-19 19:43:31.000000000 +0200 +++ new/isdngw-0.4.0/config.cxx 2009-05-23 00:50:33.000000000 +0200 @@ -1,5 +1,5 @@ /* - $Id: config.cxx,v 1.1.1.1 2004/09/19 17:43:31 jan Exp $ + $Id: config.cxx,v 1.2 2009/05/22 22:50:33 jan Exp $ Copyright (c) 2000 Virtual Net @@ -55,14 +55,14 @@ #define DEFAULT_DIAL_PREFIX "" PString Config::m_admin; -BOOL Config::m_agc; +PBoolean Config::m_agc; PStringArray Config::m_allowed_ips; int Config::m_ATD_timeout; PString Config::m_connecting_message; PString Config::m_default_msn; PStringArray Config::m_devices; PString Config::m_directory_filename; -BOOL Config::m_echo_comp; +PBoolean Config::m_echo_comp; PString Config::m_html; PString Config::m_lcr_isdnrate; PString Config::m_lcr_pbx_prefix; @@ -70,12 +70,12 @@ PString Config::m_listener_interface; int Config::m_listener_port; PString Config::m_name; -BOOL Config::m_need_gatekeeper; +PBoolean Config::m_need_gatekeeper; PString Config::m_gatekeeper; PStringArray Config::m_prefix; PString Config::m_status_filename; ofstream* Config::m_stream = NULL; -BOOL Config::m_user_input; +PBoolean Config::m_user_input; PString Config::m_cpn_prefix; PString Config::m_dial_prefix; PStringToString Config::m_rewriteInfo; @@ -83,7 +83,7 @@ //////////////////////////////////// // First read of the configuration -BOOL Config::Start(const PString & file) +PBoolean Config::Start(const PString & file) { if (!ReadConfig(file)) return FALSE; @@ -102,7 +102,7 @@ /////////////////////////////////////////////// // Read the configuration from "/etc/isdngw" -BOOL Config::ReadConfig (const PString & file) +PBoolean Config::ReadConfig (const PString & file) { PConfig config(file, "system"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/isdngw/config.hxx new/isdngw-0.4.0/config.hxx --- old/isdngw/config.hxx 2004-09-19 19:43:31.000000000 +0200 +++ new/isdngw-0.4.0/config.hxx 2009-05-23 00:50:33.000000000 +0200 @@ -1,5 +1,5 @@ /* - $Id: config.hxx,v 1.1.1.1 2004/09/19 17:43:31 jan Exp $ + $Id: config.hxx,v 1.2 2009/05/22 22:50:33 jan Exp $ Copyright (c) 2000 Virtual Net @@ -28,12 +28,17 @@ // version of the gateway #define MAJOR_VERSION 0 -#define MINOR_VERSION 3 -#define BUILD_TYPE BetaCode -#define BUILD_NUMBER 4 +#define MINOR_VERSION 4 +#define BUILD_TYPE ReleaseCode +#define BUILD_NUMBER 0 #include <ptlib.h> +#if !defined(P_USE_STANDARD_CXX_BOOL) && !defined(P_USE_INTEGER_BOOL) + typedef int PBoolean; +#endif + + class TempUserInformations : public PObject { PCLASSINFO(TempUserInformations,PObject); public: @@ -49,10 +54,10 @@ class Config { public: - static BOOL Start(const PString & file); + static PBoolean Start(const PString & file); static void Stop(); - static BOOL ReadConfig(const PString & file); + static PBoolean ReadConfig(const PString & file); static void Free(); static const PString& GetH323Name() @@ -67,7 +72,7 @@ static const PString& GetRASInterface() { return m_ras_interface; } - static const BOOL NeedGatekeeper() + static const PBoolean NeedGatekeeper() { return m_need_gatekeeper; } static const PString& GetGatekeeper() @@ -79,10 +84,10 @@ static const PString& GetDefaultMSN() { return m_default_msn; } - static BOOL UseAGC() + static PBoolean UseAGC() { return m_agc; } - static BOOL UseEchoComp() + static PBoolean UseEchoComp() { return m_echo_comp; } static const PString& GetStatusFilename() @@ -115,7 +120,7 @@ static const PString& GetHTML() { return m_html; } - static BOOL UseUserInput() + static PBoolean UseUserInput() { return m_user_input; } @@ -134,12 +139,12 @@ static PString m_ras_interface; static PString m_listener_interface; static int m_listener_port; - static BOOL m_need_gatekeeper; + static PBoolean m_need_gatekeeper; static PString m_gatekeeper; static PString m_admin; static PString m_default_msn; - static BOOL m_agc; - static BOOL m_echo_comp; + static PBoolean m_agc; + static PBoolean m_echo_comp; static PString m_status_filename; static PString m_lcr_isdnrate; static PString m_lcr_pbx_prefix; @@ -159,7 +164,7 @@ static ofstream* m_stream; - static BOOL m_user_input; + static PBoolean m_user_input; static PString m_cpn_prefix; static PString m_dial_prefix; static PStringToString m_rewriteInfo; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/isdngw/connection.cxx new/isdngw-0.4.0/connection.cxx --- old/isdngw/connection.cxx 2004-09-19 19:43:31.000000000 +0200 +++ new/isdngw-0.4.0/connection.cxx 2009-05-23 00:50:33.000000000 +0200 @@ -1,5 +1,5 @@ /* - $Id: connection.cxx,v 1.1.1.1 2004/09/19 17:43:31 jan Exp $ + $Id: connection.cxx,v 1.3 2009/05/22 22:50:33 jan Exp $ Copyright (c) 2000 Virtual Net @@ -50,7 +50,7 @@ // ip_size: size of the host_ip buffer // ////////////////////////////////////////////////////////// -static BOOL GetHostByName (const PString& host_name, char *host_ip, int ip_size) +static PBoolean GetHostByName (const PString& host_name, char *host_ip, int ip_size) { struct hostent hostbuf, *hp; size_t hstbuflen; @@ -119,12 +119,12 @@ // Is the remote user (IP) allowed to use the gateway? // ////////////////////////////////////////////////////////// -BOOL GwH323Connection::AllowedToUseGateway () +PBoolean GwH323Connection::AllowedToUseGateway () { char *pnt; char remote_addr[200]; char remote_addr_ip[16]; - BOOL allowed = FALSE; + PBoolean allowed = FALSE; PString pstring; PStringArray allowed_ips; @@ -154,8 +154,9 @@ PTRACE(2, "AllowedToUseGateway() - " << remote_addr << '(' << remote_addr_ip << ") - " << (allowed?"TRUE":"FALSE")); // log denied outgoing calls - if (!allowed) + if (!allowed) { PTRACE(0, "Outgoing call from " << remote_addr << " (" << remote_addr_ip << "): denied"); + } return allowed; } @@ -204,12 +205,11 @@ for (i=0; i<src_adr.GetSize(); i++) if (src_adr[i].GetTag() == H225_AliasAddress::e_h323_ID) { PString user = H323GetAliasAddressString(src_adr[i]); - try { - msn = Routing::GetNumberByUser(user); + msn = Routing::GetNumberByUser(user); + if (!msn.IsEmpty()) { PTRACE(0, '"' << user << "\"'s MSN found: " << msn); break; - } - catch(Routing::NotFound) { + } else { PTRACE(0, "Cannot find the MSN of \"" << user << '"'); } } @@ -261,7 +261,7 @@ // ISDN -> H.323 // ////////////////////////////////////////////////////////// -BOOL GwH323Connection::OnOutgoingCall (const H323SignalPDU & connectPDU) +PBoolean GwH323Connection::OnOutgoingCall (const H323SignalPDU & connectPDU) { PTRACE(2, "ISDN -> H.323 using " << InfoConnections::GetDevice(callToken)); @@ -348,7 +348,7 @@ // H.323 enpoint. // ////////////////////////////////////////////////////////// -BOOL GwH323Connection::OnSendSignalSetup (H323SignalPDU &setup_pdu) +PBoolean GwH323Connection::OnSendSignalSetup (H323SignalPDU &setup_pdu) { pots* my_pots = InfoConnections::PotsGet(GetCallToken()); if (my_pots) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/isdngw/connection.hxx new/isdngw-0.4.0/connection.hxx --- old/isdngw/connection.hxx 2004-09-19 19:43:31.000000000 +0200 +++ new/isdngw-0.4.0/connection.hxx 2009-05-23 00:50:33.000000000 +0200 @@ -1,5 +1,5 @@ /* - $Id: connection.hxx,v 1.1.1.1 2004/09/19 17:43:31 jan Exp $ + $Id: connection.hxx,v 1.2 2009/05/22 22:50:33 jan Exp $ Copyright (c) 2000 Virtual Net @@ -44,15 +44,15 @@ ~GwH323Connection (); AnswerCallResponse OnAnswerCall (const PString &, const H323SignalPDU &, H323SignalPDU &); - BOOL OnOutgoingCall (const H323SignalPDU &connectPDU); + PBoolean OnOutgoingCall (const H323SignalPDU &connectPDU); void OnUserInputString (const PString &value); void MakeCallValue(int); - BOOL OnSendSignalSetup(H323SignalPDU &my_pdu); + PBoolean OnSendSignalSetup(H323SignalPDU &my_pdu); private: - BOOL AllowedToUseGateway(); + PBoolean AllowedToUseGateway(); private: PIndirectChannel * m_channel; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/isdngw/dsp.cxx new/isdngw-0.4.0/dsp.cxx --- old/isdngw/dsp.cxx 2004-09-19 19:43:31.000000000 +0200 +++ new/isdngw-0.4.0/dsp.cxx 2009-05-23 00:50:33.000000000 +0200 @@ -1,5 +1,5 @@ /* - $Id: dsp.cxx,v 1.1.1.1 2004/09/19 17:43:31 jan Exp $ + $Id: dsp.cxx,v 1.2 2009/05/22 22:50:33 jan Exp $ Copyright (c) 2000 Virtual Net @@ -64,7 +64,7 @@ } -BOOL DspBuffer::Empty () +PBoolean DspBuffer::Empty () { PWaitAndSignal lmutex(m_mutex); @@ -72,7 +72,7 @@ } -BOOL DspBuffer::Full () +PBoolean DspBuffer::Full () { PWaitAndSignal lmutex(m_mutex); @@ -80,7 +80,7 @@ } -BOOL DspBuffer::Delete () +PBoolean DspBuffer::Delete () { PWaitAndSignal lmutex(m_mutex); @@ -94,7 +94,7 @@ } -BOOL DspBuffer::ReadDelete (short &out) +PBoolean DspBuffer::ReadDelete (short &out) { PWaitAndSignal lmutex(m_mutex); @@ -109,7 +109,7 @@ } -BOOL DspBuffer::ReadAt (int pos, short &out) +PBoolean DspBuffer::ReadAt (int pos, short &out) { PWaitAndSignal lmutex(m_mutex); @@ -122,7 +122,7 @@ } -BOOL DspBuffer::Write (const short in) +PBoolean DspBuffer::Write (const short in) { PWaitAndSignal lmutex(m_mutex); @@ -192,7 +192,7 @@ // channel. // ///////////////////////////////////////////////////// -DspEchoComp::DspEchoComp (BOOL _calculate_max_in) : +DspEchoComp::DspEchoComp (PBoolean _calculate_max_in) : m_calculate_max_in(_calculate_max_in) { m_buf_data = new DspBuffer(SAMPLE_RATE/10, 200); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/isdngw/dsp.hxx new/isdngw-0.4.0/dsp.hxx --- old/isdngw/dsp.hxx 2004-09-19 19:43:31.000000000 +0200 +++ new/isdngw-0.4.0/dsp.hxx 2009-05-23 00:50:33.000000000 +0200 @@ -1,5 +1,5 @@ /* - $Id: dsp.hxx,v 1.1.1.1 2004/09/19 17:43:31 jan Exp $ + $Id: dsp.hxx,v 1.2 2009/05/22 22:50:33 jan Exp $ Copyright (c) 2000 Virtual Net @@ -28,6 +28,9 @@ #include <ptlib.h> +#if !defined(P_USE_STANDARD_CXX_BOOL) && !defined(P_USE_INTEGER_BOOL) + typedef int PBoolean; +#endif class DspBuffer : public PObject { @@ -36,12 +39,12 @@ public: DspBuffer (int _size, int init = 0); ~DspBuffer (); - BOOL Empty (); - BOOL Full (); - BOOL Delete (); - BOOL ReadDelete (short &out); - BOOL ReadAt (int pos, short &out); - BOOL Write (const short in); + PBoolean Empty (); + PBoolean Full (); + PBoolean Delete (); + PBoolean ReadDelete (short &out); + PBoolean ReadAt (int pos, short &out); + PBoolean Write (const short in); int ReadArray (short *out, int len); int WriteArray (const short *out, int len); @@ -63,7 +66,7 @@ PCLASSINFO(DspEchoComp, PObject); public: - DspEchoComp (BOOL _calculate_max_in); + DspEchoComp (PBoolean _calculate_max_in); ~DspEchoComp (); void Energy (); void In (short data); @@ -77,7 +80,7 @@ float m_energy; float m_attenuation; short m_max_in; - BOOL m_calculate_max_in; + PBoolean m_calculate_max_in; int m_no_energy_info; }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/isdngw/endpoint.cxx new/isdngw-0.4.0/endpoint.cxx --- old/isdngw/endpoint.cxx 2004-09-19 19:43:31.000000000 +0200 +++ new/isdngw-0.4.0/endpoint.cxx 2009-05-23 00:50:33.000000000 +0200 @@ -1,5 +1,5 @@ /* - $Id: endpoint.cxx,v 1.1.1.1 2004/09/19 17:43:31 jan Exp $ + $Id: endpoint.cxx,v 1.3 2009/05/22 22:50:33 jan Exp $ Copyright (c) 2000 Virtual Net @@ -72,8 +72,8 @@ } -BOOL GwH323EndPoint::OpenAudioChannel (H323Connection &connection, - BOOL isEncoding, +PBoolean GwH323EndPoint::OpenAudioChannel (H323Connection &connection, + PBoolean isEncoding, unsigned bufferSize, H323AudioCodec &codec) { @@ -99,7 +99,7 @@ // gateway's H.323 user name, register with a gatekeeper. // //////////////////////////////////////////////////////////////////// -BOOL GwH323EndPoint::Init () +PBoolean GwH323EndPoint::Init () { // Should we use the UserInput capability (DTMF) if (Config::UseUserInput()) @@ -148,7 +148,7 @@ // object. // //////////////////////////////////////////////////////////////////// -BOOL GwH323EndPoint::Call (PString &token_old) +PBoolean GwH323EndPoint::Call (PString &token_old) { PString token_new; PString user; @@ -161,10 +161,8 @@ InfoConnections::DirectionSet (token_old, InfoConnections::FromPots); // get H.323 routing informations (user, gateway) - try { - user = Routing::GetH323UserByNumber(pots_class->GetGatewayNumber()); - } - catch (Routing::NotFound) { + user = Routing::GetH323UserByNumber(pots_class->GetGatewayNumber()); + if (user.IsEmpty()) { return FALSE; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/isdngw/endpoint.hxx new/isdngw-0.4.0/endpoint.hxx --- old/isdngw/endpoint.hxx 2004-09-19 19:43:31.000000000 +0200 +++ new/isdngw-0.4.0/endpoint.hxx 2009-05-23 00:50:33.000000000 +0200 @@ -1,5 +1,5 @@ /* - $Id: endpoint.hxx,v 1.1.1.1 2004/09/19 17:43:31 jan Exp $ + $Id: endpoint.hxx,v 1.2 2009/05/22 22:50:33 jan Exp $ Copyright (c) 2000 Virtual Net @@ -37,17 +37,17 @@ public: GwH323EndPoint (); - BOOL Init (); + PBoolean Init (); - BOOL Call (PString &token); + PBoolean Call (PString &token); H323Connection *CreateConnection (unsigned callReference); void OnConnectionEstablished (H323Connection &connection, const PString &token); void OnConnectionCleared (H323Connection &connection, const PString &token); - BOOL OpenAudioChannel (H323Connection &connection, - BOOL isEncoding, unsigned bufferSize, + PBoolean OpenAudioChannel (H323Connection &connection, + PBoolean isEncoding, unsigned bufferSize, H323AudioCodec &codec); void SetEndpointTypeInfo (H225_EndpointType & info) const; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/isdngw/lcr.cxx new/isdngw-0.4.0/lcr.cxx --- old/isdngw/lcr.cxx 2004-09-19 19:43:31.000000000 +0200 +++ new/isdngw-0.4.0/lcr.cxx 2009-05-23 00:50:33.000000000 +0200 @@ -1,5 +1,5 @@ /* - $Id: lcr.cxx,v 1.1.1.1 2004/09/19 17:43:31 jan Exp $ + $Id: lcr.cxx,v 1.2 2009/05/22 22:50:33 jan Exp $ Copyright (c) 2000 Virtual Net @@ -84,14 +84,14 @@ // calculation // ////////////////////////////////////////////////////////// -BOOL LCR::GetNumber (const PString& number_in, PString& number_out, +PBoolean LCR::GetNumber (const PString& number_in, PString& number_out, const PString& length_call) { PString command; // isdnrate options PString int_pbx; // PBX prefix char int_provider[500]; // CbC provider prefix PString int_party; // call party - BOOL use_isdnrate; // external call (TRUE) + PBoolean use_isdnrate; // external call (TRUE) char *pnt; if (!m_isdnrate_ok) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/isdngw/lcr.hxx new/isdngw-0.4.0/lcr.hxx --- old/isdngw/lcr.hxx 2004-09-19 19:43:31.000000000 +0200 +++ new/isdngw-0.4.0/lcr.hxx 2009-05-23 00:50:33.000000000 +0200 @@ -1,5 +1,5 @@ /* - $Id: lcr.hxx,v 1.1.1.1 2004/09/19 17:43:31 jan Exp $ + $Id: lcr.hxx,v 1.2 2009/05/22 22:50:33 jan Exp $ Copyright (c) 2000 Virtual Net @@ -32,6 +32,10 @@ #include <sys/types.h> #include <sys/socket.h> +#if !defined(P_USE_STANDARD_CXX_BOOL) && !defined(P_USE_INTEGER_BOOL) + typedef int PBoolean; +#endif + class LCR : public PObject { @@ -40,14 +44,14 @@ public: LCR (const PString& socket_path, const PString& _pbx); ~LCR(); - BOOL GetNumber (const PString& number_in, PString& number_out, + PBoolean GetNumber (const PString& number_in, PString& number_out, const PString& length); const PString GetProviderName(); private: int m_sock; // isdnrate socket struct sockaddr m_sock_addr; - BOOL m_isdnrate_ok; // isdnrate daemon available? + PBoolean m_isdnrate_ok; // isdnrate daemon available? PString m_pbx; // PBX prefix PString m_provider_info; // provider informations }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/isdngw/loopchannel.cxx new/isdngw-0.4.0/loopchannel.cxx --- old/isdngw/loopchannel.cxx 2004-09-19 19:43:31.000000000 +0200 +++ new/isdngw-0.4.0/loopchannel.cxx 2009-05-23 00:50:33.000000000 +0200 @@ -1,5 +1,5 @@ /* - $Id: loopchannel.cxx,v 1.1.1.1 2004/09/19 17:43:31 jan Exp $ + $Id: loopchannel.cxx,v 1.2 2009/05/22 22:50:33 jan Exp $ Copyright (c) 2000 Virtual Net @@ -27,7 +27,7 @@ m_file.Open(PFile::ReadOnly,PFile::ModeDefault); } -BOOL LoopChannel::Read(void* buf, PINDEX len) +PBoolean LoopChannel::Read(void* buf, PINDEX len) { m_delay.Delay(len/2); @@ -46,7 +46,7 @@ return TRUE; } -BOOL LoopChannel::Write(const void* buf, PINDEX len) +PBoolean LoopChannel::Write(const void* buf, PINDEX len) { PThread::Current()->Sleep(len/16); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/isdngw/loopchannel.hxx new/isdngw-0.4.0/loopchannel.hxx --- old/isdngw/loopchannel.hxx 2004-09-19 19:43:31.000000000 +0200 +++ new/isdngw-0.4.0/loopchannel.hxx 2009-05-23 00:50:33.000000000 +0200 @@ -1,5 +1,5 @@ /* - $Id: loopchannel.hxx,v 1.1.1.1 2004/09/19 17:43:31 jan Exp $ + $Id: loopchannel.hxx,v 1.2 2009/05/22 22:50:33 jan Exp $ Copyright (c) 2000 Virtual Net @@ -29,9 +29,9 @@ public: LoopChannel(const PFilePath&); - BOOL IsOpen() const { return TRUE; } - BOOL Read (void *buf, PINDEX len); - BOOL Write (const void *buf, PINDEX len); + PBoolean IsOpen() const { return TRUE; } + PBoolean Read (void *buf, PINDEX len); + PBoolean Write (const void *buf, PINDEX len); protected: PFile m_file; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/isdngw/main.cxx new/isdngw-0.4.0/main.cxx --- old/isdngw/main.cxx 2004-09-19 19:43:31.000000000 +0200 +++ new/isdngw-0.4.0/main.cxx 2009-05-23 00:50:33.000000000 +0200 @@ -1,5 +1,5 @@ /* - $Id: main.cxx,v 1.1.1.1 2004/09/19 17:43:31 jan Exp $ + $Id: main.cxx,v 1.2 2009/05/22 22:50:33 jan Exp $ Copyright (c) 2000 Virtual Net @@ -55,7 +55,7 @@ int SetRealtimePriority(); int SetStandardPriority(); - BOOL OnStart() + PBoolean OnStart() { return TRUE; } void OnControl() { } @@ -63,13 +63,13 @@ static void SignalCallback(int); private: - BOOL Init(); + PBoolean Init(); void MainLoop(); void Clear(); private: GwH323EndPoint * m_endpoint; - static BOOL m_going_down; + static PBoolean m_going_down; }; @@ -77,7 +77,7 @@ // Signal handler // ////////////////////////////////////////////////////// -BOOL PMain::m_going_down = FALSE; +PBoolean PMain::m_going_down = FALSE; void PMain::SignalCallback (int rec_signal) { @@ -136,12 +136,8 @@ Clear(); } -BOOL PMain::Init() +PBoolean PMain::Init() { -#ifdef _DEBUG - PMemoryHeap::SetIgnoreAllocations(TRUE); -#endif - PTrace::SetOptions(PTrace::DateAndTime| /*PTrace::Thread|*/ PTrace::Blocks); PTrace::ClearOptions(PTrace::FileAndLine | PTrace::SystemLogStream); @@ -170,10 +166,6 @@ return FALSE; } -#ifdef _DEBUG - PMemoryHeap::SetIgnoreAllocations(FALSE); -#endif - return TRUE; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/isdngw/nullchannel.cxx new/isdngw-0.4.0/nullchannel.cxx --- old/isdngw/nullchannel.cxx 2004-09-19 19:43:31.000000000 +0200 +++ new/isdngw-0.4.0/nullchannel.cxx 2009-05-23 00:50:33.000000000 +0200 @@ -1,5 +1,5 @@ /* - $Id: nullchannel.cxx,v 1.1.1.1 2004/09/19 17:43:31 jan Exp $ + $Id: nullchannel.cxx,v 1.2 2009/05/22 22:50:33 jan Exp $ Copyright (c) 2000 Virtual Net @@ -18,7 +18,7 @@ #include "nullchannel.hxx" -BOOL NullChannel::Read(void* buf, PINDEX len) +PBoolean NullChannel::Read(void* buf, PINDEX len) { memset(buf,0,len); @@ -27,7 +27,7 @@ return TRUE; } -BOOL NullChannel::Write(const void* buf, PINDEX len) +PBoolean NullChannel::Write(const void* buf, PINDEX len) { PThread::Current()->Sleep(len/16); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/isdngw/nullchannel.hxx new/isdngw-0.4.0/nullchannel.hxx --- old/isdngw/nullchannel.hxx 2004-09-19 19:43:31.000000000 +0200 +++ new/isdngw-0.4.0/nullchannel.hxx 2009-05-23 00:50:33.000000000 +0200 @@ -1,5 +1,5 @@ /* - $Id: nullchannel.hxx,v 1.1.1.1 2004/09/19 17:43:31 jan Exp $ + $Id: nullchannel.hxx,v 1.2 2009/05/22 22:50:33 jan Exp $ Copyright (c) 2000 Virtual Net @@ -21,6 +21,11 @@ #include <ptlib.h> +#if !defined(P_USE_STANDARD_CXX_BOOL) && !defined(P_USE_INTEGER_BOOL) + typedef int PBoolean; +#endif + + class NullChannel : public PChannel { PCLASSINFO(NullChannel, PChannel); @@ -28,9 +33,9 @@ public: NullChannel() { } - BOOL IsOpen() const { return TRUE; } - BOOL Read (void *buf, PINDEX len); - BOOL Write (const void *buf, PINDEX len); + PBoolean IsOpen() const { return TRUE; } + PBoolean Read (void *buf, PINDEX len); + PBoolean Write (const void *buf, PINDEX len); }; #endif /* _NULLCHANNEL_HXX_ */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/isdngw/pots.cxx new/isdngw-0.4.0/pots.cxx --- old/isdngw/pots.cxx 2004-09-19 19:43:31.000000000 +0200 +++ new/isdngw-0.4.0/pots.cxx 2009-05-23 00:50:33.000000000 +0200 @@ -1,5 +1,5 @@ /* - $Id: pots.cxx,v 1.1.1.1 2004/09/19 17:43:31 jan Exp $ + $Id: pots.cxx,v 1.3 2009/05/22 22:50:33 jan Exp $ Copyright (c) 2000 Virtual Net @@ -64,7 +64,7 @@ // timeout_usec: time to wait in sec, usec // ///////////////////////////////////////////////// -BOOL read_ready (int handle, int timeout_sec, int timeout_usec=0) +PBoolean read_ready (int handle, int timeout_sec, int timeout_usec=0) { fd_set set; struct timeval tv; @@ -85,7 +85,7 @@ // timeout_usec: time to wait in sec, usec // ///////////////////////////////////////////////// -BOOL write_ready (int handle, int timeout_sec, int timeout_usec=0) +PBoolean write_ready (int handle, int timeout_sec, int timeout_usec=0) { fd_set set; struct timeval tv; @@ -179,7 +179,7 @@ // ret: ok (TRUE), error (FALSE) // ///////////////////////////////////////////////// -BOOL reads_compare (int device, const PString& c_buf, int r_timeout=1) +PBoolean reads_compare (int device, const PString& c_buf, int r_timeout=1) { char buf[500]; strcpy(buf, ""); @@ -189,7 +189,7 @@ return c_buf == buf; } -BOOL writes_reads_compare (int device, const PString& w_buf, +PBoolean writes_reads_compare (int device, const PString& w_buf, const PString& c_buf, int r_timeout=1) { if (!w_buf.IsEmpty()) @@ -273,7 +273,7 @@ // Initialize ISDN device and create lock file. // //////////////////////////////////////////////////////// -BOOL pots::Init () +PBoolean pots::Init () { m_isdn_connection = FALSE; m_audio_connection = FALSE; @@ -437,7 +437,7 @@ // Set the MSNs we are responsible for. // //////////////////////////////////////////////////////// -BOOL pots::ListenOn (const PString& numbers) +PBoolean pots::ListenOn (const PString& numbers) { if (m_isdn_connection) return FALSE; @@ -476,11 +476,13 @@ provider_name = lcr->GetProviderName(); // log the name of our CbC provider - if (!provider_name.IsEmpty()) + if (!provider_name.IsEmpty()) { PTRACE(2, "LCR\t using " << provider_name); + } } - else + else { PTRACE(1, "LCR\tCould not open isdnrate (LCR) socket" << isdnrate_socket); + } delete lcr; } @@ -519,7 +521,7 @@ } -BOOL pots::StartATD (const PString& telnumber) +PBoolean pots::StartATD (const PString& telnumber) { PString buf_nr = telnumber; PString dialprefix = Config::GetDialPrefix(); @@ -569,7 +571,7 @@ // Answer an incoming ISDN call. // //////////////////////////////////////////////////////// -BOOL pots::AnswerCall () +PBoolean pots::AnswerCall () { flush(m_device); @@ -590,7 +592,7 @@ // blocks "timeout" seconds. // //////////////////////////////////////////////////////// -BOOL pots::WaitForCall (int timeout) +PBoolean pots::WaitForCall (int timeout) { flush(m_device); PString CNPPrefix = Config::GetCPNPrefix(); @@ -636,7 +638,7 @@ // device. // //////////////////////////////////////////////////////// -BOOL pots::StartAudio () +PBoolean pots::StartAudio () { #ifdef USEPWLIB if (m_mutex_startaudio.WillBlock) // avoid dead lock @@ -670,7 +672,7 @@ // Audio playback/recording started? // //////////////////////////////////////////////////////// -BOOL pots::IsAudioOnline () +PBoolean pots::IsAudioOnline () { return m_audio_connection; } @@ -679,7 +681,7 @@ // Hangup the connection. // //////////////////////////////////////////////////////// -BOOL pots::HangUp () +PBoolean pots::HangUp () { PWaitAndSignal l1mutex(m_mutex_hangup_write); PWaitAndSignal l2mutex(m_mutex_hangup_read); @@ -752,14 +754,14 @@ PWaitAndSignal lmutex(m_mutex_hangup_read); if (!m_audio_connection) - throw ErrNotConnected(); + return -1; // throw ErrNotConnected(); int read_len = len; int was_dle = 0; while (read_len) { int nb_read = read(m_device, isdn_buffer, read_len); if (nb_read <= 0) - throw ErrRead(); + return -1; // throw ErrRead(); int nb_write = 0; for (int i=0; i<nb_read; i++) { @@ -779,7 +781,7 @@ case ETX: PTRACE(3,"--- ETX"); PTRACE(3,"ISDN\thang up detected on \"" << m_device_name << '"'); - throw ErrHangUp(); + return -1; // throw ErrHangUp(); case '0': case '1': @@ -804,7 +806,7 @@ default: PTRACE(3,"--- ???"); - throw ErrRead(); + return -1; // throw ErrRead(); } } else if (isdn_buffer[i] == DLE) { @@ -847,7 +849,7 @@ // >=0 : number of samples written // //////////////////////////////////////////////////////// -int pots::AudioWrite (const void* buffer, int len, BOOL block) +int pots::AudioWrite (const void* buffer, int len, PBoolean block) { const short* pnt = (const short*)buffer; unsigned char new_pnt[len*2]; @@ -855,7 +857,7 @@ PWaitAndSignal lmutex(m_mutex_hangup_write); if (! IsAudioOnline()) - throw ErrNotConnected(); + return -1; // throw ErrNotConnected(); // convert audio from OpenH323 to ISDN4Linux int c=0; @@ -878,14 +880,15 @@ if (rval == c) return len; - if (rval == -1) + if (rval == -1) { PTRACE(2,"ISDN\tWrite error: " << strerror(errno)); + } - throw ErrWrite(); + return -1; // throw ErrWrite(); } -BOOL pots::IsFree(const PString& device) +PBoolean pots::IsFree(const PString& device) { PString lockfile = "/var/lock/LCK.." + device.Mid(5); if (PFile::Exists(lockfile)) { @@ -920,7 +923,7 @@ { int rval = TTY_TIMEOUT; int timeout; - BOOL breakwhile = FALSE; + PBoolean breakwhile = FALSE; pots* pots_class = InfoConnections::PotsGet(m_connection.GetCallToken()); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/isdngw/pots.hxx new/isdngw-0.4.0/pots.hxx --- old/isdngw/pots.hxx 2004-09-19 19:43:31.000000000 +0200 +++ new/isdngw-0.4.0/pots.hxx 2009-05-23 00:50:33.000000000 +0200 @@ -1,5 +1,5 @@ /* - $Id: pots.hxx,v 1.1.1.1 2004/09/19 17:43:31 jan Exp $ + $Id: pots.hxx,v 1.2 2009/05/22 22:50:33 jan Exp $ Copyright (c) 2000 Virtual Net @@ -63,28 +63,28 @@ }; public: - static BOOL IsFree(const PString& device); + static PBoolean IsFree(const PString& device); public: pots (const PString&, const PString&); ~pots (); - BOOL Init (); + PBoolean Init (); void DeviceInit (); void DeviceClose (); - BOOL ListenOn (const PString&); + PBoolean ListenOn (const PString&); void LCRouter (PString &); - BOOL StartATD (const PString&); + PBoolean StartATD (const PString&); int ATDReply(); - BOOL AnswerCall (); - BOOL StartAudio (); - BOOL IsAudioOnline (); - BOOL HangUp (); + PBoolean AnswerCall (); + PBoolean StartAudio (); + PBoolean IsAudioOnline (); + PBoolean HangUp (); void OnDTMF (unsigned char); void GetDTMF (PString&); int AudioRead (void*, int); void AudioReadFlush (); - int AudioWrite (const void*, int, BOOL block=FALSE); - BOOL WaitForCall (int); + int AudioWrite (const void*, int, PBoolean block=FALSE); + PBoolean WaitForCall (int); const PString& GetCallerNumber (); const PString& GetGatewayNumber (); @@ -97,8 +97,8 @@ PString m_lockfile_name; // file name of the lock file PString m_msn; // ISDN MSN number char m_buf[2000]; - BOOL m_isdn_connection; // ISDN connection establish? - BOOL m_audio_connection; // recording/playback started? + PBoolean m_isdn_connection; // ISDN connection establish? + PBoolean m_audio_connection; // recording/playback started? PString m_number_caller; // remote ISDN number (remote) PString m_number_gateway; // called ISDN number (local) @@ -134,7 +134,7 @@ GwH323Connection& m_connection; PString m_phone_number; - BOOL m_end; + PBoolean m_end; }; #endif /* _POTS_HXX_ */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/isdngw/potschannel.cxx new/isdngw-0.4.0/potschannel.cxx --- old/isdngw/potschannel.cxx 2004-09-19 19:43:31.000000000 +0200 +++ new/isdngw-0.4.0/potschannel.cxx 2009-05-23 00:50:33.000000000 +0200 @@ -1,5 +1,5 @@ /* - $Id: potschannel.cxx,v 1.1.1.1 2004/09/19 17:43:31 jan Exp $ + $Id: potschannel.cxx,v 1.3 2009/05/22 22:50:33 jan Exp $ Copyright (c) 2000 Virtual Net @@ -67,52 +67,37 @@ } -BOOL PotsChannel::Close () +PBoolean PotsChannel::Close () { return TRUE; } -BOOL PotsChannel::IsOpen () const +PBoolean PotsChannel::IsOpen () const { return m_pots_class->IsAudioOnline(); } -BOOL PotsChannel::Read (void *buf, PINDEX len) +PBoolean PotsChannel::Read (void *buf, PINDEX len) { // ISDN: read audio data - try { - lastReadCount = 2*m_pots_class->AudioRead (buf, (int) len/2); - - // send ISDN DTMF as H.323 user input - DTMFDecode(); - - return TRUE; - } - catch (pots::ErrRead) { - PAssert(m_connection->ClearCall(), "clear call"); - m_pots_class->HangUp(); - SetErrorValues(Miscellaneous, 0); - return FALSE; - } - catch (pots::ErrHangUp) { - PTRACE(2, "ISDN hang up detected"); + lastReadCount = 2*m_pots_class->AudioRead (buf, (int) len/2); + + if (lastReadCount >= 0) { + // send ISDN DTMF as H.323 user input + DTMFDecode(); + return TRUE; + } else { PAssert(m_connection->ClearCall(), "clear call"); m_pots_class->HangUp(); SetErrorValues(Miscellaneous, 0); - return FALSE; - } - catch (pots::ErrNotConnected) { - PTRACE(2, "Read while ISDN not connected"); - m_connection->ClearCall(); - SetErrorValues(Miscellaneous, 0); return FALSE; } } -BOOL PotsChannel::Write (const void *buf, PINDEX len) +PBoolean PotsChannel::Write (const void *buf, PINDEX len) { BYTE new_buf[1000]; // PTime t1; @@ -179,7 +164,7 @@ return TRUE; } -BOOL PotsChannel::WritePots(const void* buf, PINDEX len) +PBoolean PotsChannel::WritePots(const void* buf, PINDEX len) { short tmp_buf[1000]; const void *wbuf = (const void*)tmp_buf; @@ -189,20 +174,14 @@ else wbuf = buf; - try { - lastWriteCount += 2*m_pots_class->AudioWrite(wbuf, (int)len/2, TRUE); + lastWriteCount += 2*m_pots_class->AudioWrite(wbuf, (int)len/2, TRUE); + if (lastWriteCount >= 0) { return TRUE; - } - catch (pots::ErrWrite) { + } else { lastWriteCount = 0; SetErrorValues(Miscellaneous, 0); return FALSE; } - catch (pots::ErrNotConnected) { - PTRACE(2, "Write while ISDN not connected"); - SetErrorValues(NotOpen, 0); - return FALSE; - } } @@ -212,7 +191,7 @@ // button: button to be sent // //////////////////////////////////////////////////////////////////// -BOOL PotsChannel::DTMFEncode (char button) +PBoolean PotsChannel::DTMFEncode (char button) { int samples; const short *data; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/isdngw/potschannel.hxx new/isdngw-0.4.0/potschannel.hxx --- old/isdngw/potschannel.hxx 2004-09-19 19:43:31.000000000 +0200 +++ new/isdngw-0.4.0/potschannel.hxx 2009-05-23 00:50:33.000000000 +0200 @@ -1,5 +1,5 @@ /* - $Id: potschannel.hxx,v 1.1.1.1 2004/09/19 17:43:31 jan Exp $ + $Id: potschannel.hxx,v 1.2 2009/05/22 22:50:33 jan Exp $ Copyright (c) 2000 Virtual Net @@ -26,6 +26,10 @@ #include <ptlib.h> #include <h323.h> +#if !defined(P_USE_STANDARD_CXX_BOOL) && !defined(P_USE_INTEGER_BOOL) + typedef int PBoolean; +#endif + class pots; class DspGain; class DspEncodeDTMF; @@ -51,12 +55,12 @@ PString &_token); ~PotsChannel(); - BOOL Close(); - BOOL IsOpen() const; - BOOL Read (void *buf, PINDEX len); - BOOL Write (const void *buf, PINDEX len); - BOOL WritePots (const void *buf, PINDEX len); - BOOL DTMFEncode (char button); + PBoolean Close(); + PBoolean IsOpen() const; + PBoolean Read (void *buf, PINDEX len); + PBoolean Write (const void *buf, PINDEX len); + PBoolean WritePots (const void *buf, PINDEX len); + PBoolean DTMFEncode (char button); private: void DTMFDecode(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/isdngw/resource.cxx new/isdngw-0.4.0/resource.cxx --- old/isdngw/resource.cxx 2004-09-19 19:43:31.000000000 +0200 +++ new/isdngw-0.4.0/resource.cxx 2009-05-23 00:50:33.000000000 +0200 @@ -1,5 +1,5 @@ /* - $Id: resource.cxx,v 1.1.1.1 2004/09/19 17:43:31 jan Exp $ + $Id: resource.cxx,v 1.3 2009/05/22 22:50:33 jan Exp $ Copyright (c) 2000 Virtual Net @@ -76,7 +76,7 @@ // token: (in) an identifier // ////////////////////////////////////////////////////////// -BOOL InfoConnections::LineGet_Token (const PString &token) +PBoolean InfoConnections::LineGet_Token (const PString &token) { PWaitAndSignal lmutex(m_mutex); @@ -103,7 +103,7 @@ // function) // ////////////////////////////////////////////////////////// -BOOL InfoConnections::LineGet_Temp (PString &temp_token) +PBoolean InfoConnections::LineGet_Temp (PString &temp_token) { PWaitAndSignal lmutex(m_mutex); @@ -129,7 +129,7 @@ // token: identifier of the line // ////////////////////////////////////////////////////////// -BOOL InfoConnections::LineFree (const PString &token) +PBoolean InfoConnections::LineFree (const PString &token) { PWaitAndSignal lmutex(m_mutex); @@ -176,7 +176,7 @@ // down: gateway is down (TRUE) // ////////////////////////////////////////////////////////// -BOOL InfoConnections::WriteStatus2HTML (BOOL down) +PBoolean InfoConnections::WriteStatus2HTML (PBoolean down) { pots * my_pots; const PString& filename(Config::GetStatusFilename()); @@ -260,7 +260,7 @@ // yes (TRUE) // ////////////////////////////////////////////////////////// -BOOL InfoConnections::NoLinesUsed () +PBoolean InfoConnections::NoLinesUsed () { PWaitAndSignal lmutex(m_mutex); @@ -278,7 +278,7 @@ // token: identifier of the line // ////////////////////////////////////////////////////////// -const PString& InfoConnections::GetDevice (const PString &token) +PString InfoConnections::GetDevice (const PString &token) { PWaitAndSignal lmutex(m_mutex); @@ -286,7 +286,7 @@ if (m_info[i].used && (*(m_info[i].token) == token)) return m_info[i].device; - throw NotFound("token not found"); + return ""; // throw NotFound("token not found"); } @@ -297,7 +297,7 @@ // _pots_class: pointer to the pots object // ////////////////////////////////////////////////////////// -BOOL InfoConnections::PotsSet (const PString &token, +PBoolean InfoConnections::PotsSet (const PString &token, pots *_pots_class) { PWaitAndSignal lmutex(m_mutex); @@ -338,7 +338,7 @@ // object // ////////////////////////////////////////////////////////// -BOOL InfoConnections::SetChannel (const PString &token, +PBoolean InfoConnections::SetChannel (const PString &token, PIndirectChannel *_channel) { PWaitAndSignal lmutex(m_mutex); @@ -377,7 +377,7 @@ // dir: direction (ToPots, FromPots, Unknown, Error) // ////////////////////////////////////////////////////////// -BOOL InfoConnections::DirectionSet (const PString &token, const t_direction dir) +PBoolean InfoConnections::DirectionSet (const PString &token, const t_direction dir) { PWaitAndSignal lmutex(m_mutex); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/isdngw/resource.hxx new/isdngw-0.4.0/resource.hxx --- old/isdngw/resource.hxx 2004-09-19 19:43:31.000000000 +0200 +++ new/isdngw-0.4.0/resource.hxx 2009-05-23 00:50:33.000000000 +0200 @@ -1,5 +1,5 @@ /* - $Id: resource.hxx,v 1.1.1.1 2004/09/19 17:43:31 jan Exp $ + $Id: resource.hxx,v 1.2 2009/05/22 22:50:33 jan Exp $ Copyright (c) 2000 Virtual Net @@ -46,26 +46,26 @@ static void Init (); static void Clear (); - static BOOL LineGet_Token (const PString &token); - static BOOL LineGet_Temp (PString &temp_token); + static PBoolean LineGet_Token (const PString &token); + static PBoolean LineGet_Temp (PString &temp_token); static void ChangeToken (const PString &token_old, const PString &token_new); - static BOOL LineFree (const PString &token); - static BOOL NoLinesUsed(); + static PBoolean LineFree (const PString &token); + static PBoolean NoLinesUsed(); - static const PString& GetDevice (const PString &token); + static PString GetDevice (const PString &token); - static BOOL PotsSet (const PString &token, pots *_pots_class); + static PBoolean PotsSet (const PString &token, pots *_pots_class); static pots *PotsGet (const PString &token); - static BOOL SetChannel (const PString &token, + static PBoolean SetChannel (const PString &token, PIndirectChannel *_inchannel); static PIndirectChannel *GetChannel (const PString &token); - static BOOL DirectionSet (const PString &token, const t_direction dir); + static PBoolean DirectionSet (const PString &token, const t_direction dir); static t_direction DirectionGet (const PString &token); - static BOOL WriteStatus2HTML (BOOL down); + static PBoolean WriteStatus2HTML (PBoolean down); private: class Info : public PObject @@ -74,7 +74,7 @@ public: PString device; - BOOL used; + PBoolean used; t_direction direction; pots * pots_class; PString * token; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/isdngw/routing.cxx new/isdngw-0.4.0/routing.cxx --- old/isdngw/routing.cxx 2004-09-19 19:43:31.000000000 +0200 +++ new/isdngw-0.4.0/routing.cxx 2009-05-23 00:50:33.000000000 +0200 @@ -1,5 +1,5 @@ /* - $Id: routing.cxx,v 1.1.1.1 2004/09/19 17:43:31 jan Exp $ + $Id: routing.cxx,v 1.3 2009/05/22 22:50:33 jan Exp $ Copyright (c) 2000 Virtual Net @@ -33,7 +33,7 @@ PString Routing::m_atlist; -BOOL Routing::Init() +PBoolean Routing::Init() { // first, empty the routing tables Free(); @@ -45,7 +45,7 @@ ///////////////////////////////////////// // Add the user from the directory file -BOOL Routing::InitFromFile() +PBoolean Routing::InitFromFile() { const PString& directory_file = Config::GetDirectoryFilename(); if (directory_file.IsEmpty()) { @@ -100,11 +100,11 @@ //////////////////////////////////////////////// // Get the H.323 user name of a given ISDN MSN -const PString& Routing::GetH323UserByNumber (const PString& nr) +const PString Routing::GetH323UserByNumber (const PString& nr) { PString* user = m_routing.GetAt(nr); if (user==NULL) - throw NotFound("Number not found"); + return ""; // throw NotFound("Number not found"); return *user; } @@ -117,7 +117,7 @@ { PString* nr = m_inverse_routing.GetAt(user); if (nr==NULL) - throw NotFound("User not found"); + return ""; // throw NotFound("User not found"); return Config::GetDefaultMSN().Left(Config::GetDefaultMSN().GetLength()-nr->GetLength())+*nr; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/isdngw/routing.hxx new/isdngw-0.4.0/routing.hxx --- old/isdngw/routing.hxx 2004-09-19 19:43:31.000000000 +0200 +++ new/isdngw-0.4.0/routing.hxx 2009-05-23 00:50:33.000000000 +0200 @@ -1,5 +1,5 @@ /* - $Id: routing.hxx,v 1.1.1.1 2004/09/19 17:43:31 jan Exp $ + $Id: routing.hxx,v 1.3 2009/05/22 22:50:33 jan Exp $ Copyright (c) 2000 Virtual Net @@ -36,16 +36,16 @@ }; public: - static BOOL Init (); + static PBoolean Init (); static void Free(); - static const PString& GetH323UserByNumber (const PString& nr); + static const PString GetH323UserByNumber (const PString& nr); static PString GetNumberByUser (const PString& user); static const PString& GetATList() { return m_atlist; } private: - static BOOL InitFromFile (); + static PBoolean InitFromFile (); static void AddUser(const PString&, const PString&); PDECLARE_DICTIONARY(RoutingTable, PString, PString) ++++++ rc.isdngw ++++++ --- /var/tmp/diff_new_pack.43A45a/_old 2012-02-23 15:33:21.000000000 +0100 +++ /var/tmp/diff_new_pack.43A45a/_new 2012-02-23 15:33:21.000000000 +0100 @@ -9,15 +9,14 @@ # # /sbin/rcisdngw # -# System startup script for the isdngw H.323-ISDN gateway # ### BEGIN INIT INFO # Provides: isdngw -# Required-Start: i4l network -# Required-Stop: i4l network +# Required-Start: i4l $network $remote_fs +# Required-Stop: i4l $network # Default-Start: 3 5 # Default-Stop: 0 1 2 6 -# Description: Start isdngw, the H.323-ISDN gateway +# Short-Description: Start isdngw, the H.323-ISDN gateway ### END INIT INFO isdngw_BIN=/usr/sbin/isdngw -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
