diff --git a/README b/README index 3a5b3ef9..ce8ea6ce 100644 --- a/README +++ b/README @@ -2,9 +2,9 @@ ----------------------------------- The YATE project aims to be a fully featured software PBX. - + It was created to alow developers and users to have more functionality and - scalability. To reach this goal YATE is built from two kinds of components: + scalability. To reach this goal YATE is built from two kinds of components: 1. The main engine - telengine. 2. Modules - routing modules - drivers diff --git a/autogen.sh b/autogen.sh index cc536472..affc2139 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,5 +1,23 @@ #!/bin/sh +# autogen.sh +# This file is part of the YATE Project http://YATE.null.ro +# +# Yet Another Telephony Engine - a fully featured software PBX and IVR +# Copyright (C) 2005-2014 Null Team +# +# This software is distributed under multiple licenses; +# see the COPYING file in the main directory for licensing +# information for this specific distribution. +# +# This use of this software may be subject to additional restrictions. +# See the LEGAL file in the main directory for details. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + # Run this to generate a new configure script if [ -z `which which 2>/dev/null` ]; then diff --git a/clients/main-qt4.cpp b/clients/main-qt4.cpp index ae81ba44..009c0d88 100644 --- a/clients/main-qt4.cpp +++ b/clients/main-qt4.cpp @@ -5,7 +5,7 @@ * A Qt-4 based universal telephony client * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -55,7 +55,7 @@ void EngineThread::cleanup() s_engineThread = 0; } -static int mainLoop() +static int mainLoop() { // create engine from this thread Engine::self(); diff --git a/clients/qt4/qt4client.cpp b/clients/qt4/qt4client.cpp index c1a1b2f8..83b13ff1 100644 --- a/clients/qt4/qt4client.cpp +++ b/clients/qt4/qt4client.cpp @@ -5,7 +5,7 @@ * A Qt-4 based universal telephony client * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -228,7 +228,7 @@ public: int getType() { if (m_widget) { - String cls = m_widget->metaObject()->className(); + String cls = m_widget->metaObject()->className(); for (int i = 0; i < Unknown; i++) if (s_types[i] == cls) return i; @@ -309,7 +309,7 @@ public: inline void addColumn(int index, int width = -1, const char* name = 0) { m_table->insertColumn(index); if (width >= 0) - m_table->setColumnWidth(index,width); + m_table->setColumnWidth(index,width); setHeaderText(index,name); } inline void setImage(int row, int col, const String& image) { @@ -344,9 +344,9 @@ public: void updateRow(const String& item, const NamedList* data, bool atStart); // Update a row from a list of parameters void updateRow(int row, const NamedList& data); - // Find a row by the first's column value. Return -1 if not found + // Find a row by the first's column value. Return -1 if not found int getRow(const String& item); - // Find a column by its label. Return -1 if not found + // Find a column by its label. Return -1 if not found int getColumn(const String& name, bool caseInsentive = true); protected: void init(bool tmp); @@ -394,7 +394,7 @@ static String s_propWindowFlags = "_yate_windowflags"; // Window flags static const String s_propContextMenu = "_yate_context_menu"; // Context menu name static String s_propHideInactive = "dynamicHideOnInactive"; // Hide inactive window static const String s_yatePropPrefix = "_yate_"; // Yate dynamic properties prefix -static NamedList s_qtStyles(""); // Qt styles classname -> internal name +static NamedList s_qtStyles(""); // Qt styles classname -> internal name // static Qt4ClientFactory s_qt4Factory; static Configuration s_cfg; @@ -889,7 +889,7 @@ void TableWidget::updateRow(int row, const NamedList& data) } } -// Find a row by the first's column value. Return -1 if not found +// Find a row by the first's column value. Return -1 if not found int TableWidget::getRow(const String& item) { int n = rowCount(); @@ -901,7 +901,7 @@ int TableWidget::getRow(const String& item) return -1; } -// Find a column by its label. Return -1 if not found +// Find a column by its label. Return -1 if not found int TableWidget::getColumn(const String& name, bool caseInsensitive) { int n = columnCount(); @@ -1545,7 +1545,7 @@ bool QtWindow::getOptions(const String& name, NamedList* items) } // Append or insert text lines to a widget -bool QtWindow::addLines(const String& name, const NamedList* lines, unsigned int max, +bool QtWindow::addLines(const String& name, const NamedList* lines, unsigned int max, bool atStart) { DDebug(ClientDriver::self(),DebugAll,"QtWindow(%s) addLines('%s',%p,%u,%s) [%p]", @@ -1613,7 +1613,7 @@ bool QtWindow::addLines(const String& name, const NamedList* lines, unsigned int if (w.combo()->lineEdit()) w.combo()->lineEdit()->setText(w.combo()->itemText(0)); } - else { + else { for (unsigned int i = 0; i < count; i++) { NamedString* ns = lines->getParam(i); if (ns) @@ -2057,7 +2057,7 @@ bool QtWindow::getSelect(const String& name, String& item) { TableWidget t(w); int row = t.crtRow(); - return row >= 0 ? t.getCell(row,0,item) : false; + return row >= 0 ? t.getCell(row,0,item) : false; } case QtWidget::ListBox: { @@ -2255,7 +2255,7 @@ void QtWindow::moveEvent(QMoveEvent* event) m_id.c_str(),m_x,m_y,this); } -void QtWindow::resizeEvent(QResizeEvent* event) +void QtWindow::resizeEvent(QResizeEvent* event) { QWidget::resizeEvent(event); // Don't update size if not shown normal @@ -3586,7 +3586,7 @@ bool QtClient::chooseFile(Window* parent, NamedList& params) } else dlg->setFileMode(QFileDialog::DirectoryOnly); - + dlg->selectFile(QtClient::setUtf8(params.getValue(YSTRING("selectedfile")))); dlg->setVisible(true); @@ -4282,7 +4282,7 @@ void QtClient::applyWindowFlags(QWidget* w, const String& value) w->setWindowFlags((Qt::WindowFlags)flags); } -// Build a QT Alignment mask from a comma separated list of flags +// Build a QT Alignment mask from a comma separated list of flags int QtClient::str2align(const String& flags, int initVal) { ObjList* list = flags.split(',',false); @@ -4623,7 +4623,7 @@ QtUrlBuilder::~QtUrlBuilder() { TelEngine::destruct(m_queryParams); } - + // Build URL QUrl QtUrlBuilder::build(const NamedList& params) const { diff --git a/clients/qt4/qt4client.h b/clients/qt4/qt4client.h index a8842215..c6702cfd 100644 --- a/clients/qt4/qt4client.h +++ b/clients/qt4/qt4client.h @@ -5,7 +5,7 @@ * A Qt-4 based universal telephony client * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -35,7 +35,7 @@ #endif #endif /* _WINDOWS */ - + #ifndef YQT4_API #define YQT4_API #endif @@ -191,7 +191,7 @@ public: * Destructor */ ~QtUrlBuilder(); - + /** * Build URL * @param params URL params @@ -466,7 +466,7 @@ public: /** * Build a menu object from a list of parameters. * Each menu item is indicated by a parameter starting with 'item:". - * item:menu_name=Menu Text will create a menu item named 'menu_name' with + * item:menu_name=Menu Text will create a menu item named 'menu_name' with * 'Menu Text' as display name. * If the item parameter is a NamedPointer a submenu will be created. * Menu actions properties can be set from parameters with format: @@ -641,9 +641,9 @@ public: static void applyWindowFlags(QWidget* w, const String& value); /** - * Build a QT Alignment mask from a comma separated list of flags + * Build a QT Alignment mask from a comma separated list of flags * @param flags The flags list - * @param initVal Initial value for the returned mask + * @param initVal Initial value for the returned mask * @return QT Alignment mask */ static int str2align(const String& flags, int initVal = 0); @@ -824,7 +824,7 @@ public: * @param atStart True to insert, false to append * @return True on success */ - virtual bool addLines(const String& name, const NamedList* lines, unsigned int max, + virtual bool addLines(const String& name, const NamedList* lines, unsigned int max, bool atStart = false); virtual bool addTableRow(const String& name, const String& item, const NamedList* data = 0, bool atStart = false); @@ -1002,7 +1002,7 @@ public: * @param parent The widget holding the loaded widget's contents * @param uiName The loaded widget's name (used for debug) * @param path Optional fileName path. Set to 0 to use the default one - * @return QWidget pointer or 0 on failure + * @return QWidget pointer or 0 on failure */ static QWidget* loadUI(const char* fileName, QWidget* parent, const char* uiName, const char* path = 0); @@ -1012,7 +1012,7 @@ public: * @param fileName Optional UI filename to clear. Clear all if 0 */ static void clearUICache(const char* fileName = 0); - + /** * Retrieve the parent window * @return QtWindow pointer or 0 @@ -1489,7 +1489,7 @@ public: */ static inline void setListItemProp(QObject* obj, const QString& item) { obj->setProperty("_yate_widgetlistitem",QVariant(item)); } - + /** * Retrieve the list item property from an item's child object * @param obj The object @@ -1999,7 +1999,7 @@ public: virtual void reset(); protected: - int m_acceptOnEmpty; // Accept drop on widget surface not occupied by any item + int m_acceptOnEmpty; // Accept drop on widget surface not occupied by any item ObjList m_acceptItemTypes; // Item type to handle drop }; diff --git a/clients/run-qt4 b/clients/run-qt4 index 00b3d769..820eb16d 100755 --- a/clients/run-qt4 +++ b/clients/run-qt4 @@ -1,5 +1,23 @@ #!/bin/sh +# run-qt4 +# This file is part of the YATE Project http://YATE.null.ro +# +# Yet Another Telephony Engine - a fully featured software PBX and IVR +# Copyright (C) 2005-2014 Null Team +# +# This software is distributed under multiple licenses; +# see the COPYING file in the main directory for licensing +# information for this specific distribution. +# +# This use of this software may be subject to additional restrictions. +# See the LEGAL file in the main directory for details. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + # Script to run the Qt4 client from the build directory if [ -x yate-qt4 -a -x ../run ]; then diff --git a/conf.d/camel_map.conf.sample b/conf.d/camel_map.conf.sample index 1a84b514..949e5eff 100644 --- a/conf.d/camel_map.conf.sample +++ b/conf.d/camel_map.conf.sample @@ -17,7 +17,7 @@ ;[tcap map] ; This section configures a TCAP User MAP/CAMEL protocol translator -; type: string: Type of TCAP User +; type: string: Type of TCAP User ; Allowed values are MAP or CAMEL ;type=MAP diff --git a/conf.d/cdrbuild.conf.sample b/conf.d/cdrbuild.conf.sample index db058808..89a00d01 100644 --- a/conf.d/cdrbuild.conf.sample +++ b/conf.d/cdrbuild.conf.sample @@ -69,7 +69,7 @@ ; s.uu -> 1.12 ; s.uuu -> 1.123 ; s.uuuu -> 1.1234 -; s.uuuuu -> 1.12346 +; s.uuuuu -> 1.12346 ; s.uuuuuu -> 1.123456 ; Other formats may me used but they must correspond with C strftime method formats ; Important! If duplicate formats are ignored! diff --git a/conf.d/h323chan.conf.sample b/conf.d/h323chan.conf.sample index 0cea2e15..b084fa5b 100644 --- a/conf.d/h323chan.conf.sample +++ b/conf.d/h323chan.conf.sample @@ -253,14 +253,14 @@ gkclient = false [gk] ; If server is true the gatekeeper of yate will start. You must understand that ; the H323EndPoint and H323GateKeeper share the calls. So you can make a call -; to a registered endpoint of this gatekeeper even if in the [ep] section +; to a registered endpoint of this gatekeeper even if in the [ep] section ; you haven't register the local H323EndPoint to the local H323Gatekeeper. In ; fact is not recomanded to register the local EndPoint to the local GateKeeper. -; The local H323EndPoint is used as proxy for calls to local non h323 -; destinations. If you wanna call let's say tone/dial from a registered -; endpoint to the local gatekeeper, you must make a route in regexroute (or +; The local H323EndPoint is used as proxy for calls to local non h323 +; destinations. If you wanna call let's say tone/dial from a registered +; endpoint to the local gatekeeper, you must make a route in regexroute (or ; whatever you use) and then just dial the number. -; If you wanna call a registered endpoint you must use now as a module register +; If you wanna call a registered endpoint you must use now as a module register ; since is the only module who can record prefixes right now. ; server: bool: Enable running a gatekeeper on the main endpoint diff --git a/conf.d/moh.conf.sample b/conf.d/moh.conf.sample index 950f22d7..872b8e8a 100644 --- a/conf.d/moh.conf.sample +++ b/conf.d/moh.conf.sample @@ -2,7 +2,7 @@ ; List of pipelines that will be used as sources of music (on hold). ; Each pipeline should write to stdout in 16bit signed linear ; at default rate 8000/s or as specificed in the "rate" parameter. -; From outside (e.g. routing modules) mohs are addressed +; From outside (e.g. routing modules) mohs are addressed ; as moh/default, moh/noise etc. ; use mpg123 to play a bunch of mp3 files (shuffled) diff --git a/conf.d/monitoring.conf.sample b/conf.d/monitoring.conf.sample index 608b605c..bfe31c34 100644 --- a/conf.d/monitoring.conf.sample +++ b/conf.d/monitoring.conf.sample @@ -29,12 +29,12 @@ ;[yate] ; this section is an example on how to configure a database account to be monitored ; name of the section is the database account - + ; type= ; specify that this section is for database monitoring ;type=database -;interval in seconds at which statistic data should be sent. Defaults to 3600 (1 hour) +;interval in seconds at which statistic data should be sent. Defaults to 3600 (1 hour) ;notiftime=3600 ; alarm threshold for maximum number of queries. Defaults to 1000 diff --git a/conf.d/ss7_lnp_ansi.conf.sample b/conf.d/ss7_lnp_ansi.conf.sample index 2962867f..e600a54e 100644 --- a/conf.d/ss7_lnp_ansi.conf.sample +++ b/conf.d/ss7_lnp_ansi.conf.sample @@ -114,7 +114,7 @@ tcap= ;check_addr=false ; sccp.CalledPartyAddress.route: string: Routing Indicator for SCCP Called Party Address -; Values allowed : +; Values allowed : ; gt - for Global Title Translation ; ssn - routing by SubSystem Number (SSN) ;sccp.CalledPartyAddress.route= @@ -136,11 +136,11 @@ tcap= ; {"maritimemobile", LNPClient::NPMaritimeMobile}, ; {"landmobile", LNPClient::NPLandMobile}, ; {"private", LNPClient::NPPrivate}, -; NOTE! According to GR-533-Core, this mustn't be set +; NOTE! According to GR-533-Core, this mustn't be set ;sccp.CalledPartyAddress.gt.np= ; sccp.CalledPartyAddress.gt.enconding: string: Encoding type for Called Party Address GT -; NOTE! According to GR-533-Core, this mustn't be set +; NOTE! According to GR-533-Core, this mustn't be set ; Allowed values: bcd ;sccp.CalledPartyAddress.gt.encoding : integer GT encoding scheme @@ -150,7 +150,7 @@ tcap= ;sccp.CalledPartyAddress.gt.tt=11 ; sccp.CallingPartyAddress.route: string: Routing Indicator for SCCP Calling Party Address -; Values allowed : +; Values allowed : ; ssn - routing by SubSystem Number (SSN) ;sccp.CallingPartyAddress.route= diff --git a/conf.d/yiaxchan.conf.sample b/conf.d/yiaxchan.conf.sample index b960e883..d4d1d4e3 100644 --- a/conf.d/yiaxchan.conf.sample +++ b/conf.d/yiaxchan.conf.sample @@ -14,7 +14,7 @@ ; trunk (timestamps use, send interval, max packet length) are ignored if there ; is another call using trunking with the same remote ip/port. ; TAKE CARE WHEN SETTING TRUNKING PARAMETERS IN MORE THEN 1 PLACE FOR THE SAME -; REMOTE IP/PORT !!! +; REMOTE IP/PORT !!! ; When routing a call to iax module a specific listener can be specfied: ; 1: Its name can be set in 'oconnection_id' parameter. ; The name of the listener created from 'general' section is 'iaxengine' diff --git a/conf.d/yjinglechan.conf.sample b/conf.d/yjinglechan.conf.sample index 0449bead..22f5e794 100644 --- a/conf.d/yjinglechan.conf.sample +++ b/conf.d/yjinglechan.conf.sample @@ -95,7 +95,7 @@ ; Minimum allowed value is 10000 ; Defaults to 20000 if missing or to the minimum value if invalid ;stanza_timeout=20000 - + ; ping_interval: integer: The interval (in milliseconds) to ping the remote party of a ; jingle session ; If enabled and the ping element fails the session will be terminated diff --git a/conf.d/ysigchan.conf.sample b/conf.d/ysigchan.conf.sample index 7dc8ba3d..2b03e102 100644 --- a/conf.d/ysigchan.conf.sample +++ b/conf.d/ysigchan.conf.sample @@ -62,7 +62,7 @@ ; Example of an ISDN trunk ;[trunk1] -; type: keyword: Specify the trunk type +; type: keyword: Specify the trunk type ; Allowed values: ; isdn-bri-net: ISDN network side of a data link over basic rate HDLC interface(s) ; isdn-bri-cpe: ISDN CPE (user) side of a data link over basic rate HDLC interface(s) @@ -194,7 +194,7 @@ ; Example of an ISDN passive recorder ;[recorder1] -; type: keyword: Specify the trunk type +; type: keyword: Specify the trunk type ; Allowed values: ; isdn-pri-mon: ISDN monitor of one or more primary HDLC interface(s) ;type=isdn-pri-mon @@ -252,7 +252,7 @@ ; Example of a SS7 ISUP trunk ;[isup1] -; type: keyword: Specify the trunk type +; type: keyword: Specify the trunk type ; Allowed values: ; ss7-isup: SS7 ISDN User Part ;type=ss7-isup @@ -410,7 +410,7 @@ ;ringback=no ; location: string: Exchange location to be set when sending Q.850 causes -; Available values are: +; Available values are: ; U User ; LPN Private network serving the local user ; LN Public network serving the local user @@ -513,7 +513,7 @@ ; Example of a SS7 MTP3 network (linkset) ;[linkset1] -; type: keyword: Specify the linkset type +; type: keyword: Specify the linkset type ; Allowed values: ; ss7-mtp3: SS7 Message Transfer Part - Layer 3 ;type=ss7-mtp3 @@ -624,7 +624,7 @@ ; Example of a SS7 MTP2 link ;[link1] -; type: keyword: Specify the link type +; type: keyword: Specify the link type ; Allowed values: ; ss7-mtp2: SS7 Message Transfer Part - Layer 2 ;type=ss7-mtp2 @@ -812,7 +812,7 @@ ;[sccp-mgm] ; type: keyword: identifies the component as a SS7 SCCP Management -; Values : ss7-sccp-itu-mgm +; Values : ss7-sccp-itu-mgm ; Must correspond with the pointcode type of the sccp ;type= @@ -843,7 +843,7 @@ ; pc : integer: Remote sccp pointcode ; ssn1 - ssnn: integer; List of local subsystems witch are of interest for the ; remote sccp -; Note! Ssn list may be empty if the remote sccp is concerned only if local +; Note! Ssn list may be empty if the remote sccp is concerned only if local ; sccp is available or not ;concerned=2057:1,2,3,4 @@ -852,8 +852,8 @@ ;local-subsystems=1,2,3,4,5,.. ; auto-monitor: boolean: True to auto monitor remote sccp's. -; This flag enables remote sccp auto monitoring. When a message failed to be -; send to a remote sccp, the sccp management will automaticaly append the +; This flag enables remote sccp auto monitoring. When a message failed to be +; send to a remote sccp, the sccp management will automaticaly append the ; destination to the monitored remote sccp destinations ; to prevent sccp routing failure. ; NOTE! Do not use this option if your GTT (Global Title Translator) diff --git a/conf.d/ysipchan.conf.sample b/conf.d/ysipchan.conf.sample index 7e408d6e..d71d9752 100644 --- a/conf.d/ysipchan.conf.sample +++ b/conf.d/ysipchan.conf.sample @@ -112,7 +112,7 @@ ; floodprotection: bool: Activate the drop mechanism for INVITE/REGISTER/SUBSCRIBE/OPTIONS messages when ; the number of SIP events retrieved in a row exceeds the number set for floodevents setting. -; Other messages, as well as reINVITEs, will be allowed. +; Other messages, as well as reINVITEs, will be allowed. ; NOTE! This mechanism is activated by default, to disable it configure this parameter to false. ;floodprotection=on diff --git a/conf.d/ysnmpagent.conf.sample b/conf.d/ysnmpagent.conf.sample index 6da2fef1..fb01d4f7 100644 --- a/conf.d/ysnmpagent.conf.sample +++ b/conf.d/ysnmpagent.conf.sample @@ -56,7 +56,7 @@ engine_info= ; list traps to disable. Must be separated by ','. ; An entire substree of traps can be disabled by ending the name of the trap with ".*" -; (e.g. disable the whole database status traps by adding database.*) +; (e.g. disable the whole database status traps by adding database.*) disable_traps= ; IP address to which the traps are sent. Defaults to localhost. @@ -79,7 +79,7 @@ community= ;[userV3] ; Configure a section for a SNMPv3 user. The name of the user is the name of the section. -; To allow SNMPv3 interrogation, at least one SNMPv3 user must be configured +; To allow SNMPv3 interrogation, at least one SNMPv3 user must be configured ; authentication pass phrase. If it is not set, authentication will not be required ;auth_password= diff --git a/engine/Array.cpp b/engine/Array.cpp index 38a2ffd3..79c8467a 100644 --- a/engine/Array.cpp +++ b/engine/Array.cpp @@ -3,7 +3,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -36,7 +36,7 @@ Array::Array(int columns, int rows) column = column->append(a,false); // and add some empty holders for each item for (int k=1; kappend(0,false); + a = a->append(0,false); } } } diff --git a/engine/Base64.cpp b/engine/Base64.cpp index ba789973..d5535c6f 100644 --- a/engine/Base64.cpp +++ b/engine/Base64.cpp @@ -5,7 +5,7 @@ * Base64 data encoding and decoding * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/engine/Channel.cpp b/engine/Channel.cpp index a3ba1ac7..c7948ff4 100644 --- a/engine/Channel.cpp +++ b/engine/Channel.cpp @@ -3,7 +3,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/engine/Cipher.cpp b/engine/Cipher.cpp index e1014a8c..b287008a 100644 --- a/engine/Cipher.cpp +++ b/engine/Cipher.cpp @@ -3,7 +3,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -21,7 +21,7 @@ using namespace TelEngine; -const TokenDict Cipher::s_directions[] = +const TokenDict Cipher::s_directions[] = { { "bidir", Cipher::Bidir }, { "encrypt", Cipher::Encrypt }, diff --git a/engine/Client.cpp b/engine/Client.cpp index fd4821d2..f70fe1d8 100644 --- a/engine/Client.cpp +++ b/engine/Client.cpp @@ -3,7 +3,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -1012,7 +1012,7 @@ void Client::cleanup() Engine::dispatch(m); TelEngine::destruct(m_defaultLogic); exitClient(); - + for (ObjList* o = m_relays.skipNull(); o; o = o->skipNext()) Engine::uninstall(static_cast(o->get())); m_relays.clear(); @@ -6233,7 +6233,7 @@ ClientFileItem* ClientDir::findChild(const String& path, const char* sep) // NamedInt // // Add an item to a list. Replace existing item with the same name -void NamedInt::addToListUniqueName(ObjList& list, NamedInt* obj) +void NamedInt::addToListUniqueName(ObjList& list, NamedInt* obj) { if (!obj) return; @@ -6250,7 +6250,7 @@ void NamedInt::addToListUniqueName(ObjList& list, NamedInt* obj) } // Clear all items with a given value -void NamedInt::clearValue(ObjList& list, int val) +void NamedInt::clearValue(ObjList& list, int val) { for (ObjList* o = list.skipNull(); o;) { NamedInt* ni = static_cast(o->get()); diff --git a/engine/ClientLogic.cpp b/engine/ClientLogic.cpp index 3fa20801..6f0af36c 100644 --- a/engine/ClientLogic.cpp +++ b/engine/ClientLogic.cpp @@ -5,7 +5,7 @@ * Default client logic * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -519,7 +519,7 @@ public: unlock(); return cancelJob(job,false); } - // Set contact/instance online + // Set contact/instance online virtual bool setOnline(bool online); // Cancel all running jobs, clear data virtual void cancel(); @@ -4020,7 +4020,7 @@ static bool addTrayIcon(const String& type) prio = Client::TrayIconNotification; iconParams->addParam("icon",Client::s_skinPath + "tray_notification.png"); triggerAction = s_actionShowNotification; - } + } else { prio = Client::TrayIconInfo; iconParams->addParam("icon",Client::s_skinPath + "tray_info.png"); @@ -5190,7 +5190,7 @@ void AccountStatus::init() setCurrent(lookup(ClientResource::Online,ClientResource::s_statusName)); } -// Update +// Update void AccountStatus::updateUi() { if (!(s_current && Client::self())) @@ -5501,7 +5501,7 @@ FtItem::FtItem(FtManager* owner, const String& itemId, const String& acc, m_contactName << "/" << inst; } -// Set contact/instance online +// Set contact/instance online bool FtItem::setOnline(bool online) { if (m_online == online) @@ -5592,7 +5592,7 @@ void DownloadBatch::addItem(ClientFileItem& item, const String& path, else cancel(); } - + // Timer tick handler bool DownloadBatch::timerTick(const Time& time) { @@ -5765,7 +5765,7 @@ bool DownloadBatch::handleFileInfoRsp(const String& oper, NamedList& msg) return true; } -// Set contact/instance online +// Set contact/instance online bool DownloadBatch::setOnline(bool online) { Lock lck(this); @@ -5902,7 +5902,7 @@ void DownloadBatch::addItemName(ClientFileItem& item, const String& path, else addFileUnsafe(p,ip,file->params()); } - + // Add a shared file void DownloadBatch::addFileUnsafe(const String& localPath, const String& downloadPath, const NamedList& params) @@ -6429,7 +6429,7 @@ FTManagerTimer::FTManagerTimer(FtManager* owner) m_owner(owner) { } - + FTManagerTimer::~FTManagerTimer() { notify(); @@ -7050,9 +7050,9 @@ bool DefaultLogic::action(Window* wnd, const String& name, NamedList* params) bool showMsgs = (name == YSTRING("messages_show") || name == s_actionShowNotification || name == s_actionShowInfo); if (showMsgs || name == YSTRING("messages_close")) { - bool notif = (name == s_actionShowNotification); + bool notif = (name == s_actionShowNotification); if (notif || name == s_actionShowInfo) { - removeTrayIcon(notif ? YSTRING("notification") : YSTRING("info")); + removeTrayIcon(notif ? YSTRING("notification") : YSTRING("info")); if (wnd && Client::valid()) Client::self()->setVisible(wnd->id(),true,true); } @@ -7729,7 +7729,7 @@ bool DefaultLogic::validateCall(NamedList& params, Window* wnd) bool DefaultLogic::callStart(NamedList& params, Window* wnd, const String& cmd) { if (!(Client::self() && fillCallStart(params,wnd))) - return false; + return false; if (!validateCall(params,wnd)) return false; String target; diff --git a/engine/Compressor.cpp b/engine/Compressor.cpp index 32350fc2..9fdbe2dd 100644 --- a/engine/Compressor.cpp +++ b/engine/Compressor.cpp @@ -3,7 +3,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/engine/Configuration.cpp b/engine/Configuration.cpp index fc1cf5bc..a1b6048e 100644 --- a/engine/Configuration.cpp +++ b/engine/Configuration.cpp @@ -3,7 +3,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/engine/DataBlock.cpp b/engine/DataBlock.cpp index b6aada0a..90eba431 100644 --- a/engine/DataBlock.cpp +++ b/engine/DataBlock.cpp @@ -3,7 +3,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/engine/DataFormat.cpp b/engine/DataFormat.cpp index c50a523a..19e7e827 100644 --- a/engine/DataFormat.cpp +++ b/engine/DataFormat.cpp @@ -3,7 +3,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -524,7 +524,7 @@ bool DataConsumer::synchronize(DataSource* source) bool DataSource::valid() const { Lock mylock(const_cast(this)); - if (!m_translator) + if (!m_translator) return true; // this is a translator's source - check if we have at least one valid consumer for (ObjList* l = m_consumers.skipNull(); l; l=l->skipNext()) { diff --git a/engine/Engine.cpp b/engine/Engine.cpp index 0e67505e..490d5652 100644 --- a/engine/Engine.cpp +++ b/engine/Engine.cpp @@ -3,7 +3,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/engine/HashList.cpp b/engine/HashList.cpp index 30b665c4..a5663731 100644 --- a/engine/HashList.cpp +++ b/engine/HashList.cpp @@ -3,7 +3,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * Idea and initial implementation (as HashTable) by Maciek Kaminski * diff --git a/engine/Hasher.cpp b/engine/Hasher.cpp index 827765ff..603a8c19 100644 --- a/engine/Hasher.cpp +++ b/engine/Hasher.cpp @@ -3,7 +3,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2013 Null Team + * Copyright (C) 2013-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/engine/Iterator.cpp b/engine/Iterator.cpp index bbf63dcd..3e66457a 100644 --- a/engine/Iterator.cpp +++ b/engine/Iterator.cpp @@ -3,7 +3,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/engine/Message.cpp b/engine/Message.cpp index 00dd65ec..842e824e 100644 --- a/engine/Message.cpp +++ b/engine/Message.cpp @@ -3,7 +3,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/engine/Mime.cpp b/engine/Mime.cpp index efa7a0f9..97ad06a5 100644 --- a/engine/Mime.cpp +++ b/engine/Mime.cpp @@ -1,9 +1,9 @@ /** * Mime.cpp - * This file is part of the YATE Project http://YATE.null.ro + * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/engine/Mutex.cpp b/engine/Mutex.cpp index e31ec162..aadfa288 100644 --- a/engine/Mutex.cpp +++ b/engine/Mutex.cpp @@ -3,7 +3,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -335,7 +335,7 @@ bool MutexPrivate::unlock() thr->m_locks--; if (!--m_locked) { const char* tname = thr ? thr->name() : 0; - if (tname != m_owner) + if (tname != m_owner) Debug(DebugFail,"MutexPrivate '%s' unlocked by '%s' but owned by '%s' [%p]", m_name,tname,m_owner,this); m_owner = 0; diff --git a/engine/NamedList.cpp b/engine/NamedList.cpp index 48df88c3..aa066542 100644 --- a/engine/NamedList.cpp +++ b/engine/NamedList.cpp @@ -3,7 +3,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/engine/ObjList.cpp b/engine/ObjList.cpp index 75ef44b4..c0815b20 100644 --- a/engine/ObjList.cpp +++ b/engine/ObjList.cpp @@ -3,7 +3,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/engine/Plugin.cpp b/engine/Plugin.cpp index 7e535c06..afbaf7da 100644 --- a/engine/Plugin.cpp +++ b/engine/Plugin.cpp @@ -3,7 +3,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/engine/Resolver.cpp b/engine/Resolver.cpp index 7ff0acae..1e9f2c23 100644 --- a/engine/Resolver.cpp +++ b/engine/Resolver.cpp @@ -3,7 +3,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/engine/Socket.cpp b/engine/Socket.cpp index 5f109c8a..7d1af81c 100644 --- a/engine/Socket.cpp +++ b/engine/Socket.cpp @@ -3,7 +3,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -609,7 +609,7 @@ void SocketAddr::split(const String& buf, String& addr, int& port, bool portPres port = buf.substr(p2 + 1).toInteger(); addr.assign(buf.c_str(),p2); } - else + else addr = buf; } else @@ -1161,7 +1161,7 @@ int File::readData(void* buffer, int length) else if (::GetLastError() == ERROR_HANDLE_EOF) { clearError(); return 0; - } + } copyError(); return -1; #else diff --git a/engine/String.cpp b/engine/String.cpp index ef6a30f7..e519f2d9 100644 --- a/engine/String.cpp +++ b/engine/String.cpp @@ -3,7 +3,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/engine/TelEngine.cpp b/engine/TelEngine.cpp index 10b441b9..8fb7f5f0 100644 --- a/engine/TelEngine.cpp +++ b/engine/TelEngine.cpp @@ -3,7 +3,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/engine/Thread.cpp b/engine/Thread.cpp index 9dc86b1b..3b1238d0 100644 --- a/engine/Thread.cpp +++ b/engine/Thread.cpp @@ -3,7 +3,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/engine/URI.cpp b/engine/URI.cpp index 4b461881..4b099ffa 100644 --- a/engine/URI.cpp +++ b/engine/URI.cpp @@ -1,9 +1,9 @@ /** * URI.cpp - * This file is part of the YATE Project http://YATE.null.ro + * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/engine/YMD5.cpp b/engine/YMD5.cpp index 7a3432fe..41760c4c 100644 --- a/engine/YMD5.cpp +++ b/engine/YMD5.cpp @@ -6,7 +6,7 @@ * Adapted for YATE by Paul Chitescu * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -32,7 +32,7 @@ typedef struct MD5Context { u_int32_t bits[2]; unsigned char in[64]; } MD5_CTX; - + #if !(defined(WORDS_BIGENDIAN) || defined(BIGENDIAN)) #define byteReverse(buf, len) /* Nothing */ @@ -217,7 +217,7 @@ static void MD5_Update(MD5_CTX *ctx, unsigned char const *buf, unsigned len) } /* - * Final wrapup - pad to 64-byte boundary with the bit pattern + * Final wrapup - pad to 64-byte boundary with the bit pattern * 1 0* (64-bit count of bits processed, MSB-first) */ static void MD5_Final(unsigned char digest[16], MD5_CTX *ctx) diff --git a/engine/YSHA1.cpp b/engine/YSHA1.cpp index b1aa2f12..ee15759a 100644 --- a/engine/YSHA1.cpp +++ b/engine/YSHA1.cpp @@ -9,7 +9,7 @@ * Adapted for YATE by Paul Chitescu * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -174,7 +174,7 @@ static void sha1_final(sha1_ctx *sctx, u_int8_t *out) sha1_update(sctx, padding, padlen); /* Append length */ - sha1_update(sctx, bits, sizeof bits); + sha1_update(sctx, bits, sizeof bits); /* Store state in digest */ for (i = j = 0; i < 5; i++, j += 4) { diff --git a/engine/YSHA256.cpp b/engine/YSHA256.cpp index 297a8444..83b99568 100644 --- a/engine/YSHA256.cpp +++ b/engine/YSHA256.cpp @@ -7,7 +7,7 @@ * Adapted for YATE by Paul Chitescu * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2013 Null Team + * Copyright (C) 2013-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/engine/macosx/MacOSXUtils.h b/engine/macosx/MacOSXUtils.h index eb9da411..0d7d2ceb 100644 --- a/engine/macosx/MacOSXUtils.h +++ b/engine/macosx/MacOSXUtils.h @@ -5,7 +5,7 @@ * Classes for interfacing with Mac OS X API * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -84,7 +84,7 @@ public: * @param path String into which the determined path will go * @param dirPath The type of directory path to be sought * @param domain Mask containing the domains where the type of directory is to be sought - * @param append Name of directory to create in the searched directory + * @param append Name of directory to create in the searched directory * @param append True if the directory is to be created if it not exists */ static void getPath(String& path, DirectoryPath dirPath, Domain domain, const char* append = 0, bool createDir = true); diff --git a/engine/macosx/MacOSXUtils.mm b/engine/macosx/MacOSXUtils.mm index dcaa9550..c0146ab1 100644 --- a/engine/macosx/MacOSXUtils.mm +++ b/engine/macosx/MacOSXUtils.mm @@ -3,7 +3,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/engine/regex/regex.c b/engine/regex/regex.c index a3525549..8d8820aa 100644 --- a/engine/regex/regex.c +++ b/engine/regex/regex.c @@ -79,7 +79,7 @@ char *realloc (); /* This must be nonzero for the wordchar and notwordchar pattern commands in re_match_2. */ -#ifndef Sword +#ifndef Sword #define Sword 1 #endif @@ -177,8 +177,8 @@ init_syntax_once () use `alloca' instead of `malloc'. This is because using malloc in re_search* or re_match* could cause memory leaks when C-g is used in Emacs; also, malloc is slower and causes storage fragmentation. On - the other hand, malloc is more portable, and easier to debug. - + the other hand, malloc is more portable, and easier to debug. + Because we sometimes use alloca, some routines have to be macros, not functions -- `alloca'-allocated space disappears at the end of the function it is called in. */ @@ -203,7 +203,7 @@ init_syntax_once () #ifndef _AIX /* Already did AIX, up at the top. */ char *alloca (); #endif /* not _AIX */ -#endif /* not HAVE_ALLOCA_H */ +#endif /* not HAVE_ALLOCA_H */ #endif /* not __GNUC__ */ #endif /* not alloca */ @@ -306,9 +306,9 @@ typedef enum /* Analogously, for end of buffer/string. */ endbuf, - + /* Followed by two byte relative address to which to jump. */ - jump, + jump, /* Same as jump, but marks the end of an alternative. */ jump_past_alt, @@ -316,11 +316,11 @@ typedef enum /* Followed by two-byte relative address of place to resume at in case of failure. */ on_failure_jump, - + /* Like on_failure_jump, but pushes a placeholder instead of the current string position when executed. */ on_failure_keep_string_jump, - + /* Throw away latest failure point and then jump to following two-byte relative address. */ pop_failure_jump, @@ -416,7 +416,7 @@ extract_number (dest, source) int *dest; unsigned char *source; { - int temp = SIGN_EXTEND_CHAR (*(source + 1)); + int temp = SIGN_EXTEND_CHAR (*(source + 1)); *dest = *source & 0377; *dest += temp << 8; } @@ -442,7 +442,7 @@ static void extract_number_and_incr (destination, source) int *destination; unsigned char **source; -{ +{ extract_number (destination, *source); *source += 2; } @@ -491,8 +491,8 @@ print_fastmap (fastmap) char *fastmap; { unsigned was_a_range = 0; - unsigned i = 0; - + unsigned i = 0; + while (i < (1 << BYTEWIDTH)) { if (fastmap[i++]) @@ -511,7 +511,7 @@ print_fastmap (fastmap) } } } - putchar ('\n'); + putchar ('\n'); } @@ -532,7 +532,7 @@ print_partial_compiled_pattern (start, end) printf ("(null)\n"); return; } - + /* Loop over pattern commands. */ while (p < pend) { @@ -578,14 +578,14 @@ print_partial_compiled_pattern (start, end) printf ("/charset%s", (re_opcode_t) *(p - 1) == charset_not ? "_not" : ""); - + assert (p + *p < pend); for (c = 0; c < *p; c++) { unsigned bit; unsigned char map_byte = p[1 + c]; - + putchar ('/'); for (bit = 0; bit < BYTEWIDTH; bit++) @@ -622,7 +622,7 @@ print_partial_compiled_pattern (start, end) case push_dummy_failure: printf ("/push_dummy_failure"); break; - + case maybe_pop_jump: extract_number_and_incr (&mcnt, &p); printf ("/maybe_pop_jump/0/%d", mcnt); @@ -631,36 +631,36 @@ print_partial_compiled_pattern (start, end) case pop_failure_jump: extract_number_and_incr (&mcnt, &p); printf ("/pop_failure_jump/0/%d", mcnt); - break; - + break; + case jump_past_alt: extract_number_and_incr (&mcnt, &p); printf ("/jump_past_alt/0/%d", mcnt); - break; - + break; + case jump: extract_number_and_incr (&mcnt, &p); printf ("/jump/0/%d", mcnt); break; - case succeed_n: + case succeed_n: extract_number_and_incr (&mcnt, &p); extract_number_and_incr (&mcnt2, &p); printf ("/succeed_n/0/%d/0/%d", mcnt, mcnt2); break; - - case jump_n: + + case jump_n: extract_number_and_incr (&mcnt, &p); extract_number_and_incr (&mcnt2, &p); printf ("/jump_n/0/%d/0/%d", mcnt, mcnt2); break; - - case set_number_at: + + case set_number_at: extract_number_and_incr (&mcnt, &p); extract_number_and_incr (&mcnt2, &p); printf ("/set_number_at/0/%d/0/%d", mcnt, mcnt2); break; - + case wordbound: printf ("/wordbound"); break; @@ -672,10 +672,10 @@ print_partial_compiled_pattern (start, end) case wordbeg: printf ("/wordbeg"); break; - + case wordend: printf ("/wordend"); - + #ifdef emacs case before_dot: printf ("/before_dot"); @@ -694,7 +694,7 @@ print_partial_compiled_pattern (start, end) mcnt = *p++; printf ("/%d", mcnt); break; - + case notsyntaxspec: printf ("/notsyntaxspec"); mcnt = *p++; @@ -705,7 +705,7 @@ print_partial_compiled_pattern (start, end) case wordchar: printf ("/wordchar"); break; - + case notwordchar: printf ("/notwordchar"); break; @@ -762,7 +762,7 @@ print_double_string (where, string1, size1, string2, size2) int size2; { unsigned this_char; - + if (where == NULL) printf ("(null)"); else @@ -772,7 +772,7 @@ print_double_string (where, string1, size1, string2, size2) for (this_char = where - string1; this_char < size1; this_char++) printchar (string1[this_char]); - where = string2; + where = string2; } for (this_char = where - string2; this_char < size2; this_char++) @@ -813,7 +813,7 @@ re_set_syntax (syntax) reg_syntax_t syntax; { reg_syntax_t ret = re_syntax_options; - + re_syntax_options = syntax; return ret; } @@ -849,7 +849,7 @@ static boolean at_begline_loc_p (), at_endline_loc_p (); static boolean group_in_compile_stack (); static reg_errcode_t compile_range (); -/* Fetch the next character in the uncompiled pattern---translating it +/* Fetch the next character in the uncompiled pattern---translating it if necessary. Also cast from a signed character in the constant string passed to us by the user to an unsigned char that we can use as an array index (in, e.g., `translate'). */ @@ -989,7 +989,7 @@ typedef struct pattern_offset_t begalt_offset; pattern_offset_t fixup_alt_jump; pattern_offset_t inner_group_offset; - pattern_offset_t laststart_offset; + pattern_offset_t laststart_offset; regnum_t regnum; } compile_stack_elt_t; @@ -1032,7 +1032,7 @@ typedef struct PATFETCH (c); \ } \ } \ - } + } #define CHAR_CLASS_MAX_LENGTH 6 /* Namely, `xdigit'. */ @@ -1058,7 +1058,7 @@ typedef struct `fastmap_accurate' is zero; `re_nsub' is the number of subexpressions in PATTERN; `not_bol' and `not_eol' are zero; - + The `fastmap' and `newline_anchor' fields are neither examined nor set. */ @@ -1073,20 +1073,20 @@ regex_compile (pattern, size, syntax, bufp) `char *' (i.e., signed), we declare these variables as unsigned, so they can be reliably used as array indices. */ register unsigned char c, c1; - + /* A random tempory spot in PATTERN. */ const char *p1; /* Points to the end of the buffer, where we should append. */ register unsigned char *b; - + /* Keeps track of unclosed groups. */ compile_stack_type compile_stack; /* Points to the current (ending) position in the pattern. */ const char *p = pattern; const char *pend = pattern + size; - + /* How to translate the characters in the pattern. */ char *translate = bufp->translate; @@ -1107,7 +1107,7 @@ regex_compile (pattern, size, syntax, bufp) /* Place in the uncompiled pattern (i.e., the {) to which to go back if the interval is invalid. */ const char *beg_interval; - + /* Address of the place where a forward jump should go to the end of the containing expression. Each alternative of an `or' -- except the last -- ends with a forward jump of this sort. */ @@ -1123,7 +1123,7 @@ regex_compile (pattern, size, syntax, bufp) if (debug) { unsigned debug_count; - + for (debug_count = 0; debug_count < size; debug_count++) printchar (pattern[debug_count]); putchar ('\n'); @@ -1147,9 +1147,9 @@ regex_compile (pattern, size, syntax, bufp) printer (for debugging) will think there's no pattern. We reset it at the end. */ bufp->used = 0; - + /* Always count groups, whether or not bufp->no_sub is set. */ - bufp->re_nsub = 0; + bufp->re_nsub = 0; #if !defined (emacs) && !defined (SYNTAX_TABLE) /* Initialize the syntax table. */ @@ -1200,7 +1200,7 @@ regex_compile (pattern, size, syntax, bufp) case '$': { if ( /* If at end of pattern, it's an operator. */ - p == pend + p == pend /* If context independent, it's an operator. */ || syntax & RE_CONTEXT_INDEP_ANCHORS /* Otherwise, depends on what's next. */ @@ -1231,7 +1231,7 @@ regex_compile (pattern, size, syntax, bufp) { /* Are we optimizing this jump? */ boolean keep_string_p = false; - + /* 1 means zero (many) matches is allowed. */ char zero_times_ok = 0, many_times_ok = 0; @@ -1279,7 +1279,7 @@ regex_compile (pattern, size, syntax, bufp) /* Star, etc. applied to an empty pattern is equivalent to an empty pattern. */ - if (!laststart) + if (!laststart) break; /* Now we know whether or not zero matches is allowed @@ -1288,7 +1288,7 @@ regex_compile (pattern, size, syntax, bufp) { /* More than one repetition is allowed, so put in at the end a backward relative jump from `b' to before the next jump we're going to put in below (which jumps from - laststart to after this jump). + laststart to after this jump). But if we are at the `*' in the exact sequence `.*\n', insert an unconditional jump backwards to the ., @@ -1365,7 +1365,7 @@ regex_compile (pattern, size, syntax, bufp) /* We test `*p == '^' twice, instead of using an if statement, so we only need one BUF_PUSH. */ - BUF_PUSH (*p == '^' ? charset_not : charset); + BUF_PUSH (*p == '^' ? charset_not : charset); if (*p == '^') p++; @@ -1415,8 +1415,8 @@ regex_compile (pattern, size, syntax, bufp) was a character: if this is a hyphen not at the beginning or the end of a list, then it's the range operator. */ - if (c == '-' - && !(p - 2 >= pattern && p[-2] == '[') + if (c == '-' + && !(p - 2 >= pattern && p[-2] == '[') && !(p - 3 >= pattern && p[-3] == '[' && p[-2] == '^') && *p != ']') { @@ -1431,7 +1431,7 @@ regex_compile (pattern, size, syntax, bufp) /* Move past the `-'. */ PATFETCH (c1); - + ret = compile_range (&p, pend, translate, syntax, b); if (ret != REG_NOERROR) return ret; } @@ -1460,7 +1460,7 @@ regex_compile (pattern, size, syntax, bufp) str[c1] = '\0'; /* If isn't a word bracketed by `[:' and:`]': - undo the ending character, the letters, and leave + undo the ending character, the letters, and leave the leading `:' and `[' (but set bits for them). */ if (c == ':' && *p == ']') { @@ -1477,12 +1477,12 @@ regex_compile (pattern, size, syntax, bufp) boolean is_space = STREQ (str, "space"); boolean is_upper = STREQ (str, "upper"); boolean is_xdigit = STREQ (str, "xdigit"); - + if (!IS_CHAR_CLASS (str)) return REG_ECTYPE; /* Throw away the ] at the end of the character class. */ - PATFETCH (c); + PATFETCH (c); if (p == pend) return REG_EBRACK; @@ -1507,7 +1507,7 @@ regex_compile (pattern, size, syntax, bufp) else { c1++; - while (c1--) + while (c1--) PATUNFETCH; SET_LIST_BIT ('['); SET_LIST_BIT (':'); @@ -1523,8 +1523,8 @@ regex_compile (pattern, size, syntax, bufp) /* Discard any (non)matching list bytes that are all 0 at the end of the map. Decrease the map-length byte too. */ - while ((int) b[-1] > 0 && b[b[-1] - 1] == 0) - b[-1]--; + while ((int) b[-1] > 0 && b[b[-1] - 1] == 0) + b[-1]--; b += b[-1]; } break; @@ -1584,7 +1584,7 @@ regex_compile (pattern, size, syntax, bufp) regnum++; if (COMPILE_STACK_FULL) - { + { RETALLOC (compile_stack.stack, compile_stack.size << 1, compile_stack_elt_t); if (compile_stack.stack == NULL) return REG_ESPACE; @@ -1597,7 +1597,7 @@ regex_compile (pattern, size, syntax, bufp) whole pattern moves because of realloc, they will still be valid. */ COMPILE_STACK_TOP.begalt_offset = begalt - bufp->buffer; - COMPILE_STACK_TOP.fixup_alt_jump + COMPILE_STACK_TOP.fixup_alt_jump = fixup_alt_jump ? fixup_alt_jump - bufp->buffer + 1 : 0; COMPILE_STACK_TOP.laststart_offset = b - bufp->buffer; COMPILE_STACK_TOP.regnum = regnum; @@ -1611,7 +1611,7 @@ regex_compile (pattern, size, syntax, bufp) COMPILE_STACK_TOP.inner_group_offset = b - bufp->buffer + 2; BUF_PUSH_3 (start_memory, regnum, 0); } - + compile_stack.avail++; fixup_alt_jump = 0; @@ -1640,7 +1640,7 @@ regex_compile (pattern, size, syntax, bufp) `pop_failure_jump' to pop. See comments at `push_dummy_failure' in `re_match_2'. */ BUF_PUSH (push_dummy_failure); - + /* We allocated space for this jump when we assigned to `fixup_alt_jump', in the `handle_alt' case below. */ STORE_JUMP (jump_past_alt, fixup_alt_jump, b - 1); @@ -1662,11 +1662,11 @@ regex_compile (pattern, size, syntax, bufp) as in `(ab)c(de)' -- the second group is #2. */ regnum_t this_group_regnum; - compile_stack.avail--; + compile_stack.avail--; begalt = bufp->buffer + COMPILE_STACK_TOP.begalt_offset; fixup_alt_jump = COMPILE_STACK_TOP.fixup_alt_jump - ? bufp->buffer + COMPILE_STACK_TOP.fixup_alt_jump - 1 + ? bufp->buffer + COMPILE_STACK_TOP.fixup_alt_jump - 1 : 0; laststart = bufp->buffer + COMPILE_STACK_TOP.laststart_offset; this_group_regnum = COMPILE_STACK_TOP.regnum; @@ -1681,7 +1681,7 @@ regex_compile (pattern, size, syntax, bufp) { unsigned char *inner_group_loc = bufp->buffer + COMPILE_STACK_TOP.inner_group_offset; - + *inner_group_loc = regnum - this_group_regnum; BUF_PUSH_3 (stop_memory, this_group_regnum, regnum - this_group_regnum); @@ -1710,10 +1710,10 @@ regex_compile (pattern, size, syntax, bufp) jump (put in below, which in turn will jump to the next (if any) alternative's such jump, etc.). The last such jump jumps to the correct final destination. A picture: - _____ _____ - | | | | - | v | v - a | b | c + _____ _____ + | | | | + | v | v + a | b | c If we are at `b', then fixup_alt_jump right now points to a three-byte space after `a'. We'll put in the jump, set @@ -1735,10 +1735,10 @@ regex_compile (pattern, size, syntax, bufp) break; - case '{': + case '{': /* If \{ is a literal. */ if (!(syntax & RE_INTERVALS) - /* If we're at `\{' and it's not the open-interval + /* If we're at `\{' and it's not the open-interval operator. */ || ((syntax & RE_INTERVALS) && (syntax & RE_NO_BK_BRACES)) || (p - 2 == pattern && p == pend)) @@ -1777,11 +1777,11 @@ regex_compile (pattern, size, syntax, bufp) { if (syntax & RE_NO_BK_BRACES) goto unfetch_interval; - else + else return REG_BADBR; } - if (!(syntax & RE_NO_BK_BRACES)) + if (!(syntax & RE_NO_BK_BRACES)) { if (c != '\\') return REG_EBRACE; @@ -1792,7 +1792,7 @@ regex_compile (pattern, size, syntax, bufp) { if (syntax & RE_NO_BK_BRACES) goto unfetch_interval; - else + else return REG_BADBR; } @@ -1828,7 +1828,7 @@ regex_compile (pattern, size, syntax, bufp) jump_n (The upper bound and `jump_n' are omitted if `upper_bound' is 1, though.) */ - else + else { /* If the upper bound is > 1, we need to insert more at the end of the loop. */ unsigned nbytes = 10 + (upper_bound > 1) * 10; @@ -1845,7 +1845,7 @@ regex_compile (pattern, size, syntax, bufp) lower_bound); b += 5; - /* Code to initialize the lower bound. Insert + /* Code to initialize the lower bound. Insert before the `succeed_n'. The `5' is the last two bytes of this `set_number_at', plus 3 bytes of the following `succeed_n'. */ @@ -1856,7 +1856,7 @@ regex_compile (pattern, size, syntax, bufp) { /* More than one repetition is allowed, so append a backward jump to the `succeed_n' that starts this interval. - + When we've reached this during matching, we'll have matched the interval once, so jump back only `upper_bound - 1' times. */ @@ -1874,7 +1874,7 @@ regex_compile (pattern, size, syntax, bufp) so everything is getting moved up by 5. Conclusion: (b - 2) - (laststart + 3) + 5, i.e., b - laststart. - + We insert this at the beginning of the loop so that if we fail during matching, we'll reinitialize the bounds. */ @@ -1895,7 +1895,7 @@ regex_compile (pattern, size, syntax, bufp) beg_interval = NULL; /* normal_char and normal_backslash need `c'. */ - PATFETCH (c); + PATFETCH (c); if (!(syntax & RE_NO_BK_BRACES)) { @@ -1911,7 +1911,7 @@ regex_compile (pattern, size, syntax, bufp) BUF_PUSH (at_dot); break; - case 's': + case 's': laststart = b; PATFETCH (c); BUF_PUSH_2 (syntaxspec, syntax_spec_code[c]); @@ -2002,11 +2002,11 @@ regex_compile (pattern, size, syntax, bufp) /* Expects the character in `c'. */ normal_char: /* If no exactn currently being built. */ - if (!pending_exact + if (!pending_exact /* If last exactn not at current position. */ || pending_exact + *pending_exact + 1 != b - + /* We have only one byte following the exactn for the count. */ || *pending_exact == (1 << BYTEWIDTH) - 1 @@ -2021,26 +2021,26 @@ regex_compile (pattern, size, syntax, bufp) : (p[0] == '\\' && p[1] == '{')))) { /* Start building a new exactn. */ - + laststart = b; BUF_PUSH_2 (exactn, 0); pending_exact = b - 1; } - + BUF_PUSH (c); (*pending_exact)++; break; } /* switch (c) */ } /* while p != pend */ - + /* Through the pattern now. */ - + if (fixup_alt_jump) STORE_JUMP (jump_past_alt, fixup_alt_jump, b); - if (!COMPILE_STACK_EMPTY) + if (!COMPILE_STACK_EMPTY) return REG_EPAREN; free (compile_stack.stack); @@ -2096,14 +2096,14 @@ insert_op1 (op, loc, arg, end) re_opcode_t op; unsigned char *loc; int arg; - unsigned char *end; + unsigned char *end; { register unsigned char *pfrom = end; register unsigned char *pto = end + 3; while (pfrom != loc) *--pto = *--pfrom; - + store_op1 (op, loc, arg); } @@ -2115,14 +2115,14 @@ insert_op2 (op, loc, arg1, arg2, end) re_opcode_t op; unsigned char *loc; int arg1, arg2; - unsigned char *end; + unsigned char *end; { register unsigned char *pfrom = end; register unsigned char *pto = end + 5; while (pfrom != loc) *--pto = *--pfrom; - + store_op2 (op, loc, arg1, arg2); } @@ -2138,7 +2138,7 @@ at_begline_loc_p (pattern, p, syntax) { const char *prev = p - 2; boolean prev_prev_backslash = prev > pattern && prev[-1] == '\\'; - + return /* After a subexpression? */ (*prev == '(' && (syntax & RE_NO_BK_PARENS || prev_prev_backslash)) @@ -2158,7 +2158,7 @@ at_endline_loc_p (p, pend, syntax) const char *next = p; boolean next_backslash = *next == '\\'; const char *next_next = p + 1 < pend ? p + 1 : NULL; - + return /* Before a subexpression? */ (syntax & RE_NO_BK_PARENS ? *next == ')' @@ -2169,7 +2169,7 @@ at_endline_loc_p (p, pend, syntax) } -/* Returns true if REGNUM is in one of COMPILE_STACK's elements and +/* Returns true if REGNUM is in one of COMPILE_STACK's elements and false if it's not. */ static boolean @@ -2179,8 +2179,8 @@ group_in_compile_stack (compile_stack, regnum) { int this_element; - for (this_element = compile_stack.avail - 1; - this_element >= 0; + for (this_element = compile_stack.avail - 1; + this_element >= 0; this_element--) if (compile_stack.stack[this_element].regnum == regnum) return true; @@ -2194,9 +2194,9 @@ group_in_compile_stack (compile_stack, regnum) starting character is in `P[-2]'. (`P[-1]' is the character `-'.) Then we set the translation of all bits between the starting and ending characters (inclusive) in the compiled pattern B. - + Return an error code. - + We use these short variable names so we can use the same macros as `regex_compile' itself. */ @@ -2211,7 +2211,7 @@ compile_range (p_ptr, pend, translate, syntax, b) const char *p = *p_ptr; int range_start, range_end; - + if (p == pend) return REG_ERANGE; @@ -2220,7 +2220,7 @@ compile_range (p_ptr, pend, translate, syntax, b) is set, the range endpoints will be negative if we fetch using a signed char *. - We also want to fetch the endpoints without translating them; the + We also want to fetch the endpoints without translating them; the appropriate translation is done in the bit-setting loop below. */ range_start = ((unsigned char *) p)[-2]; range_end = ((unsigned char *) p)[0]; @@ -2241,14 +2241,14 @@ compile_range (p_ptr, pend, translate, syntax, b) { SET_LIST_BIT (TRANSLATE (this_char)); } - + return REG_NOERROR; } /* Failure stack declarations and macros; both re_compile_fastmap and re_match_2 use a failure stack. These have to be macros because of REGEX_ALLOCATE. */ - + /* Number of failure points for which to initially allocate space when matching. If this number is exceeded, we allocate more @@ -2296,8 +2296,8 @@ typedef struct /* Double the size of FAIL_STACK, up to approximately `re_max_failures' items. Return 1 if succeeds, and 0 if either ran out of memory - allocating space for it or it was already too large. - + allocating space for it or it was already too large. + REGEX_REALLOCATE requires `destination' be declared. */ #define DOUBLE_FAIL_STACK(fail_stack) \ @@ -2314,7 +2314,7 @@ typedef struct 1))) -/* Push PATTERN_OP on FAIL_STACK. +/* Push PATTERN_OP on FAIL_STACK. Return 1 if was able to do so and 0 if ran out of memory allocating space to do so. */ @@ -2345,12 +2345,12 @@ typedef struct /* Push the information about the state we will need - if we ever fail back to it. - + if we ever fail back to it. + Requires variables fail_stack, regstart, regend, reg_info, and num_regs be declared. DOUBLE_FAIL_STACK requires `destination' be declared. - + Does `return FAILURE_CODE' if runs out of memory. */ #define PUSH_FAILURE_POINT(pattern_place, string_place, failure_code) \ @@ -2458,7 +2458,7 @@ typedef struct LOW_REG, HIGH_REG -- the highest and lowest active registers. REGSTART, REGEND -- arrays of string positions. REG_INFO -- array of information about each subexpression. - + Also assumes the variables `fail_stack' and (if debugging), `bufp', `pend', `string1', `size1', `string2', and `size2'. */ @@ -2526,7 +2526,7 @@ typedef struct The caller must supply the address of a (1 << BYTEWIDTH)-byte data area as BUFP->fastmap. - + We set the `fastmap', `fastmap_accurate', and `can_be_null' fields in the pattern buffer. @@ -2543,7 +2543,7 @@ re_compile_fastmap (bufp) #endif /* We don't push any register information onto the failure stack. */ unsigned num_regs = 0; - + register char *fastmap = bufp->fastmap; unsigned char *pattern = bufp->buffer; unsigned long size = bufp->used; @@ -2560,27 +2560,27 @@ re_compile_fastmap (bufp) boolean succeed_n_p = false; assert (fastmap != NULL && p != NULL); - + INIT_FAIL_STACK (); bzero (fastmap, 1 << BYTEWIDTH); /* Assume nothing's valid. */ bufp->fastmap_accurate = 1; /* It will be when we're done. */ bufp->can_be_null = 0; - + while (p != pend || !FAIL_STACK_EMPTY ()) { if (p == pend) { bufp->can_be_null |= path_can_be_null; - + /* Reset for next path. */ path_can_be_null = true; - + p = fail_stack.stack[--fail_stack.avail]; } /* We should never be about to go beyond the end of the pattern. */ assert (p < pend); - + #ifdef SWITCH_ENUM_BUG switch ((int) ((re_opcode_t) *p++)) #else @@ -2704,10 +2704,10 @@ re_compile_fastmap (bufp) case jump_past_alt: case dummy_failure_jump: EXTRACT_NUMBER_AND_INCR (j, p); - p += j; + p += j; if (j > 0) continue; - + /* Jump backward implies we just went through the body of a loop and matched nothing. Opcode jumped to should be `on_failure_jump' or `succeed_n'. Just treat it like an @@ -2719,10 +2719,10 @@ re_compile_fastmap (bufp) p++; EXTRACT_NUMBER_AND_INCR (j, p); - p += j; - + p += j; + /* If what's on the stack is where we are now, pop it. */ - if (!FAIL_STACK_EMPTY () + if (!FAIL_STACK_EMPTY () && fail_stack.stack[fail_stack.avail - 1] == p) fail_stack.avail--; @@ -2760,7 +2760,7 @@ re_compile_fastmap (bufp) case succeed_n: /* Get to the number of times to succeed. */ - p += 2; + p += 2; /* Increment p past the n for when k != 0. */ EXTRACT_NUMBER_AND_INCR (k, p); @@ -2851,7 +2851,7 @@ re_search (bufp, string, size, startpos, range, regs) int size, startpos, range; struct re_registers *regs; { - return re_search_2 (bufp, NULL, 0, string, size, startpos, range, + return re_search_2 (bufp, NULL, 0, string, size, startpos, range, regs, size); } @@ -2859,17 +2859,17 @@ re_search (bufp, string, size, startpos, range, regs) /* Using the compiled pattern in BUFP->buffer, first tries to match the virtual concatenation of STRING1 and STRING2, starting first at index STARTPOS, then at STARTPOS + 1, and so on. - + STRING1 and STRING2 have length SIZE1 and SIZE2, respectively. - + RANGE is how far to scan while trying to match. RANGE = 0 means try only at STARTPOS; in general, the last start tried is STARTPOS + RANGE. - + In REGS, return the indices of the virtual concatenation of STRING1 and STRING2 that matched the entire BUFP->buffer and its contained subexpressions. - + Do not consider matching one past the index STOP in the virtual concatenation of STRING1 and STRING2. @@ -2896,7 +2896,7 @@ re_search_2 (bufp, string1, size1, string2, size2, startpos, range, regs, stop) /* Check for out-of-range STARTPOS. */ if (startpos < 0 || startpos > total_size) return -1; - + /* Fix up RANGE if it might eventually take us outside the virtual concatenation of STRING1 and STRING2. */ if (endpos < -1) @@ -2918,10 +2918,10 @@ re_search_2 (bufp, string1, size1, string2, size2, startpos, range, regs, stop) if (fastmap && !bufp->fastmap_accurate) if (re_compile_fastmap (bufp) == -2) return -2; - + /* Loop through the string, looking for a place to start matching. */ for (;;) - { + { /* If a fastmap is supplied, skip quickly over characters that cannot be the start of a match. If the pattern can match the null string, however, we don't need to skip characters; we want @@ -2938,7 +2938,7 @@ re_search_2 (bufp, string1, size1, string2, size2, startpos, range, regs, stop) lim = range - (size1 - startpos); d = (startpos >= size1 ? string2 - size1 : string1) + startpos; - + /* Written out as an if-else to avoid testing `translate' inside the loop. */ if (translate) @@ -2955,7 +2955,7 @@ re_search_2 (bufp, string1, size1, string2, size2, startpos, range, regs, stop) else /* Searching backwards. */ { register char c = (size1 == 0 || startpos >= size1 - ? string2[startpos - size1] + ? string2[startpos - size1] : string1[startpos]); if (!fastmap[(unsigned char) TRANSLATE (c)]) @@ -2972,21 +2972,21 @@ re_search_2 (bufp, string1, size1, string2, size2, startpos, range, regs, stop) startpos, regs, stop); if (val >= 0) return startpos; - + if (val == -2) return -2; advance: - if (!range) + if (!range) break; - else if (range > 0) + else if (range > 0) { - range--; + range--; startpos++; } else { - range++; + range++; startpos--; } } @@ -3005,8 +3005,8 @@ static boolean alt_match_null_string_p (), onto the failure stack. Other register information, such as the starting and ending positions (which are addresses), and the list of inner groups (which is a bits list) are maintained in separate - variables. - + variables. + We are making a (strictly speaking) nonportable assumption here: that the compiler will pack our bit fields into something that fits into the type of `word', i.e., is something that fits into one item on the @@ -3080,7 +3080,7 @@ typedef union /* Test if at very beginning or at very end of the virtual concatenation of `string1' and `string2'. If only one string, it's `string2'. */ #define AT_STRINGS_BEG(d) ((d) == (size1 ? string1 : string2) || !size2) -#define AT_STRINGS_END(d) ((d) == end2) +#define AT_STRINGS_END(d) ((d) == end2) /* Test if D points to a character which is word-constituent. We have @@ -3143,7 +3143,7 @@ re_match (bufp, string, size, pos, regs) int size, pos; struct re_registers *regs; { - return re_match_2 (bufp, NULL, 0, string, size, pos, regs, size); + return re_match_2 (bufp, NULL, 0, string, size, pos, regs, size); } #endif /* not emacs */ @@ -3152,7 +3152,7 @@ re_match (bufp, string, size, pos, regs) the (virtual) concatenation of STRING1 and STRING2 (of length SIZE1 and SIZE2, respectively). We start matching at POS, and stop matching at STOP. - + If REGS is non-null and the `no_sub' field of BUFP is nonzero, we store offsets for the substring each group matched in REGS. See the documentation for exactly how many groups we fill. @@ -3183,7 +3183,7 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) /* Where we are in the data, and the end of the current string. */ const char *d, *dend; - + /* Where we are in the pattern, and the end of the pattern. */ unsigned char *p = bufp->buffer; register unsigned char *pend = p + bufp->used; @@ -3210,7 +3210,7 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) return, for use in backreferences. The number here includes an element for register zero. */ unsigned num_regs = bufp->re_nsub + 1; - + /* The currently active registers. */ unsigned lowest_active_reg = NO_LOWEST_ACTIVE_REG; unsigned highest_active_reg = NO_HIGHEST_ACTIVE_REG; @@ -3237,15 +3237,15 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) matched any of the pattern so far this time through the reg_num-th subexpression. These two fields get reset each time through any loop their register is in. */ - register_info_type *reg_info; + register_info_type *reg_info; /* The following record the register info as found in the above - variables when we find a match better than any we've seen before. + variables when we find a match better than any we've seen before. This happens as we backtrack through the failure points, which in turn happens only if we have not yet matched the entire string. */ unsigned best_regs_set = false; const char **best_regstart, **best_regend; - + /* Logically, this is `best_regend[0]'. But we don't want to have to allocate space for that if we're not allocating space for anything else (see below). Also, we never need info about register 0 for @@ -3262,13 +3262,13 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) #ifdef DEBUG /* Counts the total number of registers pushed. */ - unsigned num_regs_pushed = 0; + unsigned num_regs_pushed = 0; #endif DEBUG_PRINT1 ("\n\nEntering re_match_2.\n"); - + INIT_FAIL_STACK (); - + /* Do not bother to initialize all the register variables if there are no groups in the pattern, as it takes a fair amount of time. If there are groups, we include space for register 0 (the whole @@ -3286,8 +3286,8 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) reg_dummy = REGEX_TALLOC (num_regs, const char *); reg_info_dummy = REGEX_TALLOC (num_regs, register_info_type); - if (!(regstart && regend && old_regstart && old_regend && reg_info - && best_regstart && best_regend && reg_dummy && reg_info_dummy)) + if (!(regstart && regend && old_regstart && old_regend && reg_info + && best_regstart && best_regend && reg_dummy && reg_info_dummy)) { FREE_VARIABLES (); return -2; @@ -3310,21 +3310,21 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) FREE_VARIABLES (); return -1; } - + /* Initialize subexpression text positions to -1 to mark ones that no start_memory/stop_memory has been seen for. Also initialize the register information struct. */ for (mcnt = 1; mcnt < num_regs; mcnt++) { - regstart[mcnt] = regend[mcnt] + regstart[mcnt] = regend[mcnt] = old_regstart[mcnt] = old_regend[mcnt] = REG_UNSET_VALUE; - + REG_MATCH_NULL_STRING_P (reg_info[mcnt]) = MATCH_NULL_UNSET_VALUE; IS_ACTIVE (reg_info[mcnt]) = 0; MATCHED_SOMETHING (reg_info[mcnt]) = 0; EVER_MATCHED_SOMETHING (reg_info[mcnt]) = 0; } - + /* We move `string1' into `string2' if the latter's empty -- but not if `string1' is null. */ if (size2 == 0 && string1 != NULL) @@ -3349,7 +3349,7 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) end_match_2 = string2 + stop - size1; } - /* `p' scans through the pattern as `d' scans through the data. + /* `p' scans through the pattern as `d' scans through the data. `dend' is the end of the input string that `d' points within. `d' is advanced into the following input string whenever necessary, but this happens before fetching; therefore, at the beginning of the @@ -3371,7 +3371,7 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) DEBUG_PRINT1 ("The string to match is: `"); DEBUG_PRINT_DOUBLE_STRING (d, string1, size1, string2, size2); DEBUG_PRINT1 ("'\n"); - + /* This loops over pattern commands. It exits by returning from the function if the match is complete, or it drops through if the match fails at this starting point in the input data. */ @@ -3382,16 +3382,16 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) if (p == pend) { /* End of pattern means we might have succeeded. */ DEBUG_PRINT1 ("end of pattern ... "); - + /* If we haven't matched the entire string, and we want the longest match, try backtracking. */ if (d != end_match_2) { DEBUG_PRINT1 ("backtracking.\n"); - + if (!FAIL_STACK_EMPTY ()) { /* More failure points to try. */ - boolean same_str_p = (FIRST_STRING_P (match_end) + boolean same_str_p = (FIRST_STRING_P (match_end) == MATCHING_IN_FIRST_STRING); /* If exceeds best match so far, save it. */ @@ -3401,20 +3401,20 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) { best_regs_set = true; match_end = d; - + DEBUG_PRINT1 ("\nSAVING match as best so far.\n"); - + for (mcnt = 1; mcnt < num_regs; mcnt++) { best_regstart[mcnt] = regstart[mcnt]; best_regend[mcnt] = regend[mcnt]; } } - goto fail; + goto fail; } /* If no failure points, don't restore garbage. */ - else if (best_regs_set) + else if (best_regs_set) { restore_best_regs: /* Restore best match. It may happen that `dend == @@ -3423,7 +3423,7 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) strings `x-' and `y-z-', if the two strings are not consecutive in memory. */ DEBUG_PRINT1 ("Restoring best registers.\n"); - + d = match_end; dend = ((d >= string1 && d <= end1) ? end_match_1 : end_match_2); @@ -3478,7 +3478,7 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) regs->end[0] = (MATCHING_IN_FIRST_STRING ? d - string1 : d - string2 + size1); } - + /* Go through the first `min (num_regs, regs->num_regs)' registers, since that is all we initialized. */ for (mcnt = 1; mcnt < MIN (num_regs, regs->num_regs); mcnt++) @@ -3491,7 +3491,7 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) regs->end[mcnt] = POINTER_TO_OFFSET (regend[mcnt]); } } - + /* If the regs structure we return has more elements than were in the pattern, set the extra elements to -1. If we (re)allocated the registers, this is the case, @@ -3507,8 +3507,8 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) nfailure_points_pushed - nfailure_points_popped); DEBUG_PRINT2 ("%u registers pushed.\n", num_regs_pushed); - mcnt = d - pos - (MATCHING_IN_FIRST_STRING - ? string1 + mcnt = d - pos - (MATCHING_IN_FIRST_STRING + ? string1 : string2 - size1); DEBUG_PRINT2 ("Returning %d from re_match_2.\n", mcnt); @@ -3598,7 +3598,7 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) p += 1 + *p; if (!not) goto fail; - + SET_REGS_MATCHED (); d++; break; @@ -3615,9 +3615,9 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) /* Find out if this group can match the empty string. */ p1 = p; /* To send to group_match_null_string_p. */ - + if (REG_MATCH_NULL_STRING_P (reg_info[*p]) == MATCH_NULL_UNSET_VALUE) - REG_MATCH_NULL_STRING_P (reg_info[*p]) + REG_MATCH_NULL_STRING_P (reg_info[*p]) = group_match_null_string_p (&p1, pend, reg_info); /* Save the position in the string where we were the last time @@ -3628,7 +3628,7 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) old_regstart[*p] = REG_MATCH_NULL_STRING_P (reg_info[*p]) ? REG_UNSET (regstart[*p]) ? d : regstart[*p] : regstart[*p]; - DEBUG_PRINT2 (" old_regstart: %d\n", + DEBUG_PRINT2 (" old_regstart: %d\n", POINTER_TO_OFFSET (old_regstart[*p])); regstart[*p] = d; @@ -3636,10 +3636,10 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) IS_ACTIVE (reg_info[*p]) = 1; MATCHED_SOMETHING (reg_info[*p]) = 0; - + /* This is the new highest active register. */ highest_active_reg = *p; - + /* If nothing was active before, this is the new lowest active register. */ if (lowest_active_reg == NO_LOWEST_ACTIVE_REG) @@ -3655,7 +3655,7 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) number, and the number of inner groups. */ case stop_memory: DEBUG_PRINT3 ("EXECUTING stop_memory %d (%d):\n", *p, p[1]); - + /* We need to save the string position the last time we were at this close-group operator in case the group is operated upon by a repetition operator, e.g., with `((a*)*(b*)*)*' @@ -3664,7 +3664,7 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) old_regend[*p] = REG_MATCH_NULL_STRING_P (reg_info[*p]) ? REG_UNSET (regend[*p]) ? d : regend[*p] : regend[*p]; - DEBUG_PRINT2 (" old_regend: %d\n", + DEBUG_PRINT2 (" old_regend: %d\n", POINTER_TO_OFFSET (old_regend[*p])); regend[*p] = d; @@ -3672,7 +3672,7 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) /* This register isn't active anymore. */ IS_ACTIVE (reg_info[*p]) = 0; - + /* If this was the only register active, nothing is active anymore. */ if (lowest_active_reg == highest_active_reg) @@ -3688,7 +3688,7 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) unsigned char r = *p - 1; while (r > 0 && !IS_ACTIVE (reg_info[r])) r--; - + /* If we end up at register zero, that means that we saved the registers as the result of an `on_failure_jump', not a `start_memory', and we jumped to past the innermost @@ -3704,7 +3704,7 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) else highest_active_reg = r; } - + /* If just failed to match something this time around with a group that's operated on by a repetition operator, try to force exit from the ``loop'', and restore the register @@ -3712,10 +3712,10 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) last match. */ if ((!MATCHED_SOMETHING (reg_info[*p]) || (re_opcode_t) p[-3] == start_memory) - && (p + 2) < pend) + && (p + 2) < pend) { boolean is_a_jump_n = false; - + p1 = p + 2; mcnt = 0; switch ((re_opcode_t) *p1++) @@ -3730,12 +3730,12 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) if (is_a_jump_n) p1 += 2; break; - + default: /* do nothing */ ; } p1 += mcnt; - + /* If the next operation is a jump backwards in the pattern to an on_failure_jump right before the start_memory corresponding to this stop_memory, exit from the loop @@ -3749,17 +3749,17 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) failed match, e.g., with `(a*)*b' against `ab' for regstart[1], and, e.g., with `((a*)*(b*)*)*' against `aba' for regend[3]. - + Also restore the registers for inner groups for, e.g., `((a*)(b*))*' against `aba' (register 3 would otherwise get trashed). */ - + if (EVER_MATCHED_SOMETHING (reg_info[*p])) { - unsigned r; - + unsigned r; + EVER_MATCHED_SOMETHING (reg_info[*p]) = 0; - + /* Restore this and inner groups' (if any) registers. */ for (r = *p; r < *p + *(p + 1); r++) { @@ -3768,7 +3768,7 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) /* xx why this test? */ if ((int) old_regend[r] >= (int) regstart[r]) regend[r] = old_regend[r]; - } + } } p1++; EXTRACT_NUMBER_AND_INCR (mcnt, p1); @@ -3777,7 +3777,7 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) goto fail; } } - + /* Move past the register number and the inner group count. */ p += 2; break; @@ -3794,16 +3794,16 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) /* Can't back reference a group which we've never matched. */ if (REG_UNSET (regstart[regno]) || REG_UNSET (regend[regno])) goto fail; - + /* Where in input to try to start matching. */ d2 = regstart[regno]; - + /* Where to stop matching; if both the place to start and the place to stop matching are in the same string, then set to the place to stop, otherwise, for now have to use the end of the first string. */ - dend2 = ((FIRST_STRING_P (regstart[regno]) + dend2 = ((FIRST_STRING_P (regstart[regno]) == FIRST_STRING_P (regend[regno])) ? regend[regno] : end_match_1); for (;;) @@ -3827,16 +3827,16 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) /* How many characters left in this segment to match. */ mcnt = dend - d; - + /* Want how many consecutive characters we can match in one shot, so, if necessary, adjust the count. */ if (mcnt > dend2 - d2) mcnt = dend2 - d2; - + /* Compare that many; failure if mismatch, else move past them. */ - if (translate - ? bcmp_translate (d, d2, mcnt, translate) + if (translate + ? bcmp_translate (d, d2, mcnt, translate) : bcmp (d, d2, mcnt)) goto fail; d += mcnt, d2 += mcnt; @@ -3850,7 +3850,7 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) `newline_anchor' is set, after newlines. */ case begline: DEBUG_PRINT1 ("EXECUTING begline.\n"); - + if (AT_STRINGS_BEG (d)) { if (!bufp->not_bol) break; @@ -3871,7 +3871,7 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) { if (!bufp->not_eol) break; } - + /* We have to ``prefetch'' the next character. */ else if ((d == end1 ? *string2 : *d) == '\n' && bufp->newline_anchor) @@ -3905,7 +3905,7 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) then the . fails against the \n. But the next thing we want to do is match the \n against the \n; if we restored the string value, we would be back at the foo. - + Because this is used only in specific cases, we don't need to check all the things that `on_failure_jump' does, to make sure the right things get saved on the stack. Hence we don't @@ -3915,7 +3915,7 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) case; that seems worse than this. */ case on_failure_keep_string_jump: DEBUG_PRINT1 ("EXECUTING on_failure_keep_string_jump"); - + EXTRACT_NUMBER_AND_INCR (mcnt, p); DEBUG_PRINT3 (" %d (to 0x%x):\n", mcnt, p + mcnt); @@ -3924,7 +3924,7 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) /* Uses of on_failure_jump: - + Each alternative starts with an on_failure_jump that points to the beginning of the next alternative. Each alternative except the last ends with a jump that in effect jumps past @@ -3990,7 +3990,7 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) would have to backtrack because of (as in, e.g., `a*a') then we can change to pop_failure_jump, because we'll never have to backtrack. - + This is not true in the case of alternatives: in `(a|ab)*' we do need to backtrack to the `ab' alternative (e.g., if the string was `ab'). But instead of trying to @@ -4022,7 +4022,7 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) p1 = p + mcnt; /* p1[0] ... p1[2] are the `on_failure_jump' corresponding - to the `maybe_finalize_jump' of this case. Examine what + to the `maybe_finalize_jump' of this case. Examine what follows. */ if ((re_opcode_t) p1[3] == exactn && p1[5] != c) { @@ -4030,12 +4030,12 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) DEBUG_PRINT3 (" %c != %c => pop_failure_jump.\n", c, p1[5]); } - + else if ((re_opcode_t) p1[3] == charset || (re_opcode_t) p1[3] == charset_not) { int not = (re_opcode_t) p1[3] == charset_not; - + if (c < (unsigned char) (p1[4] * BYTEWIDTH) && p1[5 + c / BYTEWIDTH] & (1 << (c % BYTEWIDTH))) not = !not; @@ -4084,7 +4084,7 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) } /* Note fall through. */ - + /* Unconditionally jump (without popping any failure points). */ case jump: unconditional_jump: @@ -4094,7 +4094,7 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) DEBUG_PRINT2 ("(to 0x%x).\n", p); break; - + /* We need this opcode so we can detect where alternatives end in `group_match_null_string_p' et al. */ case jump_past_alt: @@ -4129,7 +4129,7 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) /* Have to succeed matching what follows at least n times. After that, handle like `on_failure_jump'. */ - case succeed_n: + case succeed_n: EXTRACT_NUMBER (mcnt, p + 2); DEBUG_PRINT2 ("EXECUTING succeed_n %d.\n", mcnt); @@ -4150,8 +4150,8 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) goto on_failure; } break; - - case jump_n: + + case jump_n: EXTRACT_NUMBER (mcnt, p + 2); DEBUG_PRINT2 ("EXECUTING jump_n %d.\n", mcnt); @@ -4160,13 +4160,13 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) { mcnt--; STORE_NUMBER (p + 2, mcnt); - goto unconditional_jump; + goto unconditional_jump; } /* If don't have to jump any more, skip over the rest of command. */ - else - p += 4; + else + p += 4; break; - + case set_number_at: { DEBUG_PRINT1 ("EXECUTING set_number_at.\n"); @@ -4211,13 +4211,13 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) if (PTR_CHAR_POS ((unsigned char *) d) >= point) goto fail; break; - + case at_dot: DEBUG_PRINT1 ("EXECUTING at_dot.\n"); if (PTR_CHAR_POS ((unsigned char *) d) != point) goto fail; break; - + case after_dot: DEBUG_PRINT1 ("EXECUTING after_dot.\n"); if (PTR_CHAR_POS ((unsigned char *) d) <= point) @@ -4270,7 +4270,7 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) SET_REGS_MATCHED (); d++; break; - + case notwordchar: DEBUG_PRINT1 ("EXECUTING non-Emacs notwordchar.\n"); PREFETCH (); @@ -4280,7 +4280,7 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) d++; break; #endif /* not emacs */ - + default: abort (); } @@ -4305,7 +4305,7 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) if (p < pend) { boolean is_a_jump_n = false; - + /* If failed to a backwards jump that's part of a repetition loop, need to pop this failure point and use the next one. */ switch ((re_opcode_t) *p) @@ -4317,7 +4317,7 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) case jump: p1 = p + 1; EXTRACT_NUMBER_AND_INCR (mcnt, p1); - p1 += mcnt; + p1 += mcnt; if ((is_a_jump_n && (re_opcode_t) *p1 == succeed_n) || (!is_a_jump_n @@ -4348,10 +4348,10 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) /* We are passed P pointing to a register number after a start_memory. - + Return true if the pattern up to the corresponding stop_memory can match the empty string, and false otherwise. - + If we find the matching stop_memory, sets P to point to one past its number. Otherwise, sets P to an undefined byte less than or equal to END. @@ -4365,20 +4365,20 @@ group_match_null_string_p (p, end, reg_info) int mcnt; /* Point to after the args to the start_memory. */ unsigned char *p1 = *p + 2; - + while (p1 < end) { /* Skip over opcodes that can match nothing, and return true or false, as appropriate, when we get to one that can't, or to the matching stop_memory. */ - + switch ((re_opcode_t) *p1) { /* Could be either a loop or a series of alternatives. */ case on_failure_jump: p1++; EXTRACT_NUMBER_AND_INCR (mcnt, p1); - + /* If the next operation is not a jump backwards in the pattern. */ @@ -4392,7 +4392,7 @@ group_match_null_string_p (p, end, reg_info) /on_failure_jump/0/6/exactn/1/a/jump_past_alt/0/6 /on_failure_jump/0/6/exactn/1/b/jump_past_alt/0/3 - /exactn/1/c + /exactn/1/c So, we have to first go through the first (n-1) alternatives and then deal with the last one separately. */ @@ -4408,19 +4408,19 @@ group_match_null_string_p (p, end, reg_info) is, including the ending `jump_past_alt' and its number. */ - if (!alt_match_null_string_p (p1, p1 + mcnt - 3, + if (!alt_match_null_string_p (p1, p1 + mcnt - 3, reg_info)) return false; /* Move to right after this alternative, including the jump_past_alt. */ - p1 += mcnt; + p1 += mcnt; /* Break if it's the beginning of an n-th alternative that doesn't begin with an on_failure_jump. */ if ((re_opcode_t) *p1 != on_failure_jump) break; - + /* Still have to check that it's not an n-th alternative that starts with an on_failure_jump. */ p1++; @@ -4445,14 +4445,14 @@ group_match_null_string_p (p, end, reg_info) } /* if mcnt > 0 */ break; - + case stop_memory: assert (p1[1] == **p); *p = p1 + 2; return true; - - default: + + default: if (!common_op_match_null_string_p (&p1, end, reg_info)) return false; } @@ -4465,7 +4465,7 @@ group_match_null_string_p (p, end, reg_info) /* Similar to group_match_null_string_p, but doesn't deal with alternatives: It expects P to be the first byte of a single alternative and END one byte past the last. The alternative can contain groups. */ - + static boolean alt_match_null_string_p (p, end, reg_info) unsigned char *p, *end; @@ -4473,12 +4473,12 @@ alt_match_null_string_p (p, end, reg_info) { int mcnt; unsigned char *p1 = p; - + while (p1 < end) { - /* Skip over opcodes that can match nothing, and break when we get + /* Skip over opcodes that can match nothing, and break when we get to one that can't. */ - + switch ((re_opcode_t) *p1) { /* It's a loop. */ @@ -4487,8 +4487,8 @@ alt_match_null_string_p (p, end, reg_info) EXTRACT_NUMBER_AND_INCR (mcnt, p1); p1 += mcnt; break; - - default: + + default: if (!common_op_match_null_string_p (&p1, end, reg_info)) return false; } @@ -4499,8 +4499,8 @@ alt_match_null_string_p (p, end, reg_info) /* Deals with the ops common to group_match_null_string_p and - alt_match_null_string_p. - + alt_match_null_string_p. + Sets P to one after the op and its arguments, if any. */ static boolean @@ -4535,7 +4535,7 @@ common_op_match_null_string_p (p, end, reg_info) reg_no = *p1; assert (reg_no > 0 && reg_no <= MAX_REGNUM); ret = group_match_null_string_p (&p1, end, reg_info); - + /* Have to set this here in case we're checking a group which contains a group and a back reference to it. */ @@ -4545,7 +4545,7 @@ common_op_match_null_string_p (p, end, reg_info) if (!ret) return false; break; - + /* If this is an optimized succeed_n for zero times, make the jump. */ case jump: EXTRACT_NUMBER_AND_INCR (mcnt, p1); @@ -4557,7 +4557,7 @@ common_op_match_null_string_p (p, end, reg_info) case succeed_n: /* Get to the number of times to succeed. */ - p1 += 2; + p1 += 2; EXTRACT_NUMBER_AND_INCR (mcnt, p1); if (mcnt == 0) @@ -4570,7 +4570,7 @@ common_op_match_null_string_p (p, end, reg_info) return false; break; - case duplicate: + case duplicate: if (!REG_MATCH_NULL_STRING_P (reg_info[*p1])) return false; break; @@ -4590,7 +4590,7 @@ common_op_match_null_string_p (p, end, reg_info) /* Return zero if TRANSLATE[S1] and TRANSLATE[S2] are identical for LEN bytes; nonzero otherwise. */ - + static int bcmp_translate (s1, s2, len, translate) unsigned char *s1, *s2; @@ -4611,10 +4611,10 @@ bcmp_translate (s1, s2, len, translate) /* re_compile_pattern is the GNU regular expression compiler: it compiles PATTERN (of length SIZE) and puts the result in BUFP. Returns 0 if the pattern was valid, otherwise an error string. - + Assumes the `allocated' (and perhaps `buffer') and `translate' fields are set in BUFP on entry. - + We call regex_compile to do the actual compilation. */ const char * @@ -4624,23 +4624,23 @@ re_compile_pattern (pattern, length, bufp) struct re_pattern_buffer *bufp; { reg_errcode_t ret; - + /* GNU code is written to assume at least RE_NREGS registers will be set (and at least one extra will be -1). */ bufp->regs_allocated = REGS_UNALLOCATED; - + /* And GNU code determines whether or not to get register information by passing null for the REGS argument to re_match, etc., not by setting no_sub. */ bufp->no_sub = 0; - + /* Match anchors at newline. */ bufp->newline_anchor = 1; - + ret = regex_compile (pattern, length, re_syntax_options, bufp); return re_error_msg[(int) ret]; -} +} /* Entry points compatible with 4.2 BSD regex library. We don't define them if this is an Emacs or POSIX compilation. */ @@ -4655,7 +4655,7 @@ re_comp (s) const char *s; { reg_errcode_t ret; - + if (!s) { if (!re_comp_buf.buffer) @@ -4682,7 +4682,7 @@ re_comp (s) re_comp_buf.newline_anchor = 1; ret = regex_compile (s, strlen (s), re_syntax_options, &re_comp_buf); - + /* Yes, we're discarding `const' here. */ return (char *) re_error_msg[(int) ret]; } @@ -4739,7 +4739,7 @@ re_exec (s) int regcomp (preg, pattern, cflags) regex_t *preg; - const char *pattern; + const char *pattern; int cflags; { reg_errcode_t ret; @@ -4750,17 +4750,17 @@ regcomp (preg, pattern, cflags) /* regex_compile will allocate the space for the compiled pattern. */ preg->buffer = 0; preg->allocated = 0; - + /* Don't bother to use a fastmap when searching. This simplifies the REG_NEWLINE case: if we used a fastmap, we'd have to put all the characters after newlines into the fastmap. This way, we just try every character. */ preg->fastmap = 0; - + if (cflags & REG_ICASE) { unsigned i; - + preg->translate = (char *) malloc (CHAR_SET_SIZE); if (preg->translate == NULL) return (int) REG_ESPACE; @@ -4785,38 +4785,38 @@ regcomp (preg, pattern, cflags) preg->no_sub = !!(cflags & REG_NOSUB); - /* POSIX says a null character in the pattern terminates it, so we + /* POSIX says a null character in the pattern terminates it, so we can use strlen here in compiling the pattern. */ ret = regex_compile (pattern, strlen (pattern), syntax, preg); - + /* POSIX doesn't distinguish between an unmatched open-group and an unmatched close-group: both are REG_EPAREN. */ if (ret == REG_ERPAREN) ret = REG_EPAREN; - + return (int) ret; } /* regexec searches for a given pattern, specified by PREG, in the string STRING. - + If NMATCH is zero or REG_NOSUB was set in the cflags argument to `regcomp', we ignore PMATCH. Otherwise, we assume PMATCH has at least NMATCH elements, and we set them to the offsets of the corresponding matched substrings. - + EFLAGS specifies `execution flags' which affect matching: if REG_NOTBOL is set, then ^ does not match at the beginning of the string; if REG_NOTEOL is set, then $ does not match at the end. - + We return 0 if we find a match and REG_NOMATCH if not. */ int regexec (preg, string, nmatch, pmatch, eflags) const regex_t *preg; - const char *string; - size_t nmatch; - regmatch_t pmatch[]; + const char *string; + size_t nmatch; + regmatch_t pmatch[]; int eflags; { int ret; @@ -4826,15 +4826,15 @@ regexec (preg, string, nmatch, pmatch, eflags) boolean want_reg_info = !preg->no_sub && nmatch > 0; private_preg = *preg; - + private_preg.not_bol = !!(eflags & REG_NOTBOL); private_preg.not_eol = !!(eflags & REG_NOTEOL); - + /* The user has told us exactly how many registers to return information about, via `nmatch'. We have to pass that on to the matching routines. */ private_preg.regs_allocated = REGS_FIXED; - + if (want_reg_info) { regs.num_regs = nmatch; @@ -4848,7 +4848,7 @@ regexec (preg, string, nmatch, pmatch, eflags) ret = re_search (&private_preg, string, len, /* start: */ 0, /* range: */ len, want_reg_info ? ®s : (struct re_registers *) 0); - + /* Copy the register information to the POSIX structure. */ if (want_reg_info) { @@ -4888,7 +4888,7 @@ regerror (err_code, preg, errbuf, errbuf_size) if (err_code < 0 || err_code >= (sizeof (re_error_msg) / sizeof (re_error_msg[0]))) - /* Only error codes returned by the rest of the code should be passed + /* Only error codes returned by the rest of the code should be passed to this routine. If we are given anything else, or if other regex code generates an invalid error code, then the program has a bug. Dump core so we can fix it. */ @@ -4902,7 +4902,7 @@ regerror (err_code, preg, errbuf, errbuf_size) msg = "Success"; msg_size = strlen (msg) + 1; /* Includes the null. */ - + if (errbuf_size != 0) { if (msg_size > errbuf_size) @@ -4927,7 +4927,7 @@ regfree (preg) if (preg->buffer != NULL) free (preg->buffer); preg->buffer = NULL; - + preg->allocated = 0; preg->used = 0; diff --git a/engine/regex/regex.h b/engine/regex/regex.h index 82237b23..aaeee665 100644 --- a/engine/regex/regex.h +++ b/engine/regex/regex.h @@ -46,7 +46,7 @@ typedef unsigned reg_syntax_t; #define RE_BACKSLASH_ESCAPE_IN_LISTS (1) /* If this bit is not set, then + and ? are operators, and \+ and \? are - literals. + literals. If set, then \+ and \? are operators and + and ? are literals. */ #define RE_BK_PLUS_QM (RE_BACKSLASH_ESCAPE_IN_LISTS << 1) @@ -62,7 +62,7 @@ typedef unsigned reg_syntax_t; ^ is an anchor if it is at the beginning of a regular expression or after an open-group or an alternation operator; $ is an anchor if it is at the end of a regular expression, or - before a close-group or an alternation operator. + before a close-group or an alternation operator. This bit could be (re)combined with RE_CONTEXT_INDEP_OPS, because POSIX draft 11.2 says that * etc. in leading positions is undefined. @@ -73,7 +73,7 @@ typedef unsigned reg_syntax_t; /* If this bit is set, then special characters are always special regardless of where they are in the pattern. If this bit is not set, then special characters are special only in - some contexts; otherwise they are ordinary. Specifically, + some contexts; otherwise they are ordinary. Specifically, * + ? and intervals are only special when not after the beginning, open-group, or alternation operator. */ #define RE_CONTEXT_INDEP_OPS (RE_CONTEXT_INDEP_ANCHORS << 1) @@ -95,7 +95,7 @@ typedef unsigned reg_syntax_t; #define RE_HAT_LISTS_NOT_NEWLINE (RE_DOT_NOT_NULL << 1) /* If this bit is set, either \{...\} or {...} defines an - interval, depending on RE_NO_BK_BRACES. + interval, depending on RE_NO_BK_BRACES. If not set, \{, \}, {, and } are literals. */ #define RE_INTERVALS (RE_HAT_LISTS_NOT_NEWLINE << 1) @@ -120,7 +120,7 @@ typedef unsigned reg_syntax_t; If not set, then \ is a back-reference. */ #define RE_NO_BK_REFS (RE_NO_BK_PARENS << 1) -/* If this bit is set, then | is an alternation operator, and \| is literal. +/* If this bit is set, then | is an alternation operator, and \| is literal. If not set, then \| is an alternation operator, and | is literal. */ #define RE_NO_BK_VBAR (RE_NO_BK_REFS << 1) @@ -142,7 +142,7 @@ extern reg_syntax_t re_syntax_options; /* Define combinations of the above bits for the standard possibilities. (The [[[ comments delimit what gets put into the Texinfo file, so - don't delete them!) */ + don't delete them!) */ /* [[[begin syntaxes]]] */ #define RE_SYNTAX_EMACS 0 @@ -209,7 +209,7 @@ extern reg_syntax_t re_syntax_options; #ifdef RE_DUP_MAX #undef RE_DUP_MAX #endif -#define RE_DUP_MAX ((1 << 15) - 1) +#define RE_DUP_MAX ((1 << 15) - 1) /* POSIX `cflags' bits (i.e., information for `regcomp'). */ @@ -221,7 +221,7 @@ extern reg_syntax_t re_syntax_options; /* If this bit is set, then ignore case when matching. If not set, then case is significant. */ #define REG_ICASE (REG_EXTENDED << 1) - + /* If this bit is set, then anchors do not match at newline characters in the string. If not set, then anchors do match at newlines. */ @@ -260,7 +260,7 @@ typedef enum REG_EESCAPE, /* Trailing backslash. */ REG_ESUBREG, /* Invalid back reference. */ REG_EBRACK, /* Unmatched left bracket. */ - REG_EPAREN, /* Parenthesis imbalance. */ + REG_EPAREN, /* Parenthesis imbalance. */ REG_EBRACE, /* Unmatched \{. */ REG_BADBR, /* Invalid contents of \{\}. */ REG_ERANGE, /* Invalid range end. */ @@ -291,7 +291,7 @@ struct re_pattern_buffer unsigned long allocated; /* Number of bytes actually used in `buffer'. */ - unsigned long used; + unsigned long used; /* Syntax setting with which the pattern was compiled. */ reg_syntax_t syntax; @@ -335,7 +335,7 @@ struct re_pattern_buffer unsigned no_sub : 1; /* If set, a beginning-of-line anchor doesn't match at the - beginning of the string. */ + beginning of the string. */ unsigned not_bol : 1; /* Similarly for an end-of-line anchor. */ @@ -447,7 +447,7 @@ extern int re_match /* Relates to `re_match' as `re_search_2' relates to `re_search'. */ -extern int re_match_2 +extern int re_match_2 _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string1, int length1, const char *string2, int length2, int start, struct re_registers *regs, int stop)); diff --git a/libs/miniwebrtc/import.sh b/libs/miniwebrtc/import.sh index 7d5bc2eb..0afbdaad 100755 --- a/libs/miniwebrtc/import.sh +++ b/libs/miniwebrtc/import.sh @@ -32,7 +32,7 @@ done )<getValue(); - m_type = val->type(); + m_type = val->type(); return *this; } @@ -1047,7 +1047,7 @@ public: static int matchEOC(DataBlock& data); /** - * Extract length until a End Of Contents is found. + * Extract length until a End Of Contents is found. * @param data Input block for which to determine the length to End Of Contents * @param length Length to which to add determined length * @return Length until End Of Contents diff --git a/libs/ygsm/codec.cpp b/libs/ygsm/codec.cpp index af1188da..595df793 100644 --- a/libs/ygsm/codec.cpp +++ b/libs/ygsm/codec.cpp @@ -376,7 +376,7 @@ static inline unsigned int getMCCMNC(const uint8_t*& in, unsigned int& len, XmlE return GSML3Codec::NoError; } -static inline unsigned int setMCCMNC(XmlElement* in, uint8_t*& out, unsigned int& len, bool advance = true, +static inline unsigned int setMCCMNC(XmlElement* in, uint8_t*& out, unsigned int& len, bool advance = true, bool findChild = true) { if (!(in && out && len >= 3)) @@ -2007,7 +2007,7 @@ static const TokenDict s_causeCCITT_dict[] = { {"unknown-group", 0x5a}, // Non-existent CUG {"invalid-transit-net", 0x5b}, // Invalid transit network selection {"invalid-message", 0x5f}, // Invalid message, unspecified - // protocol-error class + // protocol-error class {"missing-mandatory-ie", 0x60}, // Mandatory information element is missing {"unknown-message", 0x61}, // Message type non-existent or not implemented {"wrong-message", 0x62}, // Message not compatible with call state, non-existent or not implemented @@ -3827,7 +3827,7 @@ static unsigned int decodeSecHeader(const GSML3Codec* codec, uint8_t proto, con } default: if (secVal >= GSML3Codec::ServiceRequestHeader) { - //TODO + //TODO DDebug(codec->dbg(),DebugStub,"decodeSecHeader() for ServiceRequestHeader not implemented [%p]",codec->ptr()); } break; @@ -3887,7 +3887,7 @@ static unsigned int encodeSecHeader(const GSML3Codec* codec, uint8_t proto, con } default: if (secVal >= GSML3Codec::ServiceRequestHeader) { - //TODO + //TODO DDebug(codec->dbg(),DebugStub,"encodeSecHeader() for ServiceRequestHeader not implemented [%p]",codec->ptr()); } break; @@ -4140,7 +4140,7 @@ static unsigned int encodeHexParam(const GSML3Codec* codec, uint8_t proto, XmlEl return CONDITIONAL_ERROR(param,NoError,MissingMandatoryIE); if (param->length == 4) { uint8_t val = d[0]; - if (!param->lowerBits) + if (!param->lowerBits) val = val >> 4; setUINT8(val,out,param); d.clear(); @@ -4551,7 +4551,7 @@ static unsigned int encodeTV(const GSML3Codec* codec, uint8_t proto, XmlElement* return CONDITIONAL_ERROR(param,NoError,MissingMandatoryIE); if (!(param->name && param->length <= 8)) return encodeHexParam(codec,proto,xml,out,param); - + const TokenDict* dict = static_cast(param->ieType.data); uint8_t val = param->iei; if (!dict) @@ -4661,7 +4661,7 @@ static unsigned int encodeTLV_TLVE(const GSML3Codec* codec, uint8_t proto, XmlEl return GSML3Codec::NoError; } -static unsigned int decodeParams(const GSML3Codec* codec, uint8_t proto, const uint8_t*& in, unsigned int& len, XmlElement*& out, +static unsigned int decodeParams(const GSML3Codec* codec, uint8_t proto, const uint8_t*& in, unsigned int& len, XmlElement*& out, const IEParam* param, const NamedList& params) { if (!(codec && in && len && param)) diff --git a/libs/ygsm/yategsm.h b/libs/ygsm/yategsm.h index e5bb7c8a..010423a9 100644 --- a/libs/ygsm/yategsm.h +++ b/libs/ygsm/yategsm.h @@ -1,10 +1,10 @@ -/* +/** * yategsm.h * GSM Radio Layer 3 library * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2011-2013 Null Team + * Copyright (C) 2011-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -82,7 +82,7 @@ public: GTTP = 0x04, // GPRS Transparent Transport Protocol (GTTP) MM = 0x05, // Mobility Management RRM = 0x06, // Radio Resources Management - EPS_MM = 0x07, // EPS Mobility Management + EPS_MM = 0x07, // EPS Mobility Management GPRS_MM = 0x08, // GPRS Mobility Management SMS = 0x09, // SMS GPRS_SM = 0x0a, // GPRS Session Management @@ -132,7 +132,7 @@ public: * Constructor */ GSML3Codec(DebugEnabler* dbg = 0); - + /** * Decode layer 3 message payload * @param in Input buffer containing the data to be decoded @@ -144,7 +144,7 @@ public: unsigned int decode(const uint8_t* in, unsigned int len, XmlElement*& out, const NamedList& params = NamedList::empty()); /** - * Encode a layer 3 message + * Encode a layer 3 message * @param in Layer 3 message in XML form * @param out Output buffer into which to put encoded data * @param params Encoder parameters @@ -161,7 +161,7 @@ public: unsigned int decode(XmlElement* xml, const NamedList& params = NamedList::empty()); /** - * Encode a layer 3 message from an existing XML + * Encode a layer 3 message from an existing XML * @param in XML which contains a layer 3 message in XML form. The message will be replaced with its encoded buffer * @param params Encoder parameters * @return Parsing result: 0 (NoError) if succeeded, error status otherwise @@ -188,7 +188,7 @@ public: * @param reset Reset flags before setting these ones */ inline void setFlags(uint8_t flgs, bool reset = false) - { + { if (reset) resetFlags(); m_flags |= flgs; diff --git a/libs/yiax/engine.cpp b/libs/yiax/engine.cpp index f62e80d8..de825d17 100644 --- a/libs/yiax/engine.cpp +++ b/libs/yiax/engine.cpp @@ -4,7 +4,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * Author: Marian Podgoreanu * * This software is distributed under multiple licenses; diff --git a/libs/yiax/frame.cpp b/libs/yiax/frame.cpp index 79838438..cb5ea42e 100644 --- a/libs/yiax/frame.cpp +++ b/libs/yiax/frame.cpp @@ -4,7 +4,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * Author: Marian Podgoreanu * * This software is distributed under multiple licenses; @@ -1102,7 +1102,7 @@ IAXFrame* IAXFrame::parse(const unsigned char* buf, unsigned int len, IAXEngine* continue; tr->processMiniNoTs(ts,t->m_blocks,now); TelEngine::destruct(tr); - + } } return 0; diff --git a/libs/yiax/transaction.cpp b/libs/yiax/transaction.cpp index be972936..5e130fa7 100644 --- a/libs/yiax/transaction.cpp +++ b/libs/yiax/transaction.cpp @@ -4,7 +4,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * Author: Marian Podgoreanu * * This software is distributed under multiple licenses; @@ -73,7 +73,7 @@ void IAXMediaData::print(String& buf) } -IAXTransaction::IAXTransaction(IAXEngine* engine, IAXFullFrame* frame, u_int16_t lcallno, +IAXTransaction::IAXTransaction(IAXEngine* engine, IAXFullFrame* frame, u_int16_t lcallno, const SocketAddr& addr, void* data) : Mutex(true,"IAXTransaction"), m_localInitTrans(false), @@ -261,7 +261,7 @@ IAXTransaction::~IAXTransaction() localCallNo(),remoteCallNo(),this); } -IAXTransaction* IAXTransaction::factoryIn(IAXEngine* engine, IAXFullFrame* frame, u_int16_t lcallno, +IAXTransaction* IAXTransaction::factoryIn(IAXEngine* engine, IAXFullFrame* frame, u_int16_t lcallno, const SocketAddr& addr, void* data) { IAXTransaction* tr = new IAXTransaction(engine,frame,lcallno,addr,data); @@ -334,7 +334,7 @@ IAXTransaction* IAXTransaction::processFrame(IAXFrame* frame) // Frame is VNAK ? if (frame->type() == IAXFrame::IAX && full->subclass() == IAXControl::VNAK) return retransmitOnVNAK(full->iSeqNo()); - bool fAck = frame->type() == IAXFrame::IAX && + bool fAck = frame->type() == IAXFrame::IAX && (full->subclass() == IAXControl::Ack || full->subclass() == IAXControl::Inval); if (!fAck && !isFrameAcceptable(full)) return 0; @@ -1281,7 +1281,7 @@ bool IAXTransaction::isFrameAcceptable(const IAXFullFrame* frame) "Transaction(%u,%u). Received late Frame(%u,%u) with oseq=%u expecting %u [%p]", localCallNo(),remoteCallNo(),frame->type(),frame->subclass(),frame->oSeqNo(), m_iSeqNo,this); - sendAck(frame); + sendAck(frame); return false; } @@ -1463,7 +1463,7 @@ IAXEvent* IAXTransaction::getEventResponse(IAXFrameOut* frame, bool& delFrame) return 0; } // Frame only need ACK. Didn't found it. Return - if (frame->ackOnly()) + if (frame->ackOnly()) return 0; delFrame = true; switch (type()) { @@ -1499,7 +1499,7 @@ IAXEvent* IAXTransaction::getEventResponse_New(IAXFrameOut* frame, bool& delFram // Frame is NEW: AUTHREQ, ACCEPT, REJECT, HANGUP ? if (0 != (ev = createResponse(frame,IAXFrame::IAX,IAXControl::AuthReq,IAXEvent::AuthReq,false,NewLocalInvite_AuthRecv))) return processAuthReq(ev); - if (0 != (ev = createResponse(frame,IAXFrame::IAX,IAXControl::Accept,IAXEvent::Accept,false,Connected))) + if (0 != (ev = createResponse(frame,IAXFrame::IAX,IAXControl::Accept,IAXEvent::Accept,false,Connected))) return processAccept(ev); if (0 != (ev = createResponse(frame,IAXFrame::IAX,IAXControl::Reject,IAXEvent::Reject,false,Terminating))) return ev; diff --git a/libs/yiax/yateiax.h b/libs/yiax/yateiax.h index 01512ec2..8eaa2cbc 100644 --- a/libs/yiax/yateiax.h +++ b/libs/yiax/yateiax.h @@ -4,7 +4,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/libs/yjabber/jbengine.cpp b/libs/yjabber/jbengine.cpp index da25212e..16a8a09e 100644 --- a/libs/yjabber/jbengine.cpp +++ b/libs/yjabber/jbengine.cpp @@ -4,7 +4,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/libs/yjabber/jbstream.cpp b/libs/yjabber/jbstream.cpp index 1b618731..9c0db2dc 100644 --- a/libs/yjabber/jbstream.cpp +++ b/libs/yjabber/jbstream.cpp @@ -4,7 +4,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -507,7 +507,7 @@ bool JBStream::readSocket(char* buf, unsigned int len) else if (read) { String tmp; Thread::errorString(tmp,m_socket->error()); - reason << "Socket read error: " << tmp << " (" << m_socket->error() << ")"; + reason << "Socket read error: " << tmp << " (" << m_socket->error() << ")"; Debug(this,DebugWarn,"%s [%p]",reason.c_str(),this); } else { @@ -1939,7 +1939,7 @@ bool JBStream::writeSocket(const void* data, unsigned int& len) String tmp; Thread::errorString(tmp,m_socket->error()); String reason; - reason << "Socket send error: " << tmp << " (" << m_socket->error() << ")"; + reason << "Socket send error: " << tmp << " (" << m_socket->error() << ")"; Debug(this,DebugWarn,"%s [%p]",reason.c_str(),this); lck.drop(); postponeTerminate(0,m_incoming,XMPPError::SocketError,reason); diff --git a/libs/yjabber/jgengine.cpp b/libs/yjabber/jgengine.cpp index fb52dbe7..dc97acba 100644 --- a/libs/yjabber/jgengine.cpp +++ b/libs/yjabber/jgengine.cpp @@ -4,7 +4,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -266,7 +266,7 @@ bool JGEngine::acceptIq(XMPPUtils::IqType type, const JabberID& from, const Jabb // Default event processor void JGEngine::defProcessEvent(JGEvent* event) { - if (!event) + if (!event) return; DDebug(this,DebugAll,"JGEngine::defprocessEvent. Deleting event (%p,%u)", event,event->type()); @@ -286,7 +286,7 @@ int JGEngine::decodeFlags(const String& list, const TokenDict* dict) if (!(list && dict)) return 0; int ret = 0; - ObjList* l = list.split(',',false); + ObjList* l = list.split(',',false); for (; dict->token; dict++) if (l->find(dict->token)) ret += dict->value; diff --git a/libs/yjabber/session.cpp b/libs/yjabber/session.cpp index f6b0d934..8ad616c6 100644 --- a/libs/yjabber/session.cpp +++ b/libs/yjabber/session.cpp @@ -4,7 +4,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -667,7 +667,7 @@ void JGRtpCandidateP2P::fromXml(XmlElement* xml, const JGRtpCandidates& containe /* * JGRtpCandidates */ -// Create a 'transport' element from this object. Add +// Create a 'transport' element from this object. Add XmlElement* JGRtpCandidates::toXml(bool addCandidates, bool addAuth) const { XMPPNamespace::Type ns; @@ -1692,7 +1692,7 @@ JGSession0::JGSession0(JGEngine* engine, const JabberID& caller, const JabberID& m_candidatesAction(ActCount) { } - + // Create an incoming session JGSession0::JGSession0(JGEngine* engine, const JabberID& caller, const JabberID& called, XmlElement* xml, const String& id) @@ -1838,7 +1838,7 @@ JGEvent* JGSession0::decodeJingle(XmlElement*& xml, XmlElement* child) unhandledAction(this,xml,act); return ev; } - + // *** ActInfo if (act == ActInfo) { // Return ActInfo event to signal ping (XEP-0166 6.8) @@ -1867,7 +1867,7 @@ JGEvent* JGSession0::decodeJingle(XmlElement*& xml, XmlElement* child) unhandledAction(this,xml,act,ch); return ev; } - + if (act == ActTransportAccept) { confirmResult(xml); TelEngine::destruct(xml); @@ -1999,7 +1999,7 @@ JGSession1::JGSession1(JGEngine* engine, const JabberID& caller, const JabberID& : JGSession(Version1,engine,caller,called) { } - + // Create an incoming session JGSession1::JGSession1(JGEngine* engine, const JabberID& caller, const JabberID& called, XmlElement* xml, const String& id) diff --git a/libs/yjabber/xmpputils.cpp b/libs/yjabber/xmpputils.cpp index cdc28eaa..7b178526 100644 --- a/libs/yjabber/xmpputils.cpp +++ b/libs/yjabber/xmpputils.cpp @@ -1,10 +1,10 @@ /** - * utils.cpp + * xmpputils.cpp * Yet Another Jabber Component Protocol Stack * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -1449,7 +1449,7 @@ int XMPPUtils::decodeFlags(const String& src, const TokenDict* dict) return mask; } -// Encode a mask of flags to a comma separated list. +// Encode a mask of flags to a comma separated list. void XMPPUtils::buildFlags(String& dest, int src, const TokenDict* dict) { if (!dict) diff --git a/libs/yjabber/xmpputils.h b/libs/yjabber/xmpputils.h index aee8e719..5b74127f 100644 --- a/libs/yjabber/xmpputils.h +++ b/libs/yjabber/xmpputils.h @@ -4,7 +4,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -321,13 +321,13 @@ public: Register, // register Starttls, // starttls Auth, // auth - Challenge, // challenge + Challenge, // challenge Abort, // abort Aborted, // aborted Response, // response Proceed, // proceed Success, // success - Failure, // failure + Failure, // failure Mechanisms, // mechanisms Mechanism, // mechanism Session, // session @@ -636,7 +636,7 @@ public: static Regexp s_regExpValid; private: - void parse(); // Parse the string. Set the data + void parse(); // Parse the string. Set the data void normalize(); // Lowercase node and domain. Set bare jid and jid String m_node; // The node part diff --git a/libs/yjabber/yatejabber.h b/libs/yjabber/yatejabber.h index 4eaa0bd5..b1007fb4 100644 --- a/libs/yjabber/yatejabber.h +++ b/libs/yjabber/yatejabber.h @@ -4,7 +4,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -1015,7 +1015,7 @@ protected: /** * Build a ping iq stanza - * @param stanzaId Stanza id + * @param stanzaId Stanza id * @return 0 */ virtual XmlElement* buildPing(const String& stanzaId); @@ -1447,7 +1447,7 @@ public: /** * Build a ping iq stanza - * @param stanzaId Stanza id + * @param stanzaId Stanza id * @return Valid XmlElement pointer */ virtual XmlElement* buildPing(const String& stanzaId); @@ -2648,7 +2648,7 @@ protected: /** * This class holds a list of stream sets. - * The purpose is to create a list of threads + * The purpose is to create a list of threads * @short A list of stream sets */ class YJABBER_API JBStreamSetList : public RefObject, public Mutex diff --git a/libs/yjabber/yatejingle.h b/libs/yjabber/yatejingle.h index ae802d12..66df7a5e 100644 --- a/libs/yjabber/yatejingle.h +++ b/libs/yjabber/yatejingle.h @@ -4,7 +4,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -275,7 +275,7 @@ public: */ inline Media media() const { return m_media; } - + /** * Append a new data payload * @param id The 'id' attribute @@ -619,7 +619,7 @@ public: UnknownFileTransfer = -2, // Unknown (unsupported) file transfer content RtpIceUdp = 1, // Audio: RTP ICE-UDP transport RtpRawUdp, // Audio: RTP RAW-UDP transport - RtpP2P, // + RtpP2P, // RtpGoogleRawUdp, // FileBSBOffer, // File offer: byte stream (SOCKS) transport FileBSBRequest, // File request: byte stream (SOCKS) transport @@ -901,7 +901,7 @@ public: * Session state enumeration */ enum State { - Idle = 0, // Outgoing stream is waiting for + Idle = 0, // Outgoing stream is waiting for Pending = 1, // Session is pending, session-initiate sent/received Active = 2, // Session is active, session-accept sent/received Ending = 3, // Session terminated: Wait for write result @@ -1942,7 +1942,7 @@ private: // Event specific JGSession::Action m_action; // The action if type is Jingle String m_id; // The element's id attribute - String m_reason; // The reason if type is Error or Terminated + String m_reason; // The reason if type is Error or Terminated String m_text; // Dtmf text }; @@ -2002,7 +2002,7 @@ public: /** * Send a session's stanza. - * This method should be re-implemented + * This method should be re-implemented * @param session The session requesting the operation * @param stanza The stanza to send. Will be consumed and zeroed * @return True on success diff --git a/libs/ymgcp/endpoint.cpp b/libs/ymgcp/endpoint.cpp index 4a6b099b..de7ff811 100644 --- a/libs/ymgcp/endpoint.cpp +++ b/libs/ymgcp/endpoint.cpp @@ -1,10 +1,10 @@ /** * endpoint.cpp * Yet Another MGCP Stack - * This file is part of the YATE Project http://YATE.null.ro + * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/libs/ymgcp/engine.cpp b/libs/ymgcp/engine.cpp index f4005ce6..13b19792 100644 --- a/libs/ymgcp/engine.cpp +++ b/libs/ymgcp/engine.cpp @@ -1,10 +1,10 @@ /** * engine.cpp * Yet Another MGCP Stack - * This file is part of the YATE Project http://YATE.null.ro + * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/libs/ymgcp/message.cpp b/libs/ymgcp/message.cpp index b2ac85d1..9f317a5f 100644 --- a/libs/ymgcp/message.cpp +++ b/libs/ymgcp/message.cpp @@ -1,10 +1,10 @@ /** * message.cpp * Yet Another MGCP Stack - * This file is part of the YATE Project http://YATE.null.ro + * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/libs/ymgcp/transaction.cpp b/libs/ymgcp/transaction.cpp index 9ef8e4a5..41f78c86 100644 --- a/libs/ymgcp/transaction.cpp +++ b/libs/ymgcp/transaction.cpp @@ -1,10 +1,10 @@ /** * transaction.cpp * Yet Another MGCP Stack - * This file is part of the YATE Project http://YATE.null.ro + * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/libs/ymgcp/yatemgcp.h b/libs/ymgcp/yatemgcp.h index 8f88ac00..4a000f02 100644 --- a/libs/ymgcp/yatemgcp.h +++ b/libs/ymgcp/yatemgcp.h @@ -4,7 +4,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -40,7 +40,7 @@ #define YMGCP_API #endif -/** +/** * Holds all Telephony Engine related classes. */ namespace TelEngine { @@ -54,7 +54,7 @@ class MGCPEngine; /** * This class holds an MGCP message, either command or response, along with - * its parameters. The + * its parameters. The * @short An MGCP command or response */ class YMGCP_API MGCPMessage : public RefObject diff --git a/libs/ymodem/modem.cpp b/libs/ymodem/modem.cpp index d0548db8..3c4940c9 100644 --- a/libs/ymodem/modem.cpp +++ b/libs/ymodem/modem.cpp @@ -5,7 +5,7 @@ * Yet Another Modem * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -224,7 +224,7 @@ FilterConst::FilterConst(FSKModem::Type type) -2.9928879142e+00, 2.5990173742e+00, 0.0000000000e+00}; static float s[7] = {-5.6297236492e-02, -1.1421579050e-01, -4.8122536483e-01, -4.0121072432e-01, -7.4834487567e-01, -6.9170822332e-01, 0.0000000000e+00}; - static float l[7] = {-7.8390522307e-03, 8.5209627801e-02, -4.0804129163e-01, 1.1157139955e+00, + static float l[7] = {-7.8390522307e-03, 8.5209627801e-02, -4.0804129163e-01, 1.1157139955e+00, -1.8767603680e+00, 1.8916395224e+00, 0.0000000000e+00}; switch (type) { diff --git a/libs/ymodem/uart.cpp b/libs/ymodem/uart.cpp index ba3a7dea..e592e59c 100644 --- a/libs/ymodem/uart.cpp +++ b/libs/ymodem/uart.cpp @@ -5,7 +5,7 @@ * Yet Another Modem * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/libs/ymodem/yatemodem.h b/libs/ymodem/yatemodem.h index c176faaf..a765481b 100644 --- a/libs/ymodem/yatemodem.h +++ b/libs/ymodem/yatemodem.h @@ -1,11 +1,11 @@ -/* +/** * yatemodem.h * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Modem * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -41,7 +41,7 @@ #endif -/** +/** * Holds all Telephony Engine related classes. */ namespace TelEngine { @@ -382,7 +382,7 @@ protected: */ bool error(Error e); -private: +private: // Change this UART's state void changeState(State newState); diff --git a/libs/ypbx/assist.cpp b/libs/ypbx/assist.cpp index 444bb993..f54d58cb 100644 --- a/libs/ypbx/assist.cpp +++ b/libs/ypbx/assist.cpp @@ -5,7 +5,7 @@ * Common C++ base classes for PBX related plugins * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/libs/ypbx/multiroute.cpp b/libs/ypbx/multiroute.cpp index 9f519558..719dd474 100644 --- a/libs/ypbx/multiroute.cpp +++ b/libs/ypbx/multiroute.cpp @@ -5,7 +5,7 @@ * Multiple routing implementation * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/libs/ypbx/yatepbx.h b/libs/ypbx/yatepbx.h index 9003c45e..2e37cd31 100644 --- a/libs/ypbx/yatepbx.h +++ b/libs/ypbx/yatepbx.h @@ -1,11 +1,11 @@ -/* +/** * yatepbx.h * This file is part of the YATE Project http://YATE.null.ro * * Common C++ base classes for PBX related plugins * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -316,4 +316,5 @@ private: }; } + /* vi: set ts=8 sw=4 sts=4 noet: */ diff --git a/libs/yrtp/dejitter.cpp b/libs/yrtp/dejitter.cpp index 69e4200f..0c105e86 100644 --- a/libs/yrtp/dejitter.cpp +++ b/libs/yrtp/dejitter.cpp @@ -4,7 +4,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/libs/yrtp/secure.cpp b/libs/yrtp/secure.cpp index 0c072761..62ed60bc 100644 --- a/libs/yrtp/secure.cpp +++ b/libs/yrtp/secure.cpp @@ -4,7 +4,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/libs/yrtp/session.cpp b/libs/yrtp/session.cpp index 0120919f..d2b8cf49 100644 --- a/libs/yrtp/session.cpp +++ b/libs/yrtp/session.cpp @@ -4,7 +4,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -987,7 +987,7 @@ void RTPSession::sendRtcpBye() static_cast(m_transport)->rtcpData(buf,8); } -void RTPSession::incWrongSrc() +void RTPSession::incWrongSrc() { XDebug(DebugAll,"RTPSession::incWrongSrc() [%p]",this); m_wrongSrc++; diff --git a/libs/yrtp/transport.cpp b/libs/yrtp/transport.cpp index 98f16c6f..155995de 100644 --- a/libs/yrtp/transport.cpp +++ b/libs/yrtp/transport.cpp @@ -4,7 +4,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -138,7 +138,7 @@ void RTPGroup::setMinSleep(int msec) RTPProcessor::RTPProcessor() - : m_wrongSrc(0), m_group(0) + : m_wrongSrc(0), m_group(0) { DDebug(DebugAll,"RTPProcessor::RTPProcessor() [%p]",this); } diff --git a/libs/yrtp/yatertp.h b/libs/yrtp/yatertp.h index 2b84920e..001f0145 100644 --- a/libs/yrtp/yatertp.h +++ b/libs/yrtp/yatertp.h @@ -1,10 +1,10 @@ -/* +/** * yatertp.h * Yet Another RTP Stack * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -1286,7 +1286,7 @@ public: void setReports(int interval); /** - * Put the collected statistical data + * Put the collected statistical data * @param stats NamedList to populate with the data */ virtual void getStats(NamedList& stats) const; diff --git a/libs/yscript/evaluator.cpp b/libs/yscript/evaluator.cpp index baeddc4e..aa32c555 100644 --- a/libs/yscript/evaluator.cpp +++ b/libs/yscript/evaluator.cpp @@ -1,9 +1,10 @@ /** - * Evaluator.cpp + * evaluator.cpp + * Yet Another (Java)script library * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -1463,7 +1464,7 @@ void ExpEvaluator::dump(const ExpOperation& oper, String& res) const const char* name = getOperator(oper.opcode()); if (name) res << name; - else + else res << "[" << oper.opcode() << "]"; } if (oper.number() && oper.isInteger()) diff --git a/libs/yscript/javascript.cpp b/libs/yscript/javascript.cpp index 8d5e3475..fb5d7165 100644 --- a/libs/yscript/javascript.cpp +++ b/libs/yscript/javascript.cpp @@ -4,7 +4,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2011-2013 Null Team + * Copyright (C) 2011-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -784,7 +784,7 @@ bool JsContext::runStringFunction(GenObject* obj, const String& name, ObjList& s pos = tmp->toInteger(0); \ } \ } \ - String s(*str); + String s(*str); if (name == YSTRING("startsWith")) { MAKE_WITH_METHOD; @@ -798,7 +798,7 @@ bool JsContext::runStringFunction(GenObject* obj, const String& name, ObjList& s if (pos > 0) s = s.substr(0,pos); ExpEvaluator::pushOne(stack,new ExpOperation(s.endsWith(what))); - return true; + return true; } #undef MAKE_WITH_METHOD #define SPLIT_EMPTY() do { \ diff --git a/libs/yscript/jsobjects.cpp b/libs/yscript/jsobjects.cpp index 50d4fb1e..714d6f1b 100644 --- a/libs/yscript/jsobjects.cpp +++ b/libs/yscript/jsobjects.cpp @@ -4,7 +4,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2011-2013 Null Team + * Copyright (C) 2011-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -583,15 +583,15 @@ bool JsArray::runNative(ObjList& stack, const ExpOperation& oper, GenObject* con } else if (oper.name() == YSTRING("concat")) { // Returns a new array comprised of this array joined with other array(s) and/or value(s). - // var num1 = [1, 2, 3]; - // var num2 = [4, 5, 6]; - // var num3 = [7, 8, 9]; + // var num1 = [1, 2, 3]; + // var num2 = [4, 5, 6]; + // var num3 = [7, 8, 9]; // - // creates array [1, 2, 3, 4, 5, 6, 7, 8, 9]; num1, num2, num3 are unchanged - // var nums = num1.concat(num2, num3); + // creates array [1, 2, 3, 4, 5, 6, 7, 8, 9]; num1, num2, num3 are unchanged + // var nums = num1.concat(num2, num3); - // var alpha = ['a', 'b', 'c']; - // creates array ["a", "b", "c", 1, 2, 3], leaving alpha unchanged + // var alpha = ['a', 'b', 'c']; + // creates array ["a", "b", "c", 1, 2, 3], leaving alpha unchanged // var alphaNumeric = alpha.concat(1, [2, 3]); if (!oper.number()) return false; @@ -771,14 +771,14 @@ bool JsArray::runNative(ObjList& stack, const ExpOperation& oper, GenObject* con bool JsArray::runNativeSlice(ObjList& stack, const ExpOperation& oper, GenObject* context) { // Extracts a section of an array and returns a new array. - // var myHonda = { color: "red", wheels: 4, engine: { cylinders: 4, size: 2.2 } }; - // var myCar = [myHonda, 2, "cherry condition", "purchased 1997"]; - // var newCar = myCar.slice(0, 2); + // var myHonda = { color: "red", wheels: 4, engine: { cylinders: 4, size: 2.2 } }; + // var myCar = [myHonda, 2, "cherry condition", "purchased 1997"]; + // var newCar = myCar.slice(0, 2); if (!oper.number()) return false; // begin | end > 0 offset from the start of the array // < 0 offset from the end of the array - // end missing -> go to end of array + // end missing -> go to end of array int begin = length(), end = length(); for (int i = (int)oper.number(); i; i--) { ExpOperation* op = popValue(stack,context); @@ -804,7 +804,7 @@ bool JsArray::runNativeSlice(ObjList& stack, const ExpOperation& oper, GenObject bool JsArray::runNativeSplice(ObjList& stack, const ExpOperation& oper, GenObject* context) { - // Changes the content of an array, adding new elements while removing old elements. + // Changes the content of an array, adding new elements while removing old elements. // Returns an array containing the removed elements // array.splice(index , howMany[, element1[, ...[, elementN]]]) // array.splice(index ,[ howMany[, element1[, ...[, elementN]]]]) @@ -848,7 +848,7 @@ bool JsArray::runNativeSplice(ObjList& stack, const ExpOperation& oper, GenObjec for (int i = shiftIdx; i < length(); i++) params().setParam(String(i + shiftWith),params().getValue(String(i))); } - // insert the new ones + // insert the new ones for (int i = begin;(arguments.count() > 2) && (i < length()); i++) { GenObject* obj = arguments[2 + i - begin]; params().setParam(new NamedPointer(String(i),obj)); diff --git a/libs/yscript/script.cpp b/libs/yscript/script.cpp index 09a255a3..253dc257 100644 --- a/libs/yscript/script.cpp +++ b/libs/yscript/script.cpp @@ -4,7 +4,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2011-2013 Null Team + * Copyright (C) 2011-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/libs/yscript/yatescript.h b/libs/yscript/yatescript.h index bf085162..2de6a5b2 100644 --- a/libs/yscript/yatescript.h +++ b/libs/yscript/yatescript.h @@ -1,10 +1,10 @@ -/* +/** * yatescript.h * Yet Another (Java)script library * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2011-2013 Null Team + * Copyright (C) 2011-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/libs/ysdp/media.cpp b/libs/ysdp/media.cpp index a5df1635..149a5494 100644 --- a/libs/ysdp/media.cpp +++ b/libs/ysdp/media.cpp @@ -5,7 +5,7 @@ * SDP media handling * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/libs/ysdp/parser.cpp b/libs/ysdp/parser.cpp index 70741956..ab696d4f 100644 --- a/libs/ysdp/parser.cpp +++ b/libs/ysdp/parser.cpp @@ -5,7 +5,7 @@ * SDP media handling * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/libs/ysdp/session.cpp b/libs/ysdp/session.cpp index d2d15970..bb3cee9d 100644 --- a/libs/ysdp/session.cpp +++ b/libs/ysdp/session.cpp @@ -5,7 +5,7 @@ * SDP media handling * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -918,7 +918,7 @@ void SDPSession::dispatchingRtp(Message*& msg, SDPMedia* media) XDebug(m_enabler,DebugAll,"SDPSession::dispatchingRtp(%p,%p) [%p]",msg,media,m_ptr); } -// Set data used in debug +// Set data used in debug void SDPSession::setSdpDebug(DebugEnabler* enabler, void* ptr) { m_enabler = enabler ? enabler : static_cast(m_parser); diff --git a/libs/ysdp/yatesdp.h b/libs/ysdp/yatesdp.h index ba987a88..0b19a19e 100644 --- a/libs/ysdp/yatesdp.h +++ b/libs/ysdp/yatesdp.h @@ -1,11 +1,11 @@ -/* +/** * yatesdp.h * This file is part of the YATE Project http://YATE.null.ro * * SDP media handling * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -45,7 +45,7 @@ #define YSDP_API #endif -/** +/** * Holds all Telephony Engine related classes. */ namespace TelEngine { @@ -616,7 +616,7 @@ protected: virtual void dispatchingRtp(Message*& msg, SDPMedia* media); /** - * Set data used in debug + * Set data used in debug * @param enabler The DebugEnabler to use (0 to to use the parser) * @param ptr Pointer to print, 0 to use the session pointer */ diff --git a/libs/ysig/address.cpp b/libs/ysig/address.cpp index 1bc42fba..da3b0c61 100644 --- a/libs/ysig/address.cpp +++ b/libs/ysig/address.cpp @@ -1,11 +1,11 @@ /** * address.cpp - * This file is part of the YATE Project http://YATE.null.ro + * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Signalling Stack - implements the support for SS7, ISDN and PSTN * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/libs/ysig/dumper.cpp b/libs/ysig/dumper.cpp index 9be82bfe..a8aff0ee 100644 --- a/libs/ysig/dumper.cpp +++ b/libs/ysig/dumper.cpp @@ -1,11 +1,11 @@ /** * dumper.cpp - * This file is part of the YATE Project http://YATE.null.ro + * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Signalling Stack - implements the support for SS7, ISDN and PSTN * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/libs/ysig/engine.cpp b/libs/ysig/engine.cpp index cbce928a..0f448d6f 100644 --- a/libs/ysig/engine.cpp +++ b/libs/ysig/engine.cpp @@ -1,11 +1,11 @@ /** * engine.cpp - * This file is part of the YATE Project http://YATE.null.ro + * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Signalling Stack - implements the support for SS7, ISDN and PSTN * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -675,7 +675,7 @@ static const TokenDict s_dict_causeCCITT[] = { {"unknown-group", 0x5a}, // Non-existent CUG {"invalid-transit-net", 0x5b}, // Invalid transit network selection {"invalid-message", 0x5f}, // Invalid message, unspecified - // protocol-error class + // protocol-error class {"missing-mandatory-ie", 0x60}, // Mandatory information element is missing {"unknown-message", 0x61}, // Message type non-existent or not implemented {"wrong-message", 0x62}, // Message not compatible with call state, non-existent or not implemented @@ -729,7 +729,7 @@ static const TokenDict s_dict_transferRateCCITT[] = { static const TokenDict s_dict_formatCCITT[] = { {"v110", 0x01}, // Recomendation V.110 and X.30 {"mulaw", 0x02}, // Recomendation G.711 mu-law - {"alaw", 0x03}, // Recomendation G.711 A-law + {"alaw", 0x03}, // Recomendation G.711 A-law {"g721", 0x04}, // Recomendation G.721 32kbit/s ADPCM and I.460 {"h221", 0x05}, // Recomendation H.221 and H.242 {"h223", 0x06}, // Recomendation H.223 and H.245 videoconference diff --git a/libs/ysig/interface.cpp b/libs/ysig/interface.cpp index abb0fed9..b866939b 100644 --- a/libs/ysig/interface.cpp +++ b/libs/ysig/interface.cpp @@ -1,11 +1,11 @@ /** * interface.cpp - * This file is part of the YATE Project http://YATE.null.ro + * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Signalling Stack - implements the support for SS7, ISDN and PSTN * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -161,5 +161,4 @@ bool SignallingReceiver::transmitPacket(const DataBlock& packet, bool repeat, return tmp && tmp->transmitPacket(packet,repeat,type); } - /* vi: set ts=8 sw=4 sts=4 noet: */ diff --git a/libs/ysig/isup.cpp b/libs/ysig/isup.cpp index d1c22447..036dd117 100644 --- a/libs/ysig/isup.cpp +++ b/libs/ysig/isup.cpp @@ -1,11 +1,11 @@ /** * isup.cpp - * This file is part of the YATE Project http://YATE.null.ro + * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Signalling Stack - implements the support for SS7, ISDN and PSTN * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -3914,7 +3914,7 @@ void SS7ISUP::timerTick(const Time& when) if (ok) { unsigned int nCics = 0; int flg = 0; - int flgReset = 0; + int flgReset = 0; if ((msg->params()[YSTRING("GroupSupervisionTypeIndicator")] == YSTRING("hw-failure"))) { flg = SignallingCircuit::LockLocalHWFail; flgReset = SignallingCircuit::LockingHWFail; @@ -4772,7 +4772,7 @@ bool SS7ISUP::processMSU(SS7MsgISUP::Type type, unsigned int cic, // TODO: check parameters-unsupported vs. ParameterCompatInformation // Check if we expected some response to UPT - // Ignore + // Ignore if (!m_userPartAvail && m_uptTimer.started()) { m_uptTimer.stop(); const char* oldStat = statusName(); @@ -6105,7 +6105,7 @@ bool SS7ISUP::handleCicEventCommand(const NamedList& p) return true; } -// Try to start single circuit (un)blocking. Set a pending operation on success +// Try to start single circuit (un)blocking. Set a pending operation on success // @param force True to ignore resetting/(un)blocking flags of the circuit // Return built message to be sent on success SS7MsgISUP* SS7ISUP::buildCicBlock(SignallingCircuit* cic, bool block, bool force) diff --git a/libs/ysig/layer2.cpp b/libs/ysig/layer2.cpp index 2a4b92af..1ed3211b 100644 --- a/libs/ysig/layer2.cpp +++ b/libs/ysig/layer2.cpp @@ -1,11 +1,11 @@ /** * layer2.cpp - * This file is part of the YATE Project http://YATE.null.ro + * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Signalling Stack - implements the support for SS7, ISDN and PSTN * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/libs/ysig/layer3.cpp b/libs/ysig/layer3.cpp index 859c4341..f3bc29f3 100644 --- a/libs/ysig/layer3.cpp +++ b/libs/ysig/layer3.cpp @@ -1,11 +1,11 @@ /** * layer3.cpp - * This file is part of the YATE Project http://YATE.null.ro + * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Signalling Stack - implements the support for SS7, ISDN and PSTN * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -490,7 +490,7 @@ void SS7Layer3::printRoutes() } if (route->shift()) tmp << " >> " << route->shift(); - tmp << "\r\n"; + tmp << "\r\n"; } s << tmp; } @@ -498,7 +498,7 @@ void SS7Layer3::printRoutes() s = s.substr(0,s.length() - 2); Output("%s of '%s': [%p]\r\n%s",router?"Routing table":"Destinations",debugName(),this,s.c_str()); } - else + else Output("No %s in '%s' [%p]",router?"routes":"destinations",debugName(),this); } diff --git a/libs/ysig/layer4.cpp b/libs/ysig/layer4.cpp index 070017f9..37a3b4b0 100644 --- a/libs/ysig/layer4.cpp +++ b/libs/ysig/layer4.cpp @@ -1,11 +1,11 @@ /** * layer4.cpp - * This file is part of the YATE Project http://YATE.null.ro + * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Signalling Stack - implements the support for SS7, ISDN and PSTN * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/libs/ysig/main-ss7test.cpp b/libs/ysig/main-ss7test.cpp index 5bc15616..d9b6b92d 100644 --- a/libs/ysig/main-ss7test.cpp +++ b/libs/ysig/main-ss7test.cpp @@ -1,3 +1,24 @@ +/** + * main-ss7test.cpp + * This file is part of the YATE Project http://YATE.null.ro + * + * Yet Another Signalling Stack - implements the support for SS7, ISDN and PSTN + * + * Yet Another Telephony Engine - a fully featured software PBX and IVR + * Copyright (C) 2004-2014 Null Team + * + * This software is distributed under multiple licenses; + * see the COPYING file in the main directory for licensing + * information for this specific distribution. + * + * This use of this software may be subject to additional restrictions. + * See the LEGAL file in the main directory for details. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + */ + #include "yatesig.h" using namespace TelEngine; @@ -112,3 +133,5 @@ int main() Output("SS7 library test stopped"); return 0; } + +/* vi: set ts=8 sw=4 sts=4 noet: */ diff --git a/libs/ysig/management.cpp b/libs/ysig/management.cpp index 80c6cfbe..916e609d 100644 --- a/libs/ysig/management.cpp +++ b/libs/ysig/management.cpp @@ -1,11 +1,11 @@ /** * management.cpp - * This file is part of the YATE Project http://YATE.null.ro + * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Signalling Stack - implements the support for SS7, ISDN and PSTN * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/libs/ysig/q921.cpp b/libs/ysig/q921.cpp index 2645188f..d14a2485 100644 --- a/libs/ysig/q921.cpp +++ b/libs/ysig/q921.cpp @@ -1,11 +1,11 @@ /** * q921.cpp - * This file is part of the YATE Project http://YATE.null.ro + * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Signalling Stack - implements the support for SS7, ISDN and PSTN * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/libs/ysig/q931.cpp b/libs/ysig/q931.cpp index 23c33029..1c8bb2b8 100644 --- a/libs/ysig/q931.cpp +++ b/libs/ysig/q931.cpp @@ -1,11 +1,11 @@ /** * q931.cpp - * This file is part of the YATE Project http://YATE.null.ro + * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Signalling Stack - implements the support for SS7, ISDN and PSTN * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -3880,7 +3880,7 @@ void ISDNQ931IE::toString(String& dest, bool extendedDebug, const char* before) tmp.hexify(m_buffer.data(),m_buffer.length(),' '); dest << " " << tmp; } - // Show fields + // Show fields tmp = before; tmp << " "; for (unsigned int i = 0; ; i++) { @@ -4167,7 +4167,7 @@ const TokenDict Q931Parser::s_dict_bearerTransRate[] = { const TokenDict Q931Parser::s_dict_bearerProto1[] = { {"v110", 0x01}, // Recomendation V.110 and X.30 {"mulaw", 0x02}, // Recomendation G.711 mu-law - {"alaw", 0x03}, // Recomendation G.711 A-law + {"alaw", 0x03}, // Recomendation G.711 A-law {"g721", 0x04}, // Recomendation G.721 32kbit/s ADPCM and I.460 {"h221", 0x05}, // Recomendation H.221 and H.242 {"non-CCITT", 0x07}, // Non CCITT standardized rate adaption @@ -4310,7 +4310,7 @@ static const IEParam s_ie_ieSubAddress[] = { const TokenDict Q931Parser::s_dict_channelIDSelect_BRI[] = { {"none", 0x00}, // No channel {"b1", 0x01}, // B1 channel - {"b2", 0x02}, // B2 channel + {"b2", 0x02}, // B2 channel {"any", 0x03}, // Any channel {0,0} }; diff --git a/libs/ysig/router.cpp b/libs/ysig/router.cpp index 86ede191..54b42c2e 100644 --- a/libs/ysig/router.cpp +++ b/libs/ysig/router.cpp @@ -1,11 +1,11 @@ /** * router.cpp - * This file is part of the YATE Project http://YATE.null.ro + * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Signalling Stack - implements the support for SS7, ISDN and PSTN * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/libs/ysig/run-ss7test b/libs/ysig/run-ss7test index c475ef4b..1da3d837 100755 --- a/libs/ysig/run-ss7test +++ b/libs/ysig/run-ss7test @@ -1,5 +1,23 @@ #!/bin/sh +# run-ss7test +# This file is part of the YATE Project http://YATE.null.ro +# +# Yet Another Telephony Engine - a fully featured software PBX and IVR +# Copyright (C) 2005-2014 Null Team +# +# This software is distributed under multiple licenses; +# see the COPYING file in the main directory for licensing +# information for this specific distribution. +# +# This use of this software may be subject to additional restrictions. +# See the LEGAL file in the main directory for details. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + # Script to run the SS7 test from the build directory exefile="yate-ss7test" diff --git a/libs/ysig/sccp.cpp b/libs/ysig/sccp.cpp index f98950e9..40147e64 100644 --- a/libs/ysig/sccp.cpp +++ b/libs/ysig/sccp.cpp @@ -1,11 +1,11 @@ /** * sccp.cpp - * This file is part of the YATE Project http://YATE.null.ro + * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Signalling Stack - implements the support for SS7, ISDN and PSTN * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -462,7 +462,7 @@ static bool decodeAnsiAddress(const SS7SCCP* sccp, NamedList& params,const SCCPP length -= 3; params.addParam(prName + ".pointcode",String(pointcode)); } - params.addParam(prName + ".route", ((addressIndicator & 0x40) == 0x40) ? + params.addParam(prName + ".route", ((addressIndicator & 0x40) == 0x40) ? YSTRING("ssn") : YSTRING("gt")); unsigned char gti = (addressIndicator >> 2) & 0x0f; if (!gti) // No Global Title Present @@ -1405,7 +1405,7 @@ bool SS7MsgSccpReassemble::canProcess(const SS7MsgSCCP* msg, const SS7Label& lab { if (!compareLabel(m_label,label)) return false; - if (m_segmentationLocalReference != + if (m_segmentationLocalReference != (u_int32_t)msg->params().getIntValue(YSTRING("Segmentation.SegmentationLocalReference"))) return false; NamedList address(""); @@ -1665,7 +1665,7 @@ bool SCCPUser::initialize(const NamedList* config) if (!resolveConfig(YSTRING("sccp"),params,config)) params.addParam("local-config","true"); // NOTE SS7SCCP is created on demand!!! - // engine ->build method will search for the requested sccc and + // engine ->build method will search for the requested sccc and // if it was found will return it with the ref counter incremented // if it wasn't found the refcounter will be 1 // For this behavior SCCPUser attach method will not reference the sccp @@ -2017,7 +2017,7 @@ bool SCCPManagement::managementMessage(SCCP::Type type, NamedList& params) { if (!m_sccp) return false; - return m_sccp->managementMessage(type,params); + return m_sccp->managementMessage(type,params); } void SCCPManagement::putValue(NamedList& params,int val,const char* name, bool dict) @@ -2042,7 +2042,7 @@ void SCCPManagement::localBroadcast(SCCP::Type type, int pointcode, int sps, putValue(params,sps,"signalling-point-status",true); putValue(params,ss,"subsystem-status",true); putValue(params,rss,"remote-sccp-status",true); - m_sccp->managementMessage(type,params); + m_sccp->managementMessage(type,params); } SccpLocalSubsystem* SCCPManagement::getLocalSubsystem(unsigned char ssn) @@ -3746,7 +3746,7 @@ SS7MSU* SS7SCCP::buildMSU(SS7MsgSCCP* msg, const SS7Label& label, bool checkLeng } else { // Do not try to set the pointer to optional parameters // if is bigger than max unsigned char value because will - // result in a malformed packet! + // result in a malformed packet! if (storedLength > 255) { Debug(this,checkLength ? DebugAll : DebugStub, "Build MSU the pointer to optional parameters is bigger than 255!!!! %d", @@ -3808,7 +3808,7 @@ HandledMSU SS7SCCP::receivedMSU(const SS7MSU& msu, const SS7Label& label, SS7Lay return ok; } -bool SS7SCCP::processMSU(SS7MsgSCCP::Type type, const unsigned char* paramPtr, +bool SS7SCCP::processMSU(SS7MsgSCCP::Type type, const unsigned char* paramPtr, unsigned int paramLen, const SS7Label& label, SS7Layer3* network, int sls) { XDebug(this,DebugAll,"SS7SCCP::processMSU(%u,%p,%u,%p,%p,%d) [%p]", @@ -4367,7 +4367,7 @@ bool SS7SCCP::decodeMessage(SS7MsgSCCP* msg, SS7PointCode::Type pcType, void SS7SCCP::receivedUPU(SS7PointCode::Type type, const SS7PointCode node, SS7MSU::Services part, unsigned char cause, const SS7Label& label, int sls) { - if (part != sif() || !m_management) // not SCCP + if (part != sif() || !m_management) // not SCCP return; m_management->sccpUnavailable(node,cause); } @@ -4453,7 +4453,7 @@ void SS7SCCP::setNetworkUp(bool operational) m_management->mtpEndRestart(); else m_management->stopSSTs(); - + } void SS7SCCP::routeStatusChanged(SS7PointCode::Type type, const SS7PointCode& node, SS7Route::State state) diff --git a/libs/ysig/sigcall.cpp b/libs/ysig/sigcall.cpp index 2735d77e..7260df15 100644 --- a/libs/ysig/sigcall.cpp +++ b/libs/ysig/sigcall.cpp @@ -1,11 +1,11 @@ /** * sigcall.cpp - * This file is part of the YATE Project http://YATE.null.ro + * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Signalling Stack - implements the support for SS7, ISDN and PSTN * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/libs/ysig/sigtran.cpp b/libs/ysig/sigtran.cpp index 9df00269..d4280d75 100644 --- a/libs/ysig/sigtran.cpp +++ b/libs/ysig/sigtran.cpp @@ -1,11 +1,11 @@ /** * sigtran.cpp - * This file is part of the YATE Project http://YATE.null.ro + * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Signalling Stack - implements the support for SS7, ISDN and PSTN * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -1095,7 +1095,7 @@ bool SS7M2PA::initialize(const NamedList* config) SIGTRAN::attach(tr); if (!tr->initialize(¶ms)) SIGTRAN::attach(0); - m_sequenced = config->getBoolValue(YSTRING("sequenced"),transport() ? + m_sequenced = config->getBoolValue(YSTRING("sequenced"),transport() ? transport()->reliable() : false); } } diff --git a/libs/ysig/tcap.cpp b/libs/ysig/tcap.cpp index 9dcf9cd8..2fb37008 100644 --- a/libs/ysig/tcap.cpp +++ b/libs/ysig/tcap.cpp @@ -5,7 +5,7 @@ * Yet Another Signalling Stack - implements the support for SS7, ISDN and PSTN * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -449,7 +449,7 @@ void SS7TCAP::updateUserStatus(TCAPUser* user, SCCPManagement::LocalBroadcast st default: break; } - + if (notify) { sendSCCPNotify(params); // it always returns false, so no point in checking result Debug(this,DebugInfo,"SSN=%d changed status from '%s' to '%s' [%p]",m_SSN, diff --git a/libs/ysig/testpart.cpp b/libs/ysig/testpart.cpp index c6e44d16..0908282d 100644 --- a/libs/ysig/testpart.cpp +++ b/libs/ysig/testpart.cpp @@ -1,11 +1,11 @@ /** * testpart.cpp - * This file is part of the YATE Project http://YATE.null.ro + * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Signalling Stack - implements the support for SS7, ISDN and PSTN * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2010-2013 Null Team + * Copyright (C) 2010-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/libs/ysig/tup.cpp b/libs/ysig/tup.cpp index 535d04b7..815615fc 100644 --- a/libs/ysig/tup.cpp +++ b/libs/ysig/tup.cpp @@ -1,11 +1,11 @@ /** * tup.cpp - * This file is part of the YATE Project http://YATE.null.ro + * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Signalling Stack - implements the support for SS7, ISDN and PSTN * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/libs/ysig/yatesig.h b/libs/ysig/yatesig.h index 50ec2901..fc6a284c 100644 --- a/libs/ysig/yatesig.h +++ b/libs/ysig/yatesig.h @@ -1,11 +1,11 @@ -/* +/** * yatesig.h * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Signalling Stack - implements the support for SS7, ISDN and PSTN * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -1556,7 +1556,7 @@ public: Dtmf = 1, // Transfer tones: param: tone GenericTone = 2, // Play or detect tones: param: tone // Analog line events - Timeout = 10, // + Timeout = 10, // Polarity = 11, // Line's polarity changed StartLine = 15, // Initialize FXO line LineStarted = 16, // FXO line initialized: send number @@ -2026,7 +2026,7 @@ public: * Get the pointer to the circuit codes array * @return Pointer to the circuit codes array or 0 */ - inline void clear() + inline void clear() { m_range.clear(); m_count = 0; } /** @@ -5315,7 +5315,7 @@ protected: * @param nextPrefix Other prefix of the global title content parameters * @return a new SCCP route or 0 is no route was found */ - NamedList* translateGT(const NamedList& params, const String& prefix, + NamedList* translateGT(const NamedList& params, const String& prefix, const String& nextPrefix); /** @@ -5464,7 +5464,7 @@ public: * Send a message to SCCP for transport * @param data User data * @param params SCCP parameters - * Note! If the request is made with return option set there is no warranty that a notification + * Note! If the request is made with return option set there is no warranty that a notification * will be received in case that the message failed to be delivered */ virtual bool sendData(DataBlock& data, NamedList& params); @@ -5504,7 +5504,7 @@ public: * Notification from SCCP that a message failed to arrive to it's destination * @param data User data send. * @param params SCCP parameters - * Note! The data may not contain the full message block previously sent (in case of SCCP segmentation), + * Note! The data may not contain the full message block previously sent (in case of SCCP segmentation), * but it must always must contain the first segment */ virtual HandledMSU notifyData(DataBlock& data, NamedList& params); @@ -7229,7 +7229,7 @@ public: */ virtual bool control(SS7Layer2::Operation oper, NamedList* params = 0) { return control((M2PAOperations)oper,params); } - + /** * Retrieve the current link status indications * @return Link status indication bits @@ -8634,7 +8634,7 @@ public: /** * Check if the call is a not test one in early state - * @return True if this a non test call in early state + * @return True if this a non test call in early state */ inline bool earlyState() const { return m_state <= Setup && !m_testCall; } @@ -9180,7 +9180,7 @@ private: unsigned int count, bool block); // Handle circuit(s) event generation command bool handleCicEventCommand(const NamedList& p); - // Try to start single circuit (un)blocking. Set a pending operation on success + // Try to start single circuit (un)blocking. Set a pending operation on success // @param force True to ignore resetting/(un)blocking flags of the circuit // Return built message to be sent on success SS7MsgISUP* buildCicBlock(SignallingCircuit* cic, bool block, bool force = false); @@ -9804,7 +9804,7 @@ public: */ inline void removeData() { m_data = 0; } - + /** * Obtain the data associated with this message * @return The data @@ -9817,7 +9817,7 @@ public: * @return The data */ inline DataBlock* extractData() - { + { DataBlock* data = m_data; m_data = 0; return data; @@ -10069,7 +10069,7 @@ public: */ inline void stopCoordTimer() { m_coordTimer.stop(); } - + /** * Obtain the subsystem multiplicity indicator of this subsystem * @return The Subsystem multiplicity indicator @@ -10573,7 +10573,7 @@ public: */ inline unsigned int translations() { return m_totalGTTranslations; } - + /** * Obtain the local SCCP point code * @return Pointer to local point code or 0 if no pointcode was configured @@ -10682,7 +10682,7 @@ private: // Helper method used to dump service messages and error codes status void dumpArchive(String& msg, bool extended); - bool processMSU(SS7MsgSCCP::Type type, const unsigned char* paramPtr, + bool processMSU(SS7MsgSCCP::Type type, const unsigned char* paramPtr, unsigned int paramLen, const SS7Label& label, SS7Layer3* network, int sls); bool decodeMessage(SS7MsgSCCP* msg, SS7PointCode::Type pcType, @@ -10742,7 +10742,7 @@ public: * Constructor * @param params NamedList reference containing information from the SCCP level * @param data DataBlock representing the TCAP payload - * @param notice Flag if this is a notification, true if it is, false if it's a message + * @param notice Flag if this is a notification, true if it is, false if it's a message */ inline SS7TCAPMessage(NamedList& params, DataBlock& data, bool notice = false) : m_msgParams(params), m_msgData(data), m_notice(notice) @@ -11172,7 +11172,7 @@ protected: unsigned int m_discardMsgs; unsigned int m_normalMsgs; unsigned int m_abnormalMsgs; - + // Subsystem Status SCCPManagement::LocalBroadcast m_ssnStatus; }; @@ -11301,7 +11301,7 @@ private: }; /** - * Implementation of SS7 Transactional Capabilities Application Part Transaction + * Implementation of SS7 Transactional Capabilities Application Part Transaction * @short SS7 TCAP transaction implementation */ class YSIG_API SS7TCAPTransaction : public RefObject, public Mutex @@ -11585,7 +11585,7 @@ protected: }; /** - * Implementation of SS7 Transactional Capabilities Application Part Component + * Implementation of SS7 Transactional Capabilities Application Part Component * @short SS7 TCAP component implementation */ class YSIG_API SS7TCAPComponent : public GenObject @@ -14555,7 +14555,7 @@ public: * @param call The call requesting the operation * @param tei The TEI to send with the STATUS message * @param cause Value for Cause IE - * @param display Optional value for Display IE + * @param display Optional value for Display IE * @param diagnostic Optional value for cause diagnostic value * @return The result of the operation (true if successfully sent) */ @@ -14573,8 +14573,8 @@ public: * @param cause Value for Cause IE * @param tei TEI to which the release is sent to * @param diag Optional hexified string for cause dignostic - * @param display Optional value for Display IE - * @param signal Optional value for Signal IE + * @param display Optional value for Display IE + * @param signal Optional value for Signal IE * @return The result of the operation (true if successfully sent) */ inline bool sendRelease(ISDNQ931Call* call, bool release, const char* cause, u_int8_t tei = 0, @@ -14735,7 +14735,7 @@ protected: * @param tei The TEI to send with the STATUS message * @param initiator True if this is from the call initiator * @param state The state for CallState IE - * @param display Optional value for Display IE + * @param display Optional value for Display IE * @param diagnostic Optional value for cause diagnostic value * @return The result of the operation (true if successfully sent) */ @@ -14752,8 +14752,8 @@ protected: * @param initiator The call initiator flag * @param cause Value for Cause IE * @param diag Optional hexified string for cause dignostic - * @param display Optional value for Display IE - * @param signal Optional value for Signal IE + * @param display Optional value for Display IE + * @param signal Optional value for Signal IE * @return The result of the operation (true if successfully sent) */ bool sendRelease(bool release, u_int8_t callRefLen, u_int32_t callRef, u_int8_t tei, diff --git a/libs/ysip/engine.cpp b/libs/ysip/engine.cpp index bebf6073..d2eedaa1 100644 --- a/libs/ysip/engine.cpp +++ b/libs/ysip/engine.cpp @@ -1,10 +1,10 @@ /** * engine.cpp * Yet Another SIP Stack - * This file is part of the YATE Project http://YATE.null.ro + * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/libs/ysip/message.cpp b/libs/ysip/message.cpp index 22ec7e07..a5c25dc9 100644 --- a/libs/ysip/message.cpp +++ b/libs/ysip/message.cpp @@ -1,10 +1,10 @@ /** * message.cpp * Yet Another SIP Stack - * This file is part of the YATE Project http://YATE.null.ro + * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/libs/ysip/transaction.cpp b/libs/ysip/transaction.cpp index 4f34af84..25956956 100644 --- a/libs/ysip/transaction.cpp +++ b/libs/ysip/transaction.cpp @@ -1,10 +1,10 @@ /** * transaction.cpp * Yet Another SIP Stack - * This file is part of the YATE Project http://YATE.null.ro + * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/libs/ysip/util.cpp b/libs/ysip/util.cpp index 37d9a502..b8640ec5 100644 --- a/libs/ysip/util.cpp +++ b/libs/ysip/util.cpp @@ -1,10 +1,10 @@ /** * util.cpp * Yet Another SIP Stack - * This file is part of the YATE Project http://YATE.null.ro + * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/libs/ysip/util.h b/libs/ysip/util.h index c2afdce1..1e775740 100644 --- a/libs/ysip/util.h +++ b/libs/ysip/util.h @@ -1,10 +1,10 @@ /** * util.h * Yet Another SIP Stack - * This file is part of the YATE Project http://YATE.null.ro + * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/libs/ysip/yatesip.h b/libs/ysip/yatesip.h index c64bbb6b..a9aacd5c 100644 --- a/libs/ysip/yatesip.h +++ b/libs/ysip/yatesip.h @@ -1,10 +1,10 @@ -/* +/** * yatesip.h * Yet Another SIP Stack * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -40,7 +40,7 @@ #define YSIP_API #endif -/** +/** * Holds all Telephony Engine related classes. */ namespace TelEngine { @@ -1002,7 +1002,7 @@ protected: /** * This object is an event that will be taken from SIPEngine * @short A SIP event as retrieved from engine - */ + */ class YSIP_API SIPEvent { friend class SIPTransaction; @@ -1165,8 +1165,8 @@ public: SIPTransaction* addMessage(SIPMessage* message); /** - * Get a SIPEvent from the queue. - * This method mainly looks into the transaction list and get all kind of + * Get a SIPEvent from the queue. + * This method mainly looks into the transaction list and get all kind of * events, like an incoming request (INVITE, REGISTRATION), a timer, an * outgoing message. * This method is thread safe @@ -1174,7 +1174,7 @@ public: SIPEvent *getEvent(); /** - * This method should be called very often to get the events from the list and + * This method should be called very often to get the events from the list and * to send them to processEvent method. * @return True if some events were processed this turn */ diff --git a/libs/ysnmp/snmp.cpp b/libs/ysnmp/snmp.cpp index fc04edf4..49f4302a 100644 --- a/libs/ysnmp/snmp.cpp +++ b/libs/ysnmp/snmp.cpp @@ -56,7 +56,7 @@ ObjectSyntax::ObjectSyntax(void* data, int len) { m_simple = new SimpleSyntax(); m_application_wide = new ApplicationSyntax(); - + DataBlock db(data,len); decode(db); } @@ -195,7 +195,7 @@ ApplicationSyntax::ApplicationSyntax(void* data, int len) m_arbitrary_value = new Opaque(); m_big_counter_value = new Counter64(); m_unsigned_integer_value = new Unsigned32(); - + DataBlock db(data,len); decode(db); } @@ -450,7 +450,7 @@ Gauge32::Gauge32() Gauge32::Gauge32(void* data, int len) { m_Gauge32 = new Unsigned32(); - + DataBlock db(data,len); decode(db); } @@ -666,7 +666,7 @@ PDUs::PDUs(void* data, int len) m_inform_request = new InformRequest_PDU(); m_snmpV2_trap = new SNMPv2_Trap_PDU(); m_report = new Report_PDU(); - + DataBlock db(data,len); decode(db); } diff --git a/libs/yxml/XML.cpp b/libs/yxml/XML.cpp index 161cfa23..c05ef2cc 100644 --- a/libs/yxml/XML.cpp +++ b/libs/yxml/XML.cpp @@ -1,9 +1,9 @@ /** * XML.cpp - * This file is part of the YATE Project http://YATE.null.ro + * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -567,7 +567,7 @@ bool XmlSaxParser::parseComment() #endif gotComment(comment); resetParsed(); - // The comment can apear anywhere sow SaxParser never + // The comment can apear anywhere sow SaxParser never // sets an error when receive a comment return true; } @@ -577,7 +577,7 @@ bool XmlSaxParser::parseComment() comment << m_buf; int length = comment.length(); // Keep the last 2 charaters in buffer because if the input buffer ends - // between "--" and ">" + // between "--" and ">" m_buf = comment.substr(length - 2); setUnparsed(Comment); if (length > 1) @@ -1864,7 +1864,7 @@ bool XmlElement::getTag(const String*& tag, const String*& ns) const // Append a new child XmlSaxParser::Error XmlElement::addChild(XmlChild* child) { - if (!child) + if (!child) return XmlSaxParser::NoError; // TODO: Check if a child element's attribute names are unique in the new context // See http://www.w3.org/TR/xml-names/ Section 6.3 diff --git a/libs/yxml/yatexml.h b/libs/yxml/yatexml.h index 041e1ebe..f00af020 100644 --- a/libs/yxml/yatexml.h +++ b/libs/yxml/yatexml.h @@ -1,11 +1,11 @@ -/* +/** * yatexml.h * This file is part of the YATE Project http://YATE.null.ro * * XML Parser and support classes * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -348,7 +348,7 @@ protected: void unEscape(String& text); /** - * Remove blank characters from the begining of the buffer + * Remove blank characters from the begining of the buffer */ void skipBlanks(); @@ -728,7 +728,7 @@ private: }; /** - * Xml Child for Xml document + * Xml Child for Xml document * @short Xml Child */ class YXML_API XmlChild : public GenObject @@ -793,7 +793,7 @@ public: /** - * Xml Declaration for Xml document + * Xml Declaration for Xml document * @short Xml Declaration */ class YXML_API XmlDeclaration : public XmlChild @@ -851,7 +851,7 @@ private: }; /** - * Xml Fragment a fragment from a Xml document + * Xml Fragment a fragment from a Xml document * @short Xml Fragment */ class YXML_API XmlFragment : public XmlParent @@ -1087,7 +1087,7 @@ private: /** - * Xml Element from a Xml document + * Xml Element from a Xml document * @short Xml Element */ @@ -1533,7 +1533,7 @@ public: /** * Build a list parameter from xml element * See @ref param2xml for more info - * @param xml The XML element to process + * @param xml The XML element to process * @param tag Child XmlElement tag to handle * @param copyXml True to copy XmlElement objects instead of just remove * them from parent @@ -1547,7 +1547,7 @@ public: * Each parameter will be taken from 'name' and 'value' attributes. * See @ref param2xml for more info * @param list Destination list - * @param parent The XML element to process + * @param parent The XML element to process * @param tag Child XmlElement tag to handle * @param copyXml True to copy XmlElement objects instead of just remove * them from parent @@ -1584,7 +1584,7 @@ private: }; /** - * A Xml Comment from Xml document + * A Xml Comment from Xml document * @short Xml Comment */ class YXML_API XmlComment : public XmlChild @@ -1634,7 +1634,7 @@ private: }; /** - * A Xml CData from Xml document + * A Xml CData from Xml document * @short Xml Declaration */ class YXML_API XmlCData : public XmlChild @@ -1685,7 +1685,7 @@ private: }; /** - * A Xml Declaration for Xml document + * A Xml Declaration for Xml document * @short Xml Declaration */ class YXML_API XmlText : public XmlChild diff --git a/main.cpp b/main.cpp index 725a212c..69110cef 100644 --- a/main.cpp +++ b/main.cpp @@ -3,7 +3,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/modules/amrnbcodec.cpp b/modules/amrnbcodec.cpp index 040eb09c..30a5d029 100644 --- a/modules/amrnbcodec.cpp +++ b/modules/amrnbcodec.cpp @@ -5,7 +5,7 @@ * AMR narrowband transcoder implemented using 3GPP codec * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * Author: Paul Chitescu * * AMR codec library by Stanislav Brabec at http://www.penguin.cz/~utx/amr diff --git a/modules/analyzer.cpp b/modules/analyzer.cpp index fb5bb260..2cc3bf9e 100644 --- a/modules/analyzer.cpp +++ b/modules/analyzer.cpp @@ -5,7 +5,7 @@ * Test call generator and audio quality analyzer * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * FFT routine taken from Murphy McCauley's FFT DLL based in turn on the * work of Don Cross diff --git a/modules/callfork.cpp b/modules/callfork.cpp index 090643c0..c204cc8b 100644 --- a/modules/callfork.cpp +++ b/modules/callfork.cpp @@ -5,7 +5,7 @@ * Call Forker * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/modules/callgen.cpp b/modules/callgen.cpp index 0226acf9..891a53a8 100644 --- a/modules/callgen.cpp +++ b/modules/callgen.cpp @@ -1,11 +1,11 @@ /** * callgen.cpp * This file is part of the YATE Project http://YATE.null.ro - * + * * Call Generator * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/modules/cdrbuild.cpp b/modules/cdrbuild.cpp index 997c767e..c59e0990 100644 --- a/modules/cdrbuild.cpp +++ b/modules/cdrbuild.cpp @@ -5,7 +5,7 @@ * Cdr builder * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -355,7 +355,7 @@ void CdrBuilder::emit(const char *operation) if (String(operation) == YSTRING("update") && !s_cdrUpdates) return; - + m_first = false; DDebug("cdrbuild",DebugAll,"Emit '%s' for '%s' status '%s'", @@ -391,7 +391,7 @@ void CdrBuilder::emit(const char *operation) m_durationTime.getTime(tmp,t_hangup - m_start); m->addParam("call_duration",tmp); } - + if (!getValue("external")) { const char* ext = 0; if (m_dir == YSTRING("incoming")) diff --git a/modules/cdrcombine.cpp b/modules/cdrcombine.cpp index 44f58de9..6a517193 100644 --- a/modules/cdrcombine.cpp +++ b/modules/cdrcombine.cpp @@ -5,7 +5,7 @@ * Combined CDR builder * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2013 Null Team + * Copyright (C) 2013-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/modules/cdrfile.cpp b/modules/cdrfile.cpp index e5bb9e51..f50201b6 100644 --- a/modules/cdrfile.cpp +++ b/modules/cdrfile.cpp @@ -5,7 +5,7 @@ * Write the CDR to a text file * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/modules/client/alsachan.cpp b/modules/client/alsachan.cpp index c21431a7..1e982dfd 100644 --- a/modules/client/alsachan.cpp +++ b/modules/client/alsachan.cpp @@ -308,7 +308,7 @@ bool AlsaChan::init() dev->deref(); if (!source->init()) { source->deref(); - return false; + return false; } setSource(source); source->deref(); @@ -316,8 +316,8 @@ bool AlsaChan::init() if (!cons->init()) { cons->deref(); setSource(); - return false; - } + return false; + } setConsumer(cons); cons->deref(); return true; @@ -551,7 +551,7 @@ bool AlsaHandler::received(Message &msg) Debug(DebugInfo,"Alsa outgoing call not accepted!"); chan->destruct(); return false; - } + } const char *targ = msg.getValue("target"); if (!targ) { Debug(DebugWarn,"Alsa outgoing call with no target!"); diff --git a/modules/client/coreaudio.cpp b/modules/client/coreaudio.cpp index 7efd0653..1c4fc805 100644 --- a/modules/client/coreaudio.cpp +++ b/modules/client/coreaudio.cpp @@ -1,11 +1,11 @@ -/* +/** * coreaudio.cpp * This file is part of the YATE Project http://YATE.null.ro * * CoreAudio sound channel driver for Mac OS X. * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -42,29 +42,29 @@ public: virtual void run(); virtual void cleanup(); virtual bool control(NamedList& params); - + // append to the internal buffer data read from input source void sendData(AudioBufferList *buf); - // provide data to the AudioConverter taken from the internal buffer + // provide data to the AudioConverter taken from the internal buffer DataBlock getData(UInt32 pkts); - + // helper function for allocating buffers AudioBufferList* allocateAudioBufferList(UInt32 numChannels, UInt32 size); // helper function for freeing buffers void destroyAudioBufferList(AudioBufferList* list); // helper function for obtaining an AudioConverter OSStatus buildConverter(AudioStreamBasicDescription inFormat, AudioConverterRef* ac); - + // obtain the output format of the AudioUnit inline AudioStreamBasicDescription outFormat() const { return m_outDevFormat; } // obtain the output sample rate inline unsigned int rate() const { return m_rate; } - + private: // callback for obtaining data from input source - static OSStatus inputCallback(void* inRefCon, AudioUnitRenderActionFlags* ioActionFlags, const AudioTimeStamp* inTimeStamp, + static OSStatus inputCallback(void* inRefCon, AudioUnitRenderActionFlags* ioActionFlags, const AudioTimeStamp* inTimeStamp, UInt32 inBusNumber, UInt32 inNumberFrames, AudioBufferList* ioData); // default input AudioUnit AudioUnit fAudioUnit; @@ -106,7 +106,7 @@ public: private: // callback through which the AudioUnit requires data to play - static OSStatus outputCallback(void* inRefCon, AudioUnitRenderActionFlags* ioActionFlags, const AudioTimeStamp* inTimeStamp, + static OSStatus outputCallback(void* inRefCon, AudioUnitRenderActionFlags* ioActionFlags, const AudioTimeStamp* inTimeStamp, UInt32 inBusNumber, UInt32 inNumberFrames, AudioBufferList* ioData); // the AudioUnit AudioUnit fAudioUnit; @@ -137,7 +137,7 @@ public: inline const String& getTarget() const { return m_target; } inline unsigned int rate() const - { return m_rate; } + { return m_rate; } private: String m_dev; String m_target; @@ -233,7 +233,7 @@ static bool checkVolumeSettable(AudioDeviceID devId, UInt32 inChannel,Boolean is OSStatus convertCallback(AudioConverterRef inAudioConverter, UInt32* ioNumberDataPackets, AudioBufferList* ioData, AudioStreamPacketDescription** outDataPacketDescription, void* inUserData) { - CoreAudioSource* src = static_cast (inUserData); + CoreAudioSource* src = static_cast (inUserData); if (!src) return 1; // try to get data with the required length @@ -248,11 +248,11 @@ OSStatus convertCallback(AudioConverterRef inAudioConverter, UInt32* ioNumberDat } // determine how much we can read into the converter's input buffer UInt32 maxPackets = data.length() / src->outFormat().mBytesPerFrame; - if (*ioNumberDataPackets > maxPackets) + if (*ioNumberDataPackets > maxPackets) *ioNumberDataPackets = maxPackets; - else + else maxPackets = *ioNumberDataPackets; - + // fill the converters input buffer ioData->mBuffers[0].mData = data.data(); ioData->mBuffers[0].mDataByteSize = maxPackets * src->outFormat().mBytesPerFrame; @@ -278,10 +278,10 @@ CoreAudioSource::~CoreAudioSource() Debug(DebugInfo,"CoreAudioSource::~CoreAudioSource() [%p] - Failed to stop AU",this); err = AudioUnitUninitialize(fAudioUnit); if(err != noErr) - Debug(DebugInfo,"CoreAudioSource::~CoreAudioSource() [%p] - Failed to uninitialize AU",this); + Debug(DebugInfo,"CoreAudioSource::~CoreAudioSource() [%p] - Failed to uninitialize AU",this); destroyAudioBufferList(m_inAudioBuffer); } - + bool CoreAudioSource::init() { OSStatus err = noErr; @@ -318,7 +318,7 @@ bool CoreAudioSource::init() // configure AudioOutputUnit for input, enable input on the AUHAL param = 1; - err = AudioUnitSetProperty(fAudioUnit,kAudioOutputUnitProperty_EnableIO,kAudioUnitScope_Input,1,¶m,sizeof(UInt32)); + err = AudioUnitSetProperty(fAudioUnit,kAudioOutputUnitProperty_EnableIO,kAudioUnitScope_Input,1,¶m,sizeof(UInt32)); if (err == noErr) { // disable output on the AUHAL param = 0; @@ -328,7 +328,7 @@ bool CoreAudioSource::init() Debug(DebugInfo,"CoreAudioSource::init() [%p] - failed to configure AudioUnit for input error==%4.4s, %ld",this,(char*)&err,(long int)err); return false; } - + // select the default input device param = sizeof(AudioDeviceID); @@ -345,17 +345,17 @@ bool CoreAudioSource::init() Debug(DebugInfo,"CoreAudioSource::init() [%p] - failed to set AU input device=%4.4s, %ld",this,(char*)&err,(long int)err); return false; } - + // setup render callback AURenderCallbackStruct callback; - callback.inputProc = CoreAudioSource::inputCallback; + callback.inputProc = CoreAudioSource::inputCallback; callback.inputProcRefCon = this; err = AudioUnitSetProperty(fAudioUnit,kAudioOutputUnitProperty_SetInputCallback,kAudioUnitScope_Global,0,&callback,sizeof(AURenderCallbackStruct)); if (err != noErr) { Debug(DebugInfo,"CoreAudioSource::init() [%p] - could not set callback error==%4.4s, %ld",this,(char*)&err,(long int)err); return false; } - + // get hardware device format param = sizeof(AudioStreamBasicDescription); AudioStreamBasicDescription devFormat; @@ -375,7 +375,7 @@ bool CoreAudioSource::init() m_outDevFormat.mSampleRate = devFormat.mSampleRate; m_outDevFormat.mFormatID = kAudioFormatLinearPCM; m_outDevFormat.mFormatFlags = kAudioFormatFlagIsSignedInteger | kAudioFormatFlagIsPacked; - m_outDevFormat.mFormatFlags &= ~kAudioFormatFlagIsBigEndian; + m_outDevFormat.mFormatFlags &= ~kAudioFormatFlagIsBigEndian; #if __BIG_ENDIAN__ m_outDevFormat.mFormatFlags |= kAudioFormatFlagIsBigEndian; #endif @@ -422,14 +422,14 @@ bool CoreAudioSource::init() Debug(DebugInfo,"CoreAudioSource::init() [%p] - Failed to initialize AU error==%4.4s, %ld",this,(char*)&err,(long int)err); return false; } - + // allocate AudioBufferList m_inAudioBuffer = allocateAudioBufferList(m_outDevFormat.mChannelsPerFrame,audioSamples * m_outDevFormat.mBytesPerFrame); if(m_inAudioBuffer == NULL) { Debug(DebugInfo,"CoreAudioSource::init() [%p] - Failed to allocate audio buffers",this); return false; } - + // Start pulling for audio data err = AudioOutputUnitStart(fAudioUnit); if(err != noErr) { @@ -444,7 +444,7 @@ bool CoreAudioSource::init() for (unsigned int i = 0; i <= m_channels; i++) m_volSettable = checkVolumeSettable(fInputDevID,i,true) || m_volSettable; Debug(DebugAll,"CoreAudioSource::init() [%p] - volume %s settable",this,(m_volSettable ? "is" : "isn't")); - + return start("CoreAudioSource"); } @@ -462,20 +462,20 @@ OSStatus CoreAudioSource::buildConverter(AudioStreamBasicDescription inputFormat m_convertToFormat.mBytesPerFrame = m_convertToFormat.mBitsPerChannel / 8; m_convertToFormat.mFramesPerPacket = 1; m_convertToFormat.mBytesPerPacket = m_convertToFormat.mBytesPerFrame; - + DDebug(DebugInfo,"CoreAudioSource::buildConverter() [%p] - AudioConverter output format is : channels/frame=%u, sampleRate=%f, bits/channel=%u, " "bytes/frame=%u, frames/packet=%u, bytes/packet=%u, formatFlags=0x%x", this,(unsigned int)m_convertToFormat.mChannelsPerFrame,m_convertToFormat.mSampleRate,(unsigned int)m_convertToFormat.mBitsPerChannel, (unsigned int)m_convertToFormat.mBytesPerFrame,(unsigned int)m_convertToFormat.mFramesPerPacket,(unsigned int)m_convertToFormat.mBytesPerPacket, (unsigned int)m_convertToFormat.mFormatFlags); - + OSStatus err = noErr; err = AudioConverterNew(&inputFormat,&m_convertToFormat,ac); if (err != noErr) { Debug(DebugInfo,"CoreAudioSource::buildConverter() [%p] failed to get converter error==%4.4s, %ld",this,(char*)&err,(long int)err); return err; } - + // set channel map SInt32 channelMap[] = { 0 }; err = AudioConverterSetProperty(*ac, kAudioConverterChannelMap, sizeof(SInt32), channelMap); @@ -487,7 +487,7 @@ OSStatus CoreAudioSource::buildConverter(AudioStreamBasicDescription inputFormat Debug(DebugInfo,"CoreAudioSource::buildConverter() [%p] failed to set converter complexity error==%4.4s, %ld",this,(char*)&err,(long int)err); return noErr; } - + AudioBufferList* CoreAudioSource::allocateAudioBufferList(UInt32 numChannels, UInt32 size) { AudioBufferList* list; @@ -495,7 +495,7 @@ AudioBufferList* CoreAudioSource::allocateAudioBufferList(UInt32 numChannels, UI list = (AudioBufferList*)calloc(1, sizeof(AudioBufferList) + numChannels * sizeof(AudioBuffer)); if(list == NULL) return NULL; - + list->mNumberBuffers = numChannels; for(UInt32 i = 0; i < numChannels; ++i) { list->mBuffers[i].mNumberChannels = 1; @@ -508,7 +508,7 @@ AudioBufferList* CoreAudioSource::allocateAudioBufferList(UInt32 numChannels, UI } return list; } - + void CoreAudioSource::destroyAudioBufferList(AudioBufferList* list) { DDebug(DebugAll,"CoreAudioSource::destroyAudioBufferList(list=%p) [%p]",list,this); @@ -527,12 +527,12 @@ void CoreAudioSource::sendData(AudioBufferList* buf) if (!buf) return; lock(); - for (unsigned int i = 0; i < m_outDevFormat.mChannelsPerFrame; i++) + for (unsigned int i = 0; i < m_outDevFormat.mChannelsPerFrame; i++) m_data.append(buf->mBuffers[i].mData,buf->mBuffers[i].mDataByteSize); XDebug(DebugAll,"CoreAudioSource::sendData(buffer=%p,buffer_length=%d), internal buffer length=%d [%p]",buf,(int)buf->mBuffers[0].mDataByteSize,m_data.length(),this); unlock(); } - + DataBlock CoreAudioSource::getData(UInt32 pkts) { // return to the converter a data block with the required size or the maximum available @@ -545,8 +545,8 @@ DataBlock CoreAudioSource::getData(UInt32 pkts) unlock(); return data; } - -OSStatus CoreAudioSource::inputCallback(void* inRefCon, AudioUnitRenderActionFlags* ioActionFlags, const AudioTimeStamp* inTimeStamp, + +OSStatus CoreAudioSource::inputCallback(void* inRefCon, AudioUnitRenderActionFlags* ioActionFlags, const AudioTimeStamp* inTimeStamp, UInt32 inBusNumber, UInt32 inNumberFrames, AudioBufferList* ioData) { CoreAudioSource* source = (CoreAudioSource*) inRefCon; @@ -555,11 +555,11 @@ OSStatus CoreAudioSource::inputCallback(void* inRefCon, AudioUnitRenderActionFla err = AudioUnitRender(source->fAudioUnit,ioActionFlags,inTimeStamp,inBusNumber,inNumberFrames,source->m_inAudioBuffer); if(err) Debug(DebugInfo,"CoreAudioSource::inputCallback() [%p] AudioUnitRender() failed with error=%4.4s, %ld",source,(char*)&err,(long int)err); - - source->sendData(source->m_inAudioBuffer); + + source->sendData(source->m_inAudioBuffer); return err; } - + void CoreAudioSource::run() { DataBlock frame; @@ -585,7 +585,7 @@ void CoreAudioSource::run() } frame.append(fillBufList.mBuffers[0].mData,outBuffSize * m_convertToFormat.mBytesPerPacket); } - + if (frame.length() >= FRAME_SIZE) { // we have enough data to send forward DataBlock data(frame.data(),FRAME_SIZE,false); @@ -599,14 +599,14 @@ void CoreAudioSource::run() delete [] (char*)fillBufList.mBuffers[0].mData; Debug(DebugAll,"CoreAudioSource [%p] end of data",this); } - + void CoreAudioSource::cleanup() { Debug(DebugAll,"CoreAudioSource [%p] cleanup, total=%u",this,m_total); AudioConverterDispose(m_audioConvert); ThreadedSource::cleanup(); } - + bool CoreAudioSource::control(NamedList& params) { DDebug(DebugAll,"CoreAudioSource::control() [%p]",this); @@ -650,8 +650,8 @@ bool CoreAudioSource::control(NamedList& params) return TelEngine::controlReturn(¶ms,false); return TelEngine::controlReturn(¶ms,setVolStatus); } - - + + CoreAudioConsumer::CoreAudioConsumer(unsigned int rate) : Mutex(false,"CoreAudioConsumer"), m_total(0), m_volSettable(false), m_channels(0), fOutputDevID(0), m_rate(rate) @@ -660,7 +660,7 @@ CoreAudioConsumer::CoreAudioConsumer(unsigned int rate) if (m_rate != DEFAULT_SAMPLE_RATE) m_format << "/" << m_rate; } - + CoreAudioConsumer::~CoreAudioConsumer() { Debug(DebugAll,"CoreAudioConsumer::~CoreAudioConsumer() [%p] total=%u",this,m_total); @@ -671,7 +671,7 @@ CoreAudioConsumer::~CoreAudioConsumer() if(err != noErr) Debug(DebugInfo,"CoreAudioConsumer::~CoreAudioConsumer() [%p] - Failed to uninitialize the AudioUnit error=%4.4s, %ld",this,(char*)&err,(long int)err); } - + bool CoreAudioConsumer::init() { OSStatus err = noErr; @@ -800,12 +800,12 @@ void CoreAudioConsumer::getData(AudioBufferList* buf) len = m_data.length(); if (len > 0) { ::memcpy(buf->mBuffers[0].mData,m_data.data(),len); - m_data.cut(-len); + m_data.cut(-len); } unlock(); } -OSStatus CoreAudioConsumer::outputCallback(void* inRefCon, AudioUnitRenderActionFlags* ioActionFlags, const AudioTimeStamp* inTimeStamp, +OSStatus CoreAudioConsumer::outputCallback(void* inRefCon, AudioUnitRenderActionFlags* ioActionFlags, const AudioTimeStamp* inTimeStamp, UInt32 inBusNumber, UInt32 inNumberFrames, AudioBufferList* ioData) { CoreAudioConsumer* dst = static_cast(inRefCon); @@ -816,7 +816,7 @@ OSStatus CoreAudioConsumer::outputCallback(void* inRefCon, AudioUnitRenderAction dst->getData(ioData); return noErr; } - + unsigned long CoreAudioConsumer::Consume(const DataBlock &data, unsigned long tStamp, unsigned long flags) { // append to the internal buffer received data @@ -828,7 +828,7 @@ unsigned long CoreAudioConsumer::Consume(const DataBlock &data, unsigned long tS unlock(); return invalidStamp(); } - + bool CoreAudioConsumer::control(NamedList& params) { DDebug(DebugAll,"CoreAudioConsumer::control() [%p]",this); @@ -871,7 +871,7 @@ bool CoreAudioConsumer::control(NamedList& params) return TelEngine::controlReturn(¶ms,setVolStatus); } - + CoreAudioChan::CoreAudioChan(const String& dev, unsigned int rate) : CallEndpoint("coreaudio"), m_dev(dev), m_rate(rate) @@ -879,7 +879,7 @@ CoreAudioChan::CoreAudioChan(const String& dev, unsigned int rate) Debug(DebugAll,"CoreAudioChan::CoreAudioChan ('%s') [%p]",dev.c_str(),this); s_audioChan = this; } - + CoreAudioChan::~CoreAudioChan() { Debug(DebugAll,"CoreAudioChan::~CoreAudioChan() [%p]",this); @@ -888,7 +888,7 @@ CoreAudioChan::~CoreAudioChan() setConsumer(); s_audioChan = 0; } - + bool CoreAudioChan::init() { CoreAudioSource* source = new CoreAudioSource(rate()); @@ -908,13 +908,13 @@ bool CoreAudioChan::init() cons->deref(); return true; } - + void CoreAudioChan::disconnected(bool final, const char *reason) { Debug(DebugInfo,"CoreAudioChan::disconnected() '%s' [%p]",reason,this); setTarget(); } - + void CoreAudioChan::answer() { Message* m = new Message("call.answered"); @@ -973,7 +973,7 @@ bool CoreAudioHandler::received(Message &msg) Debug(DebugInfo,"CoreAudio outgoing call not accepted!"); chan->destruct(); return false; - } + } const char *targ = msg.getValue("target"); if (!targ) { Debug(DebugWarn,"CoreAudio outgoing call with no target!"); @@ -1128,3 +1128,5 @@ bool CoreAudioPlugin::isBusy() const } }; // anonymous namespace + +/* vi: set ts=8 sw=4 sts=4 noet: */ diff --git a/modules/client/dsoundchan.cpp b/modules/client/dsoundchan.cpp index e5ca0dbb..382e9a7f 100644 --- a/modules/client/dsoundchan.cpp +++ b/modules/client/dsoundchan.cpp @@ -5,7 +5,7 @@ * DirectSound channel driver for Windows. * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -201,7 +201,7 @@ bool DSoundPlay::init() Debug(DebugGoOn,"Could not set the DirectSound cooperative level, code 0x%X",hr); return false; } - + // Set channel number depending data WORD nChannels = 1; DWORD nAvgBytesPerSec = 2 * m_rate; // nSamplesPerSec * nBlockAlign. @@ -643,7 +643,7 @@ unsigned long DSoundConsumer::Consume(const DataBlock &data, unsigned long tStam bool DSoundConsumer::control(NamedList& msg) { - if (m_dsound) + if (m_dsound) return m_dsound->control(msg); return false; } diff --git a/modules/client/jabberclient.cpp b/modules/client/jabberclient.cpp index 60724bbe..f9de899d 100644 --- a/modules/client/jabberclient.cpp +++ b/modules/client/jabberclient.cpp @@ -5,7 +5,7 @@ * Jabber Client module * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -597,7 +597,7 @@ static inline const String& getChildText(XmlElement& xml, const String& name, XmlElement* child = xml.findNextChild(start,&name); return child ? child->getText() : String::empty(); } - + // Add a child element text to a list of parameters static inline void addChildText(NamedList& list, XmlElement& parent, int tag, int ns, const char* param = 0, const String& prefix = String::empty(), bool emptyOk = false) @@ -1895,8 +1895,8 @@ void YJBEngine::processPresenceStanza(JBEvent* ev) unsigned int n = 0; XmlElement* ch = 0; while (0 != (ch = ev->element()->findNextChild(ch))) { - int tag = XmlTag::Count; - int ns = XMPPNamespace::Count; + int tag = XmlTag::Count; + int ns = XMPPNamespace::Count; XMPPUtils::getTag(*ch,tag,ns); // Known children in stream's namespace if (ns == ev->stream()->xmlns() && diff --git a/modules/client/osschan.cpp b/modules/client/osschan.cpp index 2cf1ba90..ed7472fc 100644 --- a/modules/client/osschan.cpp +++ b/modules/client/osschan.cpp @@ -3,11 +3,11 @@ * This file is part of the YATE Project http://YATE.null.ro * * Oss driver - * I have to thank you to Mark Spencer because some parts of the code have + * I have to thank you to Mark Spencer because some parts of the code have * been taken from chan_oss.c from asterisk. * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -339,7 +339,7 @@ bool OssChan::init() dev->deref(); if (!source->init()) { source->deref(); - return false; + return false; } setSource(source); source->deref(); @@ -347,8 +347,8 @@ bool OssChan::init() if (!cons->init()) { cons->deref(); setSource(); - return false; - } + return false; + } setConsumer(cons); cons->deref(); return true; @@ -537,7 +537,7 @@ bool OssHandler::received(Message &msg) Debug(DebugInfo,"OSS outgoing call not accepted!"); chan->destruct(); return false; - } + } const char *targ = msg.getValue("target"); if (!targ) { Debug(DebugWarn,"OSS outgoing call with no target!"); diff --git a/modules/conference.cpp b/modules/conference.cpp index 4e9476aa..e00d6604 100644 --- a/modules/conference.cpp +++ b/modules/conference.cpp @@ -5,7 +5,7 @@ * Conference room data mixer * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * N-way mixing with self echo suppresion idea by Andrew McDonald * diff --git a/modules/enumroute.cpp b/modules/enumroute.cpp index a094ecf2..e6ad12ec 100644 --- a/modules/enumroute.cpp +++ b/modules/enumroute.cpp @@ -5,7 +5,7 @@ * ENUM routing module * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/modules/extmodule.cpp b/modules/extmodule.cpp index a4007946..aa57f54b 100644 --- a/modules/extmodule.cpp +++ b/modules/extmodule.cpp @@ -5,7 +5,7 @@ * External module handler * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * Portions copyright (C) 2005 Maciek Kaminski * * This software is distributed under multiple licenses; @@ -1050,7 +1050,7 @@ bool ExtModReceiver::create(const char *script, const char *args) else ::close(STDERR_FILENO+2); // Blindly close everything but stdin/out/err/audio - for (x=STDERR_FILENO+3;x<1024;x++) + for (x=STDERR_FILENO+3;x<1024;x++) ::close(x); // Execute script if (debugAt(DebugInfo)) diff --git a/modules/faxchan.cpp b/modules/faxchan.cpp index 3ad1382b..d90283f0 100644 --- a/modules/faxchan.cpp +++ b/modules/faxchan.cpp @@ -4,13 +4,13 @@ * * This module is based on SpanDSP (a series of DSP components for telephony), * written by Steve Underwood . - * + * * This great software can be found at http://soft-switch.org/ - * + * * Fax driver (transmission+receiving) * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/modules/fileinfo.cpp b/modules/fileinfo.cpp index 0e13c068..b903c193 100644 --- a/modules/fileinfo.cpp +++ b/modules/fileinfo.cpp @@ -5,7 +5,7 @@ * File info holder * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2013 Null Team + * Copyright (C) 2013-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -601,7 +601,7 @@ FIFile* FIDirectory::internalAddFile(FIFileData* fd, const String& fn) DDebug(&__plugin,DebugInfo, "Dir(%s) can't add file '%s': a non-file item already in the list [%p]", name().c_str(),fn.c_str(),this); - + } return f; } diff --git a/modules/filetransfer.cpp b/modules/filetransfer.cpp index 5fa6bafd..aff58177 100644 --- a/modules/filetransfer.cpp +++ b/modules/filetransfer.cpp @@ -5,7 +5,7 @@ * File transfer Driver * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/modules/gsmcodec.cpp b/modules/gsmcodec.cpp index 697ceda5..62e4d673 100644 --- a/modules/gsmcodec.cpp +++ b/modules/gsmcodec.cpp @@ -5,7 +5,7 @@ * GSM 6.10 codec using libgsm * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/modules/gvoice.cpp b/modules/gvoice.cpp index 78e08298..e674e977 100644 --- a/modules/gvoice.cpp +++ b/modules/gvoice.cpp @@ -5,7 +5,7 @@ * Google Voice(TM) auxiliary module - send DTMF on answer * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2012-2013 Null Team + * Copyright (C) 2012-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/modules/h323chan.cpp b/modules/h323chan.cpp index f9a5b2b2..a245961c 100644 --- a/modules/h323chan.cpp +++ b/modules/h323chan.cpp @@ -2,16 +2,16 @@ * h323chan.cpp * This file is part of the YATE Project http://YATE.null.ro * - * As a special exception to the GNU General Public License, permission is - * granted for additional uses of the text contained in this release of Yate + * As a special exception to the GNU General Public License, permission is + * granted for additional uses of the text contained in this release of Yate * as noted here. * This exception is that permission is hereby granted to link Yate with the * OpenH323 and PWLIB runtime libraries to produce an executable image. - * + * * H.323 channel * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -413,7 +413,7 @@ public: : m_exit(false) { Debug(&hplugin,DebugAll,"YateH323AudioSource::YateH323AudioSource() [%p]",this); } ~YateH323AudioSource(); - virtual BOOL Close(); + virtual BOOL Close(); virtual BOOL IsOpen() const; virtual BOOL Write(const void *buf, PINDEX len); private: @@ -431,7 +431,7 @@ public: : Mutex(false,"YateH323AudioConsumer"), m_exit(false) { Debug(&hplugin,DebugAll,"YateH323AudioConsumer::YateH323AudioConsumer() [%p]",this); } ~YateH323AudioConsumer(); - virtual BOOL Close(); + virtual BOOL Close(); virtual BOOL IsOpen() const; virtual BOOL Read(void *buf, PINDEX len); virtual unsigned long Consume(const DataBlock &data, unsigned long tStamp, unsigned long flags); @@ -1333,7 +1333,7 @@ void YateH323EndPoint::setCodecs() num = GetCapabilities().GetSize() - init; } if (num) - added.append(String((int)num)," ") << ": " << tmp; + added.append(String((int)num)," ") << ": " << tmp; else failed.append("'"," ") << tmp << "'"; } @@ -1556,7 +1556,7 @@ bool YateH323EndPoint::removeGk(bool wait) bool YateH323EndPoint::checkListener(const NamedList* params, bool& changed) { changed = false; - // Setup the listener if we don't have one or bind address changed + // Setup the listener if we don't have one or bind address changed int port = 1720; String a; if (params) { @@ -2293,7 +2293,7 @@ void YateH323Connection::OnSetLocalCapabilities() adjustCapabilities(); } -BOOL YateH323Connection::OnStartLogicalChannel(H323Channel & channel) +BOOL YateH323Connection::OnStartLogicalChannel(H323Channel & channel) { DDebug(this,DebugInfo,"YateH323Connection::OnStartLogicalChannel(%p) [%p]",&channel,this); if (!(m_chan && m_chan->alive())) @@ -2480,13 +2480,13 @@ unsigned int YateH323Connection::fixQ931Cause() const YateH323_ExternalRTPChannel::YateH323_ExternalRTPChannel( YateH323Connection& connection, const H323Capability& capability, - Directions direction, - unsigned sessionID, - const PIPSocket::Address& ip, + Directions direction, + unsigned sessionID, + const PIPSocket::Address& ip, WORD dataPort) : H323_ExternalRTPChannel(connection, capability, direction, sessionID, ip, dataPort), m_conn(&connection) -{ +{ DDebug(m_conn,DebugAll,"YateH323_ExternalRTPChannel::YateH323_ExternalRTPChannel %s addr=%s:%u [%p]", lookup(GetDirection(),dict_h323_dir), (const char *)ip.AsString(), dataPort,this); SetExternalAddress(H323TransportAddress(ip, dataPort), H323TransportAddress(ip, dataPort+1)); @@ -2677,7 +2677,7 @@ H323GatekeeperCall* YateGatekeeperServer::CreateCall(const OpalGloballyUniqueID& H323GatekeeperRequest::Response YateGatekeeperServer::OnRegistration(H323GatekeeperRRQ& request) { int i = H323GatekeeperServer::OnRegistration(request); - if (i == H323GatekeeperRequest::Confirm) { + if (i == H323GatekeeperRequest::Confirm) { PString alias,r; String ips; for (int j = 0; j < request.rrq.m_terminalAlias.GetSize(); j++) { @@ -2735,10 +2735,10 @@ BOOL YateGatekeeperServer::TranslateAliasAddressToSignalAddress(const H225_Alias Engine::dispatch(m); String s = m.retValue(); if (s) { - /** + /** * Here we have 2 cases, first is handle when the call have to be send - * to endpoint (if the call is to another yate channel, or is h323 - * proxied), or if has to be send to another gatekeeper we find out + * to endpoint (if the call is to another yate channel, or is h323 + * proxied), or if has to be send to another gatekeeper we find out * from the driver parameter */ if ((m.getParam("driver")) && (*(m.getParam("driver")) == "h323")) { @@ -3437,7 +3437,7 @@ bool H323Driver::commandComplete(Message& msg, const String& partLine, const Str String overviewCmd = s_statusCmd + " overview " + name(); if (partLine == cmd || partLine == overviewCmd) itemComplete(msg.retValue(),"accounts",partWord); - else + else return Driver::commandComplete(msg,partLine,partWord); return false; } @@ -3466,7 +3466,7 @@ void H323Driver::msgStatus(Message& msg) str << (const char*)ep->GetLocalUserName() << "|"; str << (ep->IsRegisteredWithGatekeeper() ? "registered" : "not-registered"); } - msg.retValue().append(str,";"); + msg.retValue().append(str,";"); msg.retValue() << "\r\n"; return; } diff --git a/modules/ilbccodec.cpp b/modules/ilbccodec.cpp index f028acf4..c6cbe538 100644 --- a/modules/ilbccodec.cpp +++ b/modules/ilbccodec.cpp @@ -3,9 +3,9 @@ * This file is part of the YATE Project http://YATE.null.ro * * iLBC codec using iLBC library. - * + * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * iLBC codec has been created based on the code sent by Faizan Naqvi (Tili) * diff --git a/modules/ilbcwebrtc.cpp b/modules/ilbcwebrtc.cpp index 1bfac5f5..104d22ea 100644 --- a/modules/ilbcwebrtc.cpp +++ b/modules/ilbcwebrtc.cpp @@ -3,9 +3,9 @@ * This file is part of the YATE Project http://YATE.null.ro * * iLBC codec using iLBC library based on WebRTC project. - * + * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2012-2013 Null Team + * Copyright (C) 2012-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/modules/isaccodec.cpp b/modules/isaccodec.cpp index f6ab7b85..ad6f8fde 100644 --- a/modules/isaccodec.cpp +++ b/modules/isaccodec.cpp @@ -3,9 +3,9 @@ * This file is part of the YATE Project http://YATE.null.ro * * iSAC codec using iSAC library based on WebRTC project. - * + * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2011-2013 Null Team + * Copyright (C) 2011-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -386,7 +386,7 @@ bool iSACCodec::isacInit() res = WebRtcIsac_EncoderInit(m_isac,m_mode); WebRtcIsac_SetEncSampRate(m_isac,sampleRate == 16000 ? kIsacWideband : kIsacSuperWideband); #endif - + if (sampleRate == 16000) { m_outData.assign(0,400); m_encodeChunk = 320; diff --git a/modules/jabber/jabberserver.cpp b/modules/jabber/jabberserver.cpp index a5f90784..0d4d6252 100644 --- a/modules/jabber/jabberserver.cpp +++ b/modules/jabber/jabberserver.cpp @@ -5,7 +5,7 @@ * Jabber Server module * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/modules/jabber/jbfeatures.cpp b/modules/jabber/jbfeatures.cpp index 5a0eaa5c..461a446c 100644 --- a/modules/jabber/jbfeatures.cpp +++ b/modules/jabber/jbfeatures.cpp @@ -5,7 +5,7 @@ * Jabber features module * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/modules/javascript.cpp b/modules/javascript.cpp index 4cabdb54..16d98476 100644 --- a/modules/javascript.cpp +++ b/modules/javascript.cpp @@ -5,7 +5,7 @@ * Javascript channel support based on libyscript * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2011-2013 Null Team + * Copyright (C) 2011-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/modules/moh.cpp b/modules/moh.cpp index db117147..a0cf6ea3 100644 --- a/modules/moh.cpp +++ b/modules/moh.cpp @@ -5,7 +5,7 @@ * On hold (music) generator * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -19,13 +19,13 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. */ -/** - * Hybrid of tonegen and extmodule. Module for playing music from external - * processes. Data is read from shell processes started by commands defined - * in configuration file. Data sources based on external processes are - * shared by DataEndpoints so number of external processes is limited +/** + * Hybrid of tonegen and extmodule. Module for playing music from external + * processes. Data is read from shell processes started by commands defined + * in configuration file. Data sources based on external processes are + * shared by DataEndpoints so number of external processes is limited * by number of entries in configuration file. - * Compiled from tonegen.cpp and extmodule.cpp + * Compiled from tonegen.cpp and extmodule.cpp * by Maciek Kaminski (maciejka_at_tiger.com.pl) */ @@ -217,7 +217,7 @@ bool MOHSource::create() /* Close stdin */ //::close(STDIN_FILENO); /* Close everything but stdin/out/ */ - for (x=STDERR_FILENO+1;x<1024;x++) + for (x=STDERR_FILENO+1;x<1024;x++) ::close(x); /* Execute script */ if (debugAt(DebugInfo)) diff --git a/modules/msgsniff.cpp b/modules/msgsniff.cpp index 256926f0..2e431a6c 100644 --- a/modules/msgsniff.cpp +++ b/modules/msgsniff.cpp @@ -5,7 +5,7 @@ * A sample message sniffer that inserts a wildcard message handler * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/modules/mux.cpp b/modules/mux.cpp index 2f58a0b9..4c5a760f 100644 --- a/modules/mux.cpp +++ b/modules/mux.cpp @@ -5,7 +5,7 @@ * Data multiplex * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/modules/openssl.cpp b/modules/openssl.cpp index b84e376e..619c1083 100644 --- a/modules/openssl.cpp +++ b/modules/openssl.cpp @@ -5,7 +5,7 @@ * OpenSSL based SSL/TLS socket support * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/modules/pbx.cpp b/modules/pbx.cpp index 6680f653..1052614f 100644 --- a/modules/pbx.cpp +++ b/modules/pbx.cpp @@ -5,7 +5,7 @@ * Basic PBX message handlers * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/modules/qt4/clientarchive.cpp b/modules/qt4/clientarchive.cpp index e0f7f8ad..9256ec3d 100644 --- a/modules/qt4/clientarchive.cpp +++ b/modules/qt4/clientarchive.cpp @@ -2,7 +2,7 @@ * clientarchive.cpp * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * Client archive management and UI logic * @@ -122,7 +122,7 @@ public: QString m_search; // QString to be used when searching }; -// A contact's chat (including the file) +// A contact's chat (including the file) class ChatFile : public Mutex, public RefObject { friend class ChatArchive; @@ -1440,7 +1440,7 @@ bool CALogic::select(Window* wnd, const String& name, const String& item, } return false; } - + bool CALogic::toggle(Window* wnd, const String& name, bool active) { // Search options @@ -1963,7 +1963,7 @@ void CASearchThread::searchAll(const String& what) m_currentSession = o->get()->toString(); } if (m_currentSession) - found = searchContact(f,what,changed); + found = searchContact(f,what,changed); TelEngine::destruct(f); if (found) break; diff --git a/modules/qt4/clientarchive.h b/modules/qt4/clientarchive.h index 9b84deb3..fb91957f 100644 --- a/modules/qt4/clientarchive.h +++ b/modules/qt4/clientarchive.h @@ -2,7 +2,7 @@ * clientarchive.h * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * Client archive management and UI logic * diff --git a/modules/qt4/customtable.cpp b/modules/qt4/customtable.cpp index acb2bc21..977f7df7 100644 --- a/modules/qt4/customtable.cpp +++ b/modules/qt4/customtable.cpp @@ -5,7 +5,7 @@ * Custom table implementation * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2010-2013 Null Team + * Copyright (C) 2010-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -98,7 +98,7 @@ CustomTable::CustomTable(const char *name, const NamedList& params, QWidget* par for (int i = 0; i < n; i++) { String id = objListItem(cols,i); String text = objListItem(title,i); - if (!text) { + if (!text) { String tmp = id; if (!emptyTitle->find(tmp.toLower())) text = id; diff --git a/modules/qt4/customtable.h b/modules/qt4/customtable.h index ca7a46ec..50df9818 100644 --- a/modules/qt4/customtable.h +++ b/modules/qt4/customtable.h @@ -5,7 +5,7 @@ * A custom table * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/modules/qt4/customtext.cpp b/modules/qt4/customtext.cpp index aa1e2762..92abe323 100644 --- a/modules/qt4/customtext.cpp +++ b/modules/qt4/customtext.cpp @@ -5,7 +5,7 @@ * Custom text edit objects * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2010-2013 Null Team + * Copyright (C) 2010-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/modules/qt4/customtext.h b/modules/qt4/customtext.h index d895baf2..f399118a 100644 --- a/modules/qt4/customtext.h +++ b/modules/qt4/customtext.h @@ -5,7 +5,7 @@ * Custom text edit objects * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/modules/qt4/customtree.cpp b/modules/qt4/customtree.cpp index 3080796d..7cb3a595 100644 --- a/modules/qt4/customtree.cpp +++ b/modules/qt4/customtree.cpp @@ -5,7 +5,7 @@ * Custom QtTree based objects * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2010-2013 Null Team + * Copyright (C) 2010-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -131,7 +131,7 @@ static inline void setSize(QSize& size, const String& s) // Utility: compare strings // return -1 if s1 < s2, 0 if s1 == s2, 1 if s1 > s2 -static inline int compareStr(const QString& s1, const QString& s2, +static inline int compareStr(const QString& s1, const QString& s2, Qt::CaseSensitivity cs) { if (cs == Qt::CaseSensitive) { @@ -564,7 +564,7 @@ QtCustomTree::QtCustomTree(const char* name, const NamedList& params, QWidget* p for (ObjList* o = id->skipNull(); o; o = o->skipNext(), n++) { String* name = static_cast(o->get()); String caption = objListItem(title,n); - if (!caption) { + if (!caption) { String tmp = *name; if (!emptyTitle->find(tmp.toLower())) caption = *name; @@ -1358,7 +1358,7 @@ void QtCustomTree::addChildren(QList list, int pos, QtTreeItem if (!item) continue; setupItem(item); - itemAdded(*item,parent); + itemAdded(*item,parent); } } @@ -2047,7 +2047,7 @@ void QtCustomTree::applyItemTooltip(QtTreeItem& item, QtTreeItemProps* p) return; String tooltip = p->m_toolTip; item.replaceParams(tooltip); - for (int n = columnCount() - 1; n >= 0; n--) + for (int n = columnCount() - 1; n >= 0; n--) item.setToolTip(n,QtClient::setUtf8(tooltip)); } @@ -3406,7 +3406,7 @@ void FileListTree::resetThread() // QtPaintItemDesc // QtPaintButtonDesc* QtPaintItemDesc::button() -{ +{ return 0; } @@ -3415,7 +3415,7 @@ QtPaintButtonDesc* QtPaintItemDesc::button() // QtPaintButtonDesc // QtPaintButtonDesc* QtPaintButtonDesc::button() -{ +{ return this; } diff --git a/modules/qt4/customtree.h b/modules/qt4/customtree.h index dffdda89..a63ac65e 100644 --- a/modules/qt4/customtree.h +++ b/modules/qt4/customtree.h @@ -5,7 +5,7 @@ * Custom QtTree based objects * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -47,7 +47,7 @@ class QtHtmlItemDelegate; // Custom HTML item delegate typedef QList QtTreeItemList; typedef QPair QtTreeItemKey; -typedef QPair QtTokenDict; +typedef QPair QtTokenDict; /** @@ -106,7 +106,7 @@ public: * @param pos Position to set * @param params Parameter list */ - void setPen(Position pos, const NamedList& params); + void setPen(Position pos, const NamedList& params); /** * Draw the borders @@ -202,7 +202,7 @@ public: */ void setUrlBuilder(const String& fmt = String::empty(), const String& queryParams = String::empty()); - + /** * Build MIME data for a list of items * @param item The list @@ -1855,7 +1855,7 @@ public: * @param type File item type * @param name File name * @param path File path - * @param prov Optional file icon provider + * @param prov Optional file icon provider */ FileItem(int type, const char* name, const String& path, QFileIconProvider* prov = 0); @@ -1863,7 +1863,7 @@ public: /** * Constructor. Build a FileListTree up directory * @param path The path - * @param prov Optional file icon provider + * @param prov Optional file icon provider */ FileItem(const String& path, QFileIconProvider* prov = 0); @@ -2091,7 +2091,7 @@ protected: bool m_listFiles; // List files in current directory int m_sort; // Sort files int m_listOnFailure; // What to list when fails current directory - QFileIconProvider* m_iconProvider; // The icon provider + QFileIconProvider* m_iconProvider; // The icon provider String m_nameParam; // Item name column String m_fsPath; // Current path QThread* m_dirListThread; // Dir list thread diff --git a/modules/qt4/updater.cpp b/modules/qt4/updater.cpp index f0ed08f7..1b7aef82 100644 --- a/modules/qt4/updater.cpp +++ b/modules/qt4/updater.cpp @@ -5,7 +5,7 @@ * Auto updater logic and downloader for Qt-4 clients. * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/modules/qt4/updater.h b/modules/qt4/updater.h index 22b1d465..8383c184 100644 --- a/modules/qt4/updater.h +++ b/modules/qt4/updater.h @@ -5,7 +5,7 @@ * Auto updater logic and downloader for Qt-4 clients. * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/modules/qt4/widgetlist.cpp b/modules/qt4/widgetlist.cpp index 57a51d44..f6869eca 100644 --- a/modules/qt4/widgetlist.cpp +++ b/modules/qt4/widgetlist.cpp @@ -5,7 +5,7 @@ * Custom widget list objects * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2010-2013 Null Team + * Copyright (C) 2010-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/modules/qt4/widgetlist.h b/modules/qt4/widgetlist.h index c5910343..128b9e53 100644 --- a/modules/qt4/widgetlist.h +++ b/modules/qt4/widgetlist.h @@ -5,7 +5,7 @@ * Custom widget list objects * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/modules/regexroute.cpp b/modules/regexroute.cpp index a4ff8e4a..7b391e9e 100644 --- a/modules/regexroute.cpp +++ b/modules/regexroute.cpp @@ -5,7 +5,7 @@ * Regular expressions based routing * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/modules/rmanager.cpp b/modules/rmanager.cpp index 10dc619e..e717507e 100644 --- a/modules/rmanager.cpp +++ b/modules/rmanager.cpp @@ -6,7 +6,7 @@ * administrating interface. * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -1375,7 +1375,7 @@ bool Connection::processLine(const char *line, bool saveLine) str = "all calls"; } else - m.addParam("id",str); + m.addParam("id",str); if (reason) m.addParam("reason",reason); putConnInfo(m); diff --git a/modules/server/accfile.cpp b/modules/server/accfile.cpp index ba798c11..2588abb4 100644 --- a/modules/server/accfile.cpp +++ b/modules/server/accfile.cpp @@ -5,7 +5,7 @@ * Account provider for client registrations and settings. * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/modules/server/analog.cpp b/modules/server/analog.cpp index 958e6bf1..537899f9 100644 --- a/modules/server/analog.cpp +++ b/modules/server/analog.cpp @@ -5,7 +5,7 @@ * Yet Another Analog Channel * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -243,7 +243,7 @@ public: void evDialComplete(); // Line polarity change notification // Terminate call if: - // - no line or line is not FXO, + // - no line or line is not FXO, // - Outgoing: don't answer on polarity or already answered and should hangup on polarity change // - Incoming: don't answer on polarity or polarity already changed and should hangup on polarity change // Outgoing: don't answer on polarity or already answered: call outCallAnswered() @@ -1856,7 +1856,7 @@ void AnalogChannel::evDialComplete() // Line polarity change notification // Terminate call if: -// - no line or line is not FXO, +// - no line or line is not FXO, // - Outgoing: don't answer on polarity or already answered and should hangup on polarity change // - Incoming: don't answer on polarity or polarity already changed and should hangup on polarity change void AnalogChannel::evPolarity() diff --git a/modules/server/analogdetect.cpp b/modules/server/analogdetect.cpp index 99603b4a..aa1fc3e9 100644 --- a/modules/server/analogdetect.cpp +++ b/modules/server/analogdetect.cpp @@ -5,7 +5,7 @@ * Analog data detector * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/modules/server/cache.cpp b/modules/server/cache.cpp index 254e3715..d23e9122 100644 --- a/modules/server/cache.cpp +++ b/modules/server/cache.cpp @@ -5,7 +5,7 @@ * Cache implementation * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/modules/server/callcounters.cpp b/modules/server/callcounters.cpp index 42e522d6..59c876df 100644 --- a/modules/server/callcounters.cpp +++ b/modules/server/callcounters.cpp @@ -5,7 +5,7 @@ * Count active call legs per user defined context * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/modules/server/ccongestion.cpp b/modules/server/ccongestion.cpp index 812acda8..d1e8ee53 100644 --- a/modules/server/ccongestion.cpp +++ b/modules/server/ccongestion.cpp @@ -5,7 +5,7 @@ * Update call accept engine status from installed engine's monitors * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/modules/server/ciscosm.cpp b/modules/server/ciscosm.cpp index b3bd1ca5..63b5e8ec 100644 --- a/modules/server/ciscosm.cpp +++ b/modules/server/ciscosm.cpp @@ -1,11 +1,11 @@ /** * ciscosm.cpp - * This file is part of the YATE Project http://YATE.null.ro + * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Signalling Stack - implements the support for SS7 * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -193,7 +193,7 @@ private: u_int8_t m_retransCounter; // The maximum number of retransmissions u_int8_t m_maxCumAck; // The maximum number of segments received without being confirmed u_int8_t m_queueCount; // The last number of messages from list known by rudp thread - unsigned int m_wrongChecksum; // Counter how keeps the number of packets + unsigned int m_wrongChecksum; // Counter how keeps the number of packets // received with wrong checksum static const TokenDict s_RudpStates[]; RudpState m_state; // Rudp state @@ -323,7 +323,7 @@ public: // these are the only error code known at this time }; enum State { - Configured, // SLT layer has sent the configuration pdu and received the + Configured, // SLT layer has sent the configuration pdu and received the // confirmation Waiting, // SLT layer has sent the configuration pdu but hasn't received // the confirmation @@ -657,7 +657,7 @@ void RudpSocket::checkTimeouts(u_int64_t time) } } -// Verify if exist any new data in the queue and transmit all data +// Verify if exist any new data in the queue and transmit all data // with sequence number > last sent and <= actual sequence number bool RudpSocket::checkData(bool force) { @@ -694,7 +694,7 @@ bool RudpSocket::checkData(bool force) // Method called from checkTimeouts // Retransmits all data with sequence number between last data confirmed and current sequence number -// increment retransmission counter and if reach the maximum retransmission counter notify the +// increment retransmission counter and if reach the maximum retransmission counter notify the // session manager and initiate reset void RudpSocket::retransData() { diff --git a/modules/server/clustering.cpp b/modules/server/clustering.cpp index 8beee210..d3caaff4 100644 --- a/modules/server/clustering.cpp +++ b/modules/server/clustering.cpp @@ -5,7 +5,7 @@ * Clustering server support. * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/modules/server/cpuload.cpp b/modules/server/cpuload.cpp index c2430451..9a6edd4d 100644 --- a/modules/server/cpuload.cpp +++ b/modules/server/cpuload.cpp @@ -5,7 +5,7 @@ * Monitor CPU load and inform YATE about it * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -31,7 +31,7 @@ class Cpu { public: Cpu(); - inline virtual ~Cpu() {} + inline virtual ~Cpu() {} // Default implementation updates system load from "/proc/stat" inline virtual int getSystemLoad() { @@ -52,7 +52,7 @@ public: { return (m_loadYS + 50) / 100; } inline int getSLoad() { return m_loadSystem < 0? m_loadSystem : (m_loadSystem + 50) / 100; } - + protected: u_int64_t m_yateUser; // Yate last time counter spend in user mode u_int64_t m_yateSystem; // Yate last time counter spent in kernel mode @@ -866,7 +866,7 @@ int CpuStat::getSystemLoad() loading = ((loading *100) * (1000 / user_hz)) / t; loading /= m_coreNumber; m_loadSystem = (100 - s_smooth) * m_loadSystem/100 + s_smooth*loading; - } else + } else m_loadSystem = 0; m_sysUser = user; m_sysNice = nice; diff --git a/modules/server/dbpbx.cpp b/modules/server/dbpbx.cpp index 145924b5..b773a25f 100644 --- a/modules/server/dbpbx.cpp +++ b/modules/server/dbpbx.cpp @@ -5,7 +5,7 @@ * PBX, IVR and multi routing from a database. * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/modules/server/dbwave.cpp b/modules/server/dbwave.cpp index 1db1729a..0ff5b3f1 100644 --- a/modules/server/dbwave.cpp +++ b/modules/server/dbwave.cpp @@ -5,7 +5,7 @@ * Wave record+playback helper for database storage, uses wavefile * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/modules/server/eventlogs.cpp b/modules/server/eventlogs.cpp index 49769048..63129ad7 100644 --- a/modules/server/eventlogs.cpp +++ b/modules/server/eventlogs.cpp @@ -5,7 +5,7 @@ * Write the events and alerts to text log files * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2012-2013 Null Team + * Copyright (C) 2012-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/modules/server/heartbeat.cpp b/modules/server/heartbeat.cpp index 1cdc77ad..eeec0de5 100644 --- a/modules/server/heartbeat.cpp +++ b/modules/server/heartbeat.cpp @@ -5,7 +5,7 @@ * Linux-HA compatible heartbeat module * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/modules/server/lateroute.cpp b/modules/server/lateroute.cpp index adbf30e0..ebc0128b 100644 --- a/modules/server/lateroute.cpp +++ b/modules/server/lateroute.cpp @@ -5,7 +5,7 @@ * Last chance routing in call.execute and msg.execute messages. * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/modules/server/lksctp.cpp b/modules/server/lksctp.cpp index 7bd1a0a8..2568bb47 100644 --- a/modules/server/lksctp.cpp +++ b/modules/server/lksctp.cpp @@ -5,7 +5,7 @@ * SCTP sockets provider based on Linux Kernel SCTP * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2009-2013 Null Team + * Copyright (C) 2009-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/modules/server/mgcpca.cpp b/modules/server/mgcpca.cpp index 761d8219..01d4e8be 100644 --- a/modules/server/mgcpca.cpp +++ b/modules/server/mgcpca.cpp @@ -6,7 +6,7 @@ * for other protocols * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/modules/server/mgcpgw.cpp b/modules/server/mgcpgw.cpp index eef70d13..a2793913 100644 --- a/modules/server/mgcpgw.cpp +++ b/modules/server/mgcpgw.cpp @@ -5,7 +5,7 @@ * Media Gateway Control Protocol - Gateway component * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/modules/server/monitoring.cpp b/modules/server/monitoring.cpp index 80e007e8..a3ad80fe 100644 --- a/modules/server/monitoring.cpp +++ b/modules/server/monitoring.cpp @@ -5,7 +5,7 @@ * Module for monitoring and gathering information about YATE. * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -1694,8 +1694,8 @@ Cache::~Cache() } bool Cache::load() -{ - return false; +{ + return false; } // discard cached data @@ -2842,7 +2842,7 @@ void RTPTable::reconfigure(const NamedList* cfg) } m_rtpMtx.unlock(); - m_resetTime = Time::secNow() + m_resetInterval; + m_resetTime = Time::secNow() + m_resetInterval; } // update an entry @@ -2923,7 +2923,7 @@ CallRouteQoS::CallRouteQoS(const String direction, const NamedList* cfg) m_minCalls = 1; m_minASR = m_maxASR = m_minNER = -1; - if (cfg) + if (cfg) updateConfig(cfg); m_index = 0; } @@ -3683,7 +3683,7 @@ void Monitor::readConfig(const Configuration& cfg) for (ObjList* o = m_sipMonitoredGws->skipNull(); o; o = o->skipNext()) { String* addr = static_cast(o->get()); int pos = addr->find(":"); - if (pos == -1) + if (pos == -1) addr->append(":" + String(SIP_PORT)); else { String tmp = addr->substr(pos+1); @@ -3698,7 +3698,7 @@ void Monitor::readConfig(const Configuration& cfg) s_sipInfo.reset = cfg.getIntValue("sip","reset_time",0); if (s_sipInfo.reset) s_sipInfo.resetTime = Time::secNow() + s_sipInfo.reset; - + // read SS7 monitoring bool sigEnable = cfg.getBoolValue("sig","monitor",false); m_trunkMon = cfg.getBoolValue("sig","trunk",sigEnable); @@ -4061,4 +4061,5 @@ bool Monitor::verifyGateway(const String& address) } }; + /* vi: set ts=8 sw=4 sts=4 noet: */ diff --git a/modules/server/mrcpspeech.cpp b/modules/server/mrcpspeech.cpp index a1bf76b9..ae420e42 100644 --- a/modules/server/mrcpspeech.cpp +++ b/modules/server/mrcpspeech.cpp @@ -5,7 +5,7 @@ * Detector and synthesizer for voice and tones using a MRCP v2 server * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -45,7 +45,7 @@ class MrcpConsumer : public DataConsumer YCLASS(MrcpConsumer,DataConsumer) public: MrcpConsumer(const String& id, const char* target, const char* format = 0); - virtual ~MrcpConsumer(); + virtual ~MrcpConsumer(); virtual bool setFormat(const DataFormat& format); virtual unsigned long Consume(const DataBlock& data, unsigned long tStamp, unsigned long flags); bool init(Message& msg); @@ -108,7 +108,7 @@ public: MrcpConsumer::MrcpConsumer(const String& id, const char* target, const char* format) : DataConsumer(format), m_source(0), m_chan(0), m_id(id) -{ +{ s_mutex.lock(); s_count++; s_mutex.unlock(); diff --git a/modules/server/mysqldb.cpp b/modules/server/mysqldb.cpp index 6ac5eb0a..dbf0d0b6 100644 --- a/modules/server/mysqldb.cpp +++ b/modules/server/mysqldb.cpp @@ -5,7 +5,7 @@ * This is the MySQL support from Yate. * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -198,7 +198,7 @@ public: virtual bool received(Message& msg, int id); InitThread* m_initThread; inline void startInitThread() - { + { lock(); if (!m_initThread) (m_initThread = new InitThread())->startup(); @@ -234,7 +234,7 @@ public: inline bool finished() { return m_finished; } - inline void setFinished() + inline void setFinished() { m_finished = true; if (!m_msg) destruct(); @@ -453,7 +453,7 @@ MyAcct::MyAcct(const NamedList* sect) Debug(&module, DebugNote, "For account '%s' connection pool size is %d", c_str(),m_poolSize); - + m_retryTime = sect->getIntValue("initretry",10); // default value is 10 seconds setRetryWhen(); // set retry interval } @@ -469,12 +469,12 @@ MyAcct::~MyAcct() int MyAcct::initConns() { int count = m_connections.count(); - + DDebug(&module,DebugInfo,"MyAcct::initConns() - %d connections initialized already, pool required is of %d connections for '%s'", count,m_poolSize,c_str()); // set new retry interval setRetryWhen(); - + for (int i = count; i < m_poolSize; i++) { MyConn* mySqlConn = new MyConn(toString() + "." + String(i), this); diff --git a/modules/server/park.cpp b/modules/server/park.cpp index 76f95c89..143090de 100644 --- a/modules/server/park.cpp +++ b/modules/server/park.cpp @@ -5,7 +5,7 @@ * Call parking module * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/modules/server/pbxassist.cpp b/modules/server/pbxassist.cpp index 792874b0..622768d7 100644 --- a/modules/server/pbxassist.cpp +++ b/modules/server/pbxassist.cpp @@ -5,7 +5,7 @@ * PBX assist module * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * Author: Monica Tepelus * * This software is distributed under multiple licenses; diff --git a/modules/server/pgsqldb.cpp b/modules/server/pgsqldb.cpp index b40ff06d..c8455c0b 100644 --- a/modules/server/pgsqldb.cpp +++ b/modules/server/pgsqldb.cpp @@ -5,7 +5,7 @@ * This is the PostgreSQL support from Yate. * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -244,7 +244,7 @@ bool PgConn::initDbInternal(int retry) c_str(),m_account); } } - + } else { fatal = true; @@ -676,6 +676,7 @@ void PgModule::genUpdate(Message& msg) s_conmutex.unlock(); msg.setParam("count",String(index)); } + }; // anonymous namespace /* vi: set ts=8 sw=4 sts=4 noet: */ diff --git a/modules/server/presence.cpp b/modules/server/presence.cpp index 96508325..ce64eb04 100644 --- a/modules/server/presence.cpp +++ b/modules/server/presence.cpp @@ -5,7 +5,7 @@ * Presence module * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -884,7 +884,7 @@ bool PresenceModule::queryDB(String id, String instance) { if (TelEngine::null(id)) return false; - NamedList queryList(""); + NamedList queryList(""); String query; queryList.addParam("contact", id); if (TelEngine::null(instance)) diff --git a/modules/server/queues.cpp b/modules/server/queues.cpp index 31a7482f..b274712b 100644 --- a/modules/server/queues.cpp +++ b/modules/server/queues.cpp @@ -5,7 +5,7 @@ * Call distribution and queues with settings from a database. * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/modules/server/queuesnotify.cpp b/modules/server/queuesnotify.cpp index 6f1413a6..12f7d591 100644 --- a/modules/server/queuesnotify.cpp +++ b/modules/server/queuesnotify.cpp @@ -6,7 +6,7 @@ * when their status changes * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/modules/server/regfile.cpp b/modules/server/regfile.cpp index d487e793..6d87fe08 100644 --- a/modules/server/regfile.cpp +++ b/modules/server/regfile.cpp @@ -5,7 +5,7 @@ * Ask for a registration from this module. * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/modules/server/register.cpp b/modules/server/register.cpp index 093691cc..874036d0 100644 --- a/modules/server/register.cpp +++ b/modules/server/register.cpp @@ -5,7 +5,7 @@ * Registration, authentication, authorization and accounting from a database. * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -50,7 +50,7 @@ public: DialogNotify, MWINotify, Subscribe, - SubscribeTimer + SubscribeTimer }; AAAHandler(const char* hname, int type, int prio = 50); virtual ~AAAHandler(); @@ -248,7 +248,7 @@ private: static RegistModule module; -// copy parameters from SQL result to a Message +// copy parameters from SQL result to a Message static void copyParams2(Message &msg, Array* a, int row = 0) { @@ -491,7 +491,7 @@ bool AAAHandler::received(Message& msg) { // we know about the user but has no address of record if (s_errOffline) { - msg.retValue() = "-"; + msg.retValue() = "-"; msg.setParam("error","offline"); msg.setParam("reason","Offline"); } @@ -938,7 +938,7 @@ bool RegistModule::received(Message& msg, int id) { if (id == Private) { if (s_cfg.getBoolValue("general","accounts")) - m_accountsmodule= new AccountsModule(); + m_accountsmodule= new AccountsModule(); ObjList* l = s_handlers.skipNull(); for (; l; l=l->skipNext()) { AAAHandler* h = YOBJECT(AAAHandler,l->get()); @@ -1054,9 +1054,9 @@ void RegistModule::initialize() bool FallBackHandler::received(Message &msg) { switch (m_type) - { + { case Answered: - { + { GenObject* route = s_fallbacklist[msg.getValue("targetid")]; s_fallbacklist.remove(route); return false; @@ -1070,8 +1070,8 @@ bool FallBackHandler::received(Message &msg) } break; case Disconnect: - { - String reason=msg.getValue("reason"); + { + String reason=msg.getValue("reason"); if (m_stoperror && m_stoperror.matches(reason)) { //stop fallback on this error GenObject* route = s_fallbacklist[msg.getValue("id")]; @@ -1099,8 +1099,8 @@ bool FallBackHandler::received(Message &msg) AccountsModule::AccountsModule() : m_init(false), m_nextTime(0) -{ - Output("Loaded modules Accounts for database"); +{ + Output("Loaded modules Accounts for database"); m_account = s_cfg.getValue("accounts","account", s_cfg.getValue("default","account")); m_queryInit = s_cfg.getValue("accounts","initquery"); m_queryTimer = s_cfg.getValue("accounts","timerquery"); @@ -1168,7 +1168,7 @@ bool AccountsModule::received(Message &msg, int id) Array* a = static_cast(m.userObject(YATOM("Array"))); copyParams2(*m1,a, i); Engine::enqueue(m1); - } + } return false; } } diff --git a/modules/server/sigtransport.cpp b/modules/server/sigtransport.cpp index 1810cbf6..7ba5748f 100644 --- a/modules/server/sigtransport.cpp +++ b/modules/server/sigtransport.cpp @@ -5,7 +5,7 @@ * SIGTRAN transports provider, supports SCTP, TCP, UDP, UNIX sockets * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2009-2013 Null Team + * Copyright (C) 2009-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -788,7 +788,7 @@ bool Transport::bindSocket() } socket = soc; socket->create(AF_INET,SOCK_SEQPACKET,IPPROTO_SCTP); - SctpSocket* sctp = static_cast(socket); + SctpSocket* sctp = static_cast(socket); if (!sctp->setStreams(2,2)) Debug(this,DebugInfo,"Failed to set sctp streams number"); if (!sctp->subscribeEvents()) @@ -1034,7 +1034,7 @@ void Transport::setStatus(int status) u_int32_t Transport::getMsgLen(unsigned char* buf) { - return ((unsigned int)buf[4] << 24) | ((unsigned int)buf[5] << 16) | + return ((unsigned int)buf[4] << 24) | ((unsigned int)buf[5] << 16) | ((unsigned int)buf[6] << 8) | (unsigned int)buf[7]; } @@ -1147,7 +1147,7 @@ void Transport::stopThread() /** - * class StreamReader + * class StreamReader */ StreamReader::StreamReader(Transport* transport,Socket* sock) diff --git a/modules/server/sipfeatures.cpp b/modules/server/sipfeatures.cpp index 50c77b94..10585ad3 100644 --- a/modules/server/sipfeatures.cpp +++ b/modules/server/sipfeatures.cpp @@ -1,11 +1,11 @@ /** * sipfeatures.cpp - * This file is part of the YATE Project http://YATE.null.ro + * This file is part of the YATE Project http://YATE.null.ro * * Additional SIP features * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -93,7 +93,7 @@ public: : MessageHandler("sip.subscribe",prio,s_module.name()) { } virtual bool received(Message &msg); - // Get the event from a received message. Set the content type + // Get the event from a received message. Set the content type // Set 'code' parameter of the message if false is returned bool getEventData(Message& msg, int& event, String& evName, String& content); }; @@ -232,7 +232,7 @@ bool YSipSubscribeHandler::received(Message &msg) return true; } -// Get the event from a received message. Set the content type +// Get the event from a received message. Set the content type bool YSipSubscribeHandler::getEventData(Message& msg, int& event, String& evName, String& content) { @@ -310,23 +310,23 @@ bool YSipSubscribeHandler::getEventData(Message& msg, int& event, String& evName // // Event specific parameters are prefixed by the event name: // dialog.id -// The id of the dialog if any +// The id of the dialog if any // dialog.callid -// The dialog identifier +// The dialog identifier // dialog.localtag -// The local tag component of the dialog identifier +// The local tag component of the dialog identifier // dialog.remotetag -// The remote tag component of the dialog identifier +// The remote tag component of the dialog identifier // dialog.direction -// Keyword indicating the call direction from Yate's point of view: incoming/outgoing +// Keyword indicating the call direction from Yate's point of view: incoming/outgoing // dialog.remoteuri -// The notifier dialog peer's URI +// The notifier dialog peer's URI // dialog.state -// Keyword indicating the call state: trying/confirmed/early/rejected/terminated +// Keyword indicating the call state: trying/confirmed/early/rejected/terminated // message-summary.voicenew -// Optional integer specifying the number of unread (new) voice messages +// Optional integer specifying the number of unread (new) voice messages // message-summary.voiceold -// Optional integer specifying the number of read (old) voice messages +// Optional integer specifying the number of read (old) voice messages bool YSipNotifyHandler::received(Message &msg) { String notifyto = msg.getValue("notifyto"); @@ -544,7 +544,7 @@ void YSipFeatures::initialize() m_expiresDef = cfg.getIntValue("general","expires_def",EXPIRES_DEF); m_forceDlgID = cfg.getBoolValue("general","forcedialogdata",true); s_verboseXml = cfg.getBoolValue("general","verbosexml",true); - + // Build the list of allowed events NamedList* evs = cfg.getSection("allow_events"); bool def = evs ? evs->getBoolValue("default",true) : true; diff --git a/modules/server/subscription.cpp b/modules/server/subscription.cpp index a1626661..3af64150 100644 --- a/modules/server/subscription.cpp +++ b/modules/server/subscription.cpp @@ -1,11 +1,11 @@ /** * subscription.cpp - * This file is part of the YATE Project http://YATE.null.ro + * This file is part of the YATE Project http://YATE.null.ro * * Subscription handler and presence notifier * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -2980,7 +2980,7 @@ bool SubscriptionModule::commandExecute(String& retVal, const String& line) return false; } DDebug(this,DebugInfo,"Command Execute , operation status for: %s, to %s",user.c_str(),contact.c_str()); -// retVal << "Subscription state for user: " << user << " and contact: " +// retVal << "Subscription state for user: " << user << " and contact: " // << contact << " is: " << m_users.getSubscription(user,contact); return true; } @@ -3002,7 +3002,7 @@ bool SubscriptionModule::commandExecute(String& retVal, const String& line) retVal << "Expected pair"; return false; } - counter += 1; + counter += 1; } if (user->null() || contact->null()) { retVal << "Expected pair"; diff --git a/modules/server/tdmcard.cpp b/modules/server/tdmcard.cpp index b178ea79..6639b543 100644 --- a/modules/server/tdmcard.cpp +++ b/modules/server/tdmcard.cpp @@ -5,7 +5,7 @@ * TDM cards signalling and data driver * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -210,7 +210,7 @@ public: // New status is Connect: Open device. Create source/consumer. Start worker // Cleanup on disconnect virtual bool status(Status newStat, bool sync = false); - // Update data format for Tdm device and source/consumer + // Update data format for Tdm device and source/consumer virtual bool updateFormat(const char* format, int direction); // Get this circuit or source/consumer virtual void* getObject(const String& name) const; @@ -383,7 +383,7 @@ void TdmWorker::stop() m_thread->cancel(); while (m_thread) Thread::yield(); - + } const char* TdmThread::s_threadName = "Tdm Worker"; @@ -493,7 +493,7 @@ int TdmDevice::buildSpanChanFromIf(const char *interface_name, int *span, int *c ch = (p + 1); break; } - else + else if (*p == 's') { sp = (p + 1); } @@ -1021,7 +1021,7 @@ SignallingComponent* TdmInterface::create(const String& type, NamedList& name) } // Check span type - if (devType != TdmDevice::E1 && devType != TdmDevice::T1 && + if (devType != TdmDevice::E1 && devType != TdmDevice::T1 && devType != TdmDevice::NET && devType != TdmDevice::CPE) { Debug(&plugin,DebugWarn,"Section '%s'. Can't create D-channel for type='%s'", config->c_str(),sDevType.c_str()); diff --git a/modules/server/users.cpp b/modules/server/users.cpp index a649f430..c0909007 100644 --- a/modules/server/users.cpp +++ b/modules/server/users.cpp @@ -5,7 +5,7 @@ * Users module * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -465,6 +465,6 @@ bool UsersModule::commandComplete(Message& msg, const String& partLine, const St return Module::commandComplete(msg,partLine,partWord); } -} +}; // anonymous namespace /* vi: set ts=8 sw=4 sts=4 noet: */ diff --git a/modules/server/wpcard.cpp b/modules/server/wpcard.cpp index c87e651e..5aca922e 100644 --- a/modules/server/wpcard.cpp +++ b/modules/server/wpcard.cpp @@ -5,7 +5,7 @@ * Wanpipe PRI cards signalling and data driver * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -1678,7 +1678,7 @@ void WpSpan::run() } #endif // Calculate received samples. Check if we received valid data - unsigned int samples = 0; + unsigned int samples = 0; if ((r > 0) && ((r % m_count) == 0)) samples = (unsigned int)r / m_count; if (!samples) { diff --git a/modules/server/wpcardw.cpp b/modules/server/wpcardw.cpp index ff9b4a23..7f21d694 100644 --- a/modules/server/wpcardw.cpp +++ b/modules/server/wpcardw.cpp @@ -5,7 +5,7 @@ * Wanpipe PRI cards signalling and data driver for Windows * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -1165,7 +1165,7 @@ void WpSpan::run() continue; r -= WP_HEADER; // Calculate received samples. Check if we received valid data - unsigned int samples = 0; + unsigned int samples = 0; if ((r > 0) && ((r % m_count) == 0)) samples = (unsigned int)r / m_count; if (!samples) { diff --git a/modules/server/yradius.cpp b/modules/server/yradius.cpp index 5f95de6d..a667a623 100644 --- a/modules/server/yradius.cpp +++ b/modules/server/yradius.cpp @@ -5,7 +5,7 @@ * RADIUS Client functionality for YATE * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * Largely based on the code sent by Faizan Naqvi (Tili) * diff --git a/modules/server/ysigchan.cpp b/modules/server/ysigchan.cpp index 58fe1ad2..393ebd1a 100644 --- a/modules/server/ysigchan.cpp +++ b/modules/server/ysigchan.cpp @@ -5,7 +5,7 @@ * Yet Another Signalling Channel * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -3043,7 +3043,7 @@ bool SigDriver::reInitialize(NamedList& params) return false; } bool ret = false; - unsigned int n = cfg->sections(); + unsigned int n = cfg->sections(); for (unsigned int i = 0; i < n; i++) { NamedList* sect = cfg->getSection(i); ret = initSection(sect); @@ -3146,7 +3146,7 @@ void SigDriver::initialize() if (level >= 0) m_engine->debugLevel(level); // Build/initialize trunks and topmost components - unsigned int n = s_cfg.sections(); + unsigned int n = s_cfg.sections(); for (unsigned int i = 0; i < n; i++) { NamedList* sect = s_cfg.getSection(i); initSection(sect); @@ -3301,7 +3301,7 @@ void SigLinkSet::linkStatus(String& status) /** * SigSS7ccp - */ + */ SigSS7Sccp::~SigSS7Sccp() { @@ -4897,7 +4897,7 @@ bool SCCPHandler::received(Message& msg) if (hexData) { data.unHexify(hexData->c_str(),hexData->length(),' '); } - } + } } if (data.length() == 0) { DDebug(&plugin,DebugNote,"Received message %s with no data",msg.c_str()); diff --git a/modules/server/ysnmpagent.cpp b/modules/server/ysnmpagent.cpp index 856a8d00..90a6203f 100644 --- a/modules/server/ysnmpagent.cpp +++ b/modules/server/ysnmpagent.cpp @@ -5,7 +5,7 @@ * Module for SNMP protocol agent * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -165,7 +165,7 @@ private: SocketAddr m_from; }; -class SnmpUser : public GenObject +class SnmpUser : public GenObject { public: // enum for authentication and privacy encryption @@ -739,7 +739,7 @@ AsnMib* AsnMibTree::find(const ASNObjId& id) while (cycles < 2) { ObjList* n = m_mibs.find(value); searched = n ? static_cast(n->get()) : 0; - if (searched) { + if (searched) { searched->setIndex(index); return searched; } @@ -1203,7 +1203,7 @@ void SnmpUser::generateAuthInfo() { if (TelEngine::null(m_authPassword)) return; - + m_authKey = generateAuthKey(m_authPassword); m_k1.clear(); m_k2.clear(); @@ -1283,7 +1283,7 @@ int SnmpV3MsgContainer::prepareForSend(Snmp::SNMPv3Message& msg) if (!msg.m_msgGlobalData) return SnmpAgent::MESSAGE_DROP; msg.m_msgGlobalData->m_msgFlags.assign(&msgFlags,sizeof(msgFlags)); - + // make sure auth and encrypt parameters are empty m_security.m_msgPrivacyParameters.clear(); m_security.m_msgAuthenticationParameters.clear(); @@ -1321,7 +1321,7 @@ int SnmpV3MsgContainer::generateTooBigMsg(Snmp::SNMPv3Message& msg) { Debug(&__plugin,DebugInfo,"SnmpV3MsgContainer::generateTooBigMsg() [%p]",this); if (!m_scopedPdu) - return SnmpAgent::MESSAGE_DROP; + return SnmpAgent::MESSAGE_DROP; DataBlock data = m_scopedPdu->m_data; Snmp::PDUs pdus; pdus.decode(data); @@ -1331,7 +1331,7 @@ int SnmpV3MsgContainer::generateTooBigMsg(Snmp::SNMPv3Message& msg) pdu->m_error_status = Snmp::PDU::s_tooBig_error_status; pdu->m_error_index = 0; if (!pdu->m_variable_bindings) - pdu->m_variable_bindings = new Snmp::VarBindList(); + pdu->m_variable_bindings = new Snmp::VarBindList(); pdu->m_variable_bindings->m_list.clear(); data.clear(); pdus.encode(data); @@ -1356,7 +1356,7 @@ int SnmpV3MsgContainer::processHeader(Snmp::SNMPv3Message& msg) m_msgMaxSize = header->m_msgMaxSize; // * msgFlags u_int8_t msgFlags = (u_int8_t)(header->m_msgFlags.length() == 1 ? header->m_msgFlags[0] : 0); - + // get the message flags m_reportFlag = ((msgFlags & REPORT_FLAG) == 0x0 ? false : true); m_privFlag = ((msgFlags & PRIVACY_FLAG) == 0x0 ? false : true); @@ -1389,7 +1389,7 @@ int SnmpV3MsgContainer::processSecurityModel(Snmp::SNMPv3Message& msg) m_msgEngineTime = m_security.m_msgAuthoritativeEngineTime; m_user = __plugin.getUser(m_security.m_msgUserName.getString()); - + DDebug(&__plugin,DebugInfo,"SnmpV3MsgContainer::processSecurityModel found authEngineId = '%s', engineBoots = '%d', " "engineTime = '%d', username = '%s'", authEngineId.toHexString().c_str(), m_msgEngineBoots,m_msgEngineTime,(m_user ? m_user->toString().c_str() : "")); @@ -1686,7 +1686,7 @@ SnmpAgent::SnmpAgent() : Module("snmpagent","misc"), m_init(false), m_msgQueue(0), m_mibTree(0), m_engineBoots(0),m_startTime(0), m_silentDrops(0), - m_salt(0), + m_salt(0), m_trapHandler(0), m_traps(0), m_trapUser(0), @@ -1784,7 +1784,7 @@ void SnmpAgent::initialize() for (unsigned int i = 0; i < s_cfg.sections(); i++) { NamedList* sec = s_cfg.getSection(i); - if (!sec || (*sec == "general") || (*sec == "snmp_v2") || (*sec == "snmp_v3") + if (!sec || (*sec == "general") || (*sec == "snmp_v2") || (*sec == "snmp_v3") || (*sec == "traps") || (*sec == s_cfg.getValue("traps","trap_user",""))) continue; m_users.append(new SnmpUser(sec)); @@ -2298,7 +2298,7 @@ Snmp::PDU* SnmpAgent::decodeBulkPDU(int& reqType, Snmp::BulkPDU* pdu, const int& int i = 0; int error = 0; AsnValue val; - + // handle non-repeaters ObjList* o = list->m_list.skipNull(); for (; o; o = o->skipNext()) { @@ -2308,7 +2308,7 @@ Snmp::PDU* SnmpAgent::decodeBulkPDU(int& reqType, Snmp::BulkPDU* pdu, const int& if (var) { Snmp::VarBind* newVar = new Snmp::VarBind(); newVar->m_choiceType = Snmp::VarBind::VALUE; - newVar->m_name->m_ObjectName = var->m_name->m_ObjectName; + newVar->m_name->m_ObjectName = var->m_name->m_ObjectName; int res = processGetNextReq(newVar,&val,error,access); if (res == 1 && error) { retPdu->m_error_index = i + 1; @@ -2507,7 +2507,7 @@ int SnmpAgent::generateReport(Snmp::SNMPv3Message& msg, const int& secRes, SnmpV if (!m_mibTree) return MESSAGE_DROP; if (!msg.m_msgGlobalData) - return MESSAGE_DROP; + return MESSAGE_DROP; // reset the message flags cont.setReportFlag(false); cont.setPrivFlag(false); diff --git a/modules/server/zapcard.cpp b/modules/server/zapcard.cpp index 39151ab5..7bd0f3e6 100644 --- a/modules/server/zapcard.cpp +++ b/modules/server/zapcard.cpp @@ -5,7 +5,7 @@ * Zaptel PRI/TDM/FXS/FXO cards signalling and data driver * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -102,7 +102,7 @@ class ZapModule; // The module #define DAHDI_EVENT_PULSEDIGIT ZT_EVENT_PULSEDIGIT #define DAHDI_EVENT_DTMFDOWN ZT_EVENT_DTMFDOWN -#define DAHDI_EVENT_DTMFUP ZT_EVENT_DTMFUP +#define DAHDI_EVENT_DTMFUP ZT_EVENT_DTMFUP #define DAHDI_EVENT_PULSEDIGIT ZT_EVENT_PULSEDIGIT // hook events @@ -585,7 +585,7 @@ public: // New status is Connect: Open device. Create source/consumer. Start worker // Cleanup on disconnect virtual bool status(Status newStat, bool sync = false); - // Update data format for zaptel device and source/consumer + // Update data format for zaptel device and source/consumer virtual bool updateFormat(const char* format, int direction); // Setup echo canceller or start echo canceller training virtual bool setParam(const String& param, const String& value); @@ -981,7 +981,7 @@ static TokenDict s_formats[] = { {"alaw", ZapDevice::Alaw}, {0,0} }; -#ifdef HAVE_ZAP +#ifdef HAVE_ZAP const char* ZapDevice::s_zapCtlName = "/dev/zap/ctl"; const char* ZapDevice::s_zapDevName = "/dev/zap/channel"; #else @@ -1402,7 +1402,7 @@ bool ZapDevice::checkAlarms() void ZapDevice::resetAlarms() { m_alarms = 0; - m_alarmsText = ""; + m_alarmsText = ""; Debug(m_owner,DebugInfo,"%sNo more alarms on channel %u [%p]", m_name.safe(),m_channel,m_owner); } @@ -2258,7 +2258,7 @@ bool ZapCircuit::status(Status newStat, bool sync) return false; } -// Update data format for zaptel device and source/consumer +// Update data format for zaptel device and source/consumer bool ZapCircuit::updateFormat(const char* format, int direction) { s_sourceAccessMutex.lock(); @@ -2327,7 +2327,7 @@ bool ZapCircuit::setParam(const String& param, const String& value) bool ok = m_device.setEchoCancel(m_crtEchoCancel,m_echoTaps); if (m_crtEchoCancel) m_crtEchoCancel = ok; - return ok; + return ok; } if (param == "echotaps") { int tmp = value.toInteger(); diff --git a/modules/sig/camel_map.cpp b/modules/sig/camel_map.cpp index 124ce41c..f42f0d31 100644 --- a/modules/sig/camel_map.cpp +++ b/modules/sig/camel_map.cpp @@ -5,7 +5,7 @@ * MAP/CAMEL TCAP <-> XML translators * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004 - 2011-2013 Null Team + * Copyright (C) 2004 - 2011-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -670,11 +670,11 @@ static bool encodeParam(const Parameter* param, DataBlock& data, XmlElement* ele if (child->getAttribute(s_tagAttr) || child->getAttribute(s_encAttr)) ok = encodeRaw(param,data,child,err); else { - if (param->tag.type() == AsnTag::Constructor && - !(param->type == TcapXApplication::HexString || param->type == TcapXApplication::SequenceOf + if (param->tag.type() == AsnTag::Constructor && + !(param->type == TcapXApplication::HexString || param->type == TcapXApplication::SequenceOf || param->type == TcapXApplication::Sequence || param->type == TcapXApplication::Choice || param->type == TcapXApplication::SetOf)) - Debug(&__plugin,DebugGoOn,"Encoding definition conflict for param='%s', tag is defined as contructor" + Debug(&__plugin,DebugGoOn,"Encoding definition conflict for param='%s', tag is defined as contructor" " while its type is primitive",param->name.c_str()); ok = type->encode(param,type,data,child,err); } @@ -689,7 +689,7 @@ static bool encodeParam(const Parameter* param, DataBlock& data, XmlElement* ele return ok; } -static bool decodeRaw(XmlElement* elem, DataBlock& data, bool singleParam = false) +static bool decodeRaw(XmlElement* elem, DataBlock& data, bool singleParam = false) { if (!(elem && data.length())) return false; @@ -798,7 +798,7 @@ static bool decodeParam(const Parameter* param, AsnTag& tag, DataBlock& data, Xm elem,str.c_str()); MapCamelType* type = (MapCamelType*)findType(param->type); bool ok = true; - if (!type) + if (!type) ok = decodeRaw(elem,data,true); else ok = type->decode(param,type,tag,data,elem,addEnc,err); @@ -869,7 +869,7 @@ static bool decodeTBCD(const Parameter* param, MapCamelType* type, AsnTag& tag, if (!(param && type && data.length() && parent)) return false; XDebug(&__plugin,DebugAll,"decodeTBCD(param=%s[%p],elem=%s[%p])",param->name.c_str(),param,parent->getTag().c_str(),parent); - if (param->tag != tag) + if (param->tag != tag) return false; data.cut(-(int)tag.coding().length()); @@ -894,7 +894,7 @@ static bool encodeTBCD(const Parameter* param, MapCamelType* type, DataBlock& da const String& text = elem->getText(); encodeBCD(text,data); data.insert(ASNLib::buildLength(data)); - data.insert(param->tag.coding()); + data.insert(param->tag.coding()); return true; } @@ -977,7 +977,7 @@ static bool decodeHex(const Parameter* param, MapCamelType* type, AsnTag& tag, D } else { octets.hexify(data.data(),(len > (int)data.length() ? data.length() : len),' '); - data.cut(-len); + data.cut(-len); } child->addText(octets); return true; @@ -1130,7 +1130,7 @@ static bool decodeSeq(const Parameter* param, MapCamelType* type, AsnTag& tag, D printMissing(params->name.c_str(),param->name.c_str(),false); err = TcapXApplication::DataMissing; return false; - } + } else { params++; continue; @@ -1158,7 +1158,7 @@ static bool encodeSeq(const Parameter* param, MapCamelType* type, DataBlock& dat printMissing(params->name.c_str(),param->name.c_str()); err = TcapXApplication::DataMissing; return false; - } + } else { params++; continue; @@ -1213,7 +1213,7 @@ static bool decodeSeqOf(const Parameter* param, MapCamelType* type, AsnTag& tag, printMissing(params->name.c_str(),param->name.c_str(),false); err = TcapXApplication::DataMissing; return false; - } + } else break; } @@ -1937,7 +1937,7 @@ static bool decodeCallNumber(const Parameter* param, MapCamelType* type, AsnTag& unsigned char pres = (data[index] >> 2) & 3; unsigned char scrn = data[index] & 3; - if (type->type == TcapXApplication::GenericNumber) + if (type->type == TcapXApplication::GenericNumber) child->setAttribute(s_qualifierAttr,lookup(qualifier,s_dict_qual,"unknown")); child->setAttribute(s_natureAttr,lookup(nai,s_dict_nai,"unknown")); child->setAttribute(s_planAttr,lookup(plan,s_dict_numPlanIsup,"unknown")); @@ -2074,7 +2074,7 @@ static const String s_reasonOrigAttr = "reason_original"; static const String s_counterAttr = "counter"; static const String s_reasonAttr = "reason"; -static bool decodeRedir(const Parameter* param, MapCamelType* type, AsnTag& tag, DataBlock& data, +static bool decodeRedir(const Parameter* param, MapCamelType* type, AsnTag& tag, DataBlock& data, XmlElement* parent, bool addEnc, int& err) { if (!(param && type && data.length() && parent)) @@ -2182,7 +2182,7 @@ static const TokenDict s_dict_transferRateCCITT[] = { static const TokenDict s_dict_formatCCITT[] = { {"v110", 0x01}, // Recomendation V.110 and X.30 {"mulaw", 0x02}, // Recomendation G.711 mu-law - {"alaw", 0x03}, // Recomendation G.711 A-law + {"alaw", 0x03}, // Recomendation G.711 A-law {"g721", 0x04}, // Recomendation G.721 32kbit/s ADPCM and I.460 {"h221", 0x05}, // Recomendation H.221 and H.242 {"non-CCITT", 0x07}, // Non CCITT standardized rate adaption @@ -2197,7 +2197,7 @@ static const String s_transferModeAttr = "transfermode"; static const String s_transferRateAttr = "transferrate"; static const String s_multiplierAttr = "multiplier"; -static bool decodeUSI(const Parameter* param, MapCamelType* type, AsnTag& tag, DataBlock& data, +static bool decodeUSI(const Parameter* param, MapCamelType* type, AsnTag& tag, DataBlock& data, XmlElement* parent, bool addEnc, int& err) { if (!(param && type && data.length() && parent)) @@ -2288,7 +2288,7 @@ static const StringList s_subscriberDataCapabOps("insertSubscriberData,deleteSub static const StringList s_routingCapabOps("sendRoutingInfoForGprs,sendRoutingInfoForLCS,statusReport"); static const StringList s_vlrRoutingCapabOps("provideRoamingNumber,provideSubscriberInfo"); static const StringList s_traceSubscriberCapabOps("activateTraceMode,deactivateTraceMode"); -static const StringList s_servicesCapabOps("registerSS,eraseSS,activateSS,deactivateSS,interrogateSS,registerPassword,getPassword," +static const StringList s_servicesCapabOps("registerSS,eraseSS,activateSS,deactivateSS,interrogateSS,registerPassword,getPassword," "processUnstructuredSS-Request,unstructuredSS-Request,unstructuredSS-Notify"); static const StringList s_miscellaneousCapabOps("sendIMSI,readyForSM,setReportingState"); static const StringList s_errorRecoveryCapabOps("reset,forwardCheckSS-Indication,failureReport"); @@ -2581,7 +2581,7 @@ static const TokenDict s_alertPattern[] = { {"alertingCategory-4", 0x07},// AlertingPattern ::= '00000111'B {"alertingCategory-5", 0x08},// AlertingPattern ::= '00001000'B {0,0}, -}; +}; static const TokenDict s_extProtocolId[] = { {"ets-300356", 0x01}, @@ -2834,8 +2834,8 @@ static const SignallingFlags s_forwardOptions[] = { static const SignallingFlags s_ssStatus[] = { { 0x01, 0x01, "active" }, { 0x02, 0x02, "registered" }, - { 0x04, 0x04, "provisioned" }, - { 0x08, 0x08, "quiescent" }, + { 0x04, 0x04, "provisioned" }, + { 0x08, 0x08, "quiescent" }, { 0, 0, 0 }, }; @@ -2973,7 +2973,7 @@ static const TokenDict s_EMLPPPriority[] = { {"priorityLevelB", 5}, {"priorityLevelA", 6}, {0,0}, -}; +}; static const Parameter s_EMLPPInfo[] = { {"maximumentitledPriority", s_intTag, false, TcapXApplication::Enumerated, s_EMLPPPriority}, @@ -3027,7 +3027,7 @@ static const TokenDict s_odbGeneralData[] = { {"registrationInterzonalCFNotToHPLMN-Barred", 0x08000000}, {"registrationInternationalCF-Barred", 0x10000000}, {0,0}, -}; +}; static const TokenDict s_odbHPLMNData[] = { {"plmn-SpecificBarringType1", 0x01}, @@ -4875,7 +4875,7 @@ static const Parameter s_forwardSMArgs[] = { static const TokenDict s_SMDeliveryOutcomeEnum[] = { {"memoryCapacityExceeded", 0}, {"absentSubscriber", 1}, - {"successfulTransfer", 2}, + {"successfulTransfer", 2}, {0,0} }; @@ -5244,7 +5244,7 @@ static const Operation s_mapOps[] = { {"reportSM-DeliveryStatus", true, 47, SS7TCAP::SuccessOrFailureReport, s_sequenceTag, s_reportSMDeliveryArgs, s_sequenceTag, s_reportSMDeliveryRes, - + }, {"activateTraceMode", true, 50, SS7TCAP::SuccessOrFailureReport, s_sequenceTag, s_activateTraceModeArgs, @@ -6613,7 +6613,7 @@ static const AppCtxt s_mapAppCtxt[]= { {"roamingNumberEnquiryContext-v2", "0.4.0.0.1.0.3.2", s_roamingNumberEnqCtxtOps, &s_defMapOpTable}, {"roamingNumberEnquiryContext-v1", "0.4.0.0.1.0.3.1", s_roamingNumberEnqCtxtOps, &s_defMapOpTable}, - // Location Info Retrieval Context + // Location Info Retrieval Context {"locationInfoRetrievalContext-v3", "0.4.0.0.1.0.5.3", s_locationInfoRetrieveCtxtOps, &s_defMapOpTable}, {"locationInfoRetrievalContext-v2", "0.4.0.0.1.0.5.2", s_locationInfoRetrieveCtxtOps, &s_defMapOpTable}, {"locationInfoRetrievalContext-v1", "0.4.0.0.1.0.5.1", s_locationInfoRetrieveCtxtOps, &s_defMapOpTable}, @@ -6627,7 +6627,7 @@ static const AppCtxt s_mapAppCtxt[]= { // Info retrieval context {"infoRetrievalContext-v3", "0.4.0.0.1.0.14.3", s_infoRetrieveCtxt2Ops, &s_defMapOpTable}, - {"infoRetrievalContext-v2", "0.4.0.0.1.0.14.2", s_infoRetrieveCtxt2Ops, &s_defMapOpTable}, + {"infoRetrievalContext-v2", "0.4.0.0.1.0.14.2", s_infoRetrieveCtxt2Ops, &s_defMapOpTable}, {"infoRetrievalContext-v1", "0.4.0.0.1.0.14.1", s_infoRetrieveCtxt1Ops, &s_defMapOpTable}, // Subscriber Data Management Context @@ -6678,10 +6678,10 @@ static const AppCtxt s_mapAppCtxt[]= { {"msPurgingContext-v3", "0.4.0.0.1.0.27.3", s_msPurgingCtxtOps, &s_defMapOpTable}, {"msPurgingContext-v2", "0.4.0.0.1.0.27.2", s_msPurgingCtxtOps, &s_defMapOpTable}, - // Subscriber Information Enquiry Context + // Subscriber Information Enquiry Context {"subscriberInfoEnquiryContext-v3", "0.4.0.0.1.0.28.3", s_subscriberInfoEnquiryCtxOps, &s_defMapOpTable}, - // Any Time Info Enquiry Context + // Any Time Info Enquiry Context {"anyTimeInfoEnquiryContext-v3", "0.4.0.0.1.0.29.3", s_anyTimeInfoEnquiryCtxOps, &s_defMapOpTable}, // GPRS Location Update Context @@ -6690,10 +6690,10 @@ static const AppCtxt s_mapAppCtxt[]= { // GPRS Location Info Retrieval Context {"gprsLocationInfoRetrievalContext-v3" , "0.4.0.0.1.0.33.3", s_gprsLocationInfoRetrieveCtxtOps, &s_defMapOpTable}, - // Failure Report Context + // Failure Report Context {"failureReportContext-v3" , "0.4.0.0.1.0.34.3", s_failureReportCtxtOps, &s_defMapOpTable}, - // Location Services Gateway Context + // Location Services Gateway Context {"locationSvcGatewayContext-v3", "0.4.0.0.1.0.37.3", s_locationSvcGatewayCtxtOps, &s_defMapOpTable}, // Authentication Failure Report Context @@ -6713,7 +6713,7 @@ static const StringList s_cap2AssistgsmSSFgsmSCFCtxtOps("assistRequestInstructio "promptAndCollectUserInformation,cancel,activityTest"); static const StringList s_cap2gsmSRFgsmSCFCtxtOps("assistRequestInstructions,specializedResourceReport,playAnnouncement," "promptAndCollectUserInformation,cancel,activityTest"); - + static OpTable s_defCamelOpTable = { s_camelOps, 0 }; static const AppCtxt s_camelAppCtxt[] = { @@ -6800,10 +6800,10 @@ static const Parameter s_mapProviderAbortSeq[] = { static const Parameter s_mapDialogChoice[] = { {"map-open", s_ctxtCstr_0_Tag, false, TcapXApplication::Sequence, s_mapOpenSeq}, {"map-accept", s_ctxtCstr_1_Tag, false, TcapXApplication::Sequence, s_extensionContainerRes}, - {"map-close", s_ctxtCstr_2_Tag, false, TcapXApplication::Sequence, s_extensionContainerRes}, - {"map-refuse", s_ctxtCstr_3_Tag, false, TcapXApplication::Sequence, s_mapRefuseSeq}, - {"map-userAbort", s_ctxtCstr_4_Tag, false, TcapXApplication::Sequence, s_mapUserAbortSeq}, - {"map-providerAbort", s_ctxtCstr_5_Tag, false, TcapXApplication::Sequence, s_mapProviderAbortSeq}, + {"map-close", s_ctxtCstr_2_Tag, false, TcapXApplication::Sequence, s_extensionContainerRes}, + {"map-refuse", s_ctxtCstr_3_Tag, false, TcapXApplication::Sequence, s_mapRefuseSeq}, + {"map-userAbort", s_ctxtCstr_4_Tag, false, TcapXApplication::Sequence, s_mapUserAbortSeq}, + {"map-providerAbort", s_ctxtCstr_5_Tag, false, TcapXApplication::Sequence, s_mapProviderAbortSeq}, {"", s_noTag, false, TcapXApplication::None, 0}, }; @@ -7410,7 +7410,7 @@ bool TcapToXml::buildXMLMessage(NamedList& params, XmlFragment* msg, MsgType typ if (m_app->type() == TcapXUser::MAP && !TelEngine::null(params.getParam(s_tcapDirectReference))) handleMAPDialog(el,params); - + for (unsigned int i = 0; i < params.count(); i++) { NamedString* ns = params.getParam(i); if (TelEngine::null(ns)) @@ -7876,7 +7876,7 @@ bool XmlToTcap::handleComponent(NamedList& tcapParams, XmlElement* elem, const A return false; unsigned int index = tcapParams.getIntValue(s_tcapCompCount) + 1; String prefix = s_tcapCompPrefix; - prefix << "." << index; + prefix << "." << index; int type = 0; const NamedList& comp = elem->attributes(); @@ -8028,7 +8028,7 @@ bool XmlToTcap::parse(NamedList& tcapParams) } //if we didn't find a saved context for the current transaction, search context in the XML info if (!appCtxt && ctxtElem) - appCtxt = (AppCtxt*)findCtxtFromStr(ctxtElem->getText(),(m_app->type() == TcapXUser::MAP ? s_mapAppCtxt : s_camelAppCtxt)); + appCtxt = (AppCtxt*)findCtxtFromStr(ctxtElem->getText(),(m_app->type() == TcapXUser::MAP ? s_mapAppCtxt : s_camelAppCtxt)); bool ok = parse(tcapParams,m_elem,"",appCtxt); NamedString* c = tcapParams.getParam(s_capabTag); @@ -9016,7 +9016,7 @@ SS7TCAPError TcapXUser::applicationRequest(TcapXApplication* app, NamedList& par } else { params.setParam(s_tcapRequestError,"No TCAP attached"); - error.setError(SS7TCAPError::Transact_UnassignedTransactionID); + error.setError(SS7TCAPError::Transact_UnassignedTransactionID); return error; } bool saveID = false; diff --git a/modules/sig/isupmangler.cpp b/modules/sig/isupmangler.cpp index 5e19eae5..7ec9f466 100644 --- a/modules/sig/isupmangler.cpp +++ b/modules/sig/isupmangler.cpp @@ -5,7 +5,7 @@ * ISUP parameter mangling in a STP * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2010-2013 Null Team + * Copyright (C) 2010-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/modules/sig/ss7_lnp_ansi.cpp b/modules/sig/ss7_lnp_ansi.cpp index f152383c..aa1c649e 100644 --- a/modules/sig/ss7_lnp_ansi.cpp +++ b/modules/sig/ss7_lnp_ansi.cpp @@ -5,7 +5,7 @@ * Query LNP databases using Telcordia GR-533-Core specification * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2011-2013 Null Team + * Copyright (C) 2011-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -90,7 +90,7 @@ public: { return m_id; } inline bool timedOut() { return m_timeout < Time::msecNow(); } - inline QueryStatus status() + inline QueryStatus status() { return m_status; } inline NamedList* parameters() { return m_msg; } @@ -108,7 +108,7 @@ public: { return m_dbSSN; } inline int dbPointCode() { return m_dbPC; } - inline void setDialogID(const char* id) + inline void setDialogID(const char* id) { m_dialogID = id; } inline String& dialogID() { return m_dialogID; } @@ -263,7 +263,7 @@ public: { return m_cause; } const String& toString() const { return m_code; } - inline bool codeAllowed() + inline bool codeAllowed() { return (m_gap == 0 ? false : m_gapExpiry < Time::secNow()); } inline unsigned int duration() { return m_duration; } @@ -818,7 +818,7 @@ bool LNPClient::makeQuery(const String& called, Message& msg) bool LNPClient::tcapRequest(SS7TCAP::TCAPUserTransActions primitive, LNPQuery* code) { - // request parameters from code object + // request parameters from code object if (!code) return false; @@ -912,7 +912,7 @@ bool LNPClient::tcapRequest(SS7TCAP::TCAPUserTransActions primitive, LNPQuery* c if (primitive == SS7TCAP::TC_QueryWithPerm || primitive == SS7TCAP::TC_Begin) code->setDialogID(params.getValue(s_tcapTID)); } - else + else return false; return true; } @@ -1111,7 +1111,7 @@ SS7TCAPError LNPClient::decodePrivateParam(NamedList& params, DataBlock& data) } break; case ACGIndicator: - if (len != 3) + if (len != 3) error.setError(SS7TCAPError::General_BadlyStructuredCompPortion); else { params.setParam(s_lnpPrefix + s_acgCause,lookup(data[0],s_acgCauses,String(data[0]))); @@ -1365,7 +1365,7 @@ void LNPClient::statusBlocked(String& status) BlockedCode* acg = static_cast(iter.get()); if (!acg) break; - str.append(acg->toString(),",") << "=" << lookup(acg->acgCause(),s_acgCauses) << "|" << acg->duration() << "|" + str.append(acg->toString(),",") << "=" << lookup(acg->acgCause(),s_acgCauses) << "|" << acg->duration() << "|" << acg->gap() << "|" << String::boolText(acg->codeAllowed()); } status.append(str,";"); diff --git a/modules/sip/sip_cnam_lnp.cpp b/modules/sip/sip_cnam_lnp.cpp index 1f180131..f27ae8be 100644 --- a/modules/sip/sip_cnam_lnp.cpp +++ b/modules/sip/sip_cnam_lnp.cpp @@ -5,7 +5,7 @@ * Query CNAM and LNP databases using SIP INVITE * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2011-2013 Null Team + * Copyright (C) 2011-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/modules/speexcodec.cpp b/modules/speexcodec.cpp index 2e493a53..0cf1f247 100644 --- a/modules/speexcodec.cpp +++ b/modules/speexcodec.cpp @@ -1,12 +1,12 @@ /** * speexcodec.cpp * This file is part of the YATE Project http://YATE.null.ro - * + * * Speex codec module written by Olaf Conradi . * Updated by Mikael Magnusson, inspired by codec_speex from iaxclient - * + * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * Copyright (C) 2006 Mikael Magnusson * * This software is distributed under multiple licenses; diff --git a/modules/test/crypto.cpp b/modules/test/crypto.cpp index d5b74406..0a27f357 100644 --- a/modules/test/crypto.cpp +++ b/modules/test/crypto.cpp @@ -1,6 +1,23 @@ -/* - crypto.cpp -*/ +/** + * crypto.cpp + * This file is part of the YATE Project http://YATE.null.ro + * + * Cryptographic functions test + * + * Yet Another Telephony Engine - a fully featured software PBX and IVR + * Copyright (C) 2004-2014 Null Team + * + * This software is distributed under multiple licenses; + * see the COPYING file in the main directory for licensing + * information for this specific distribution. + * + * This use of this software may be subject to additional restrictions. + * See the LEGAL file in the main directory for details. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + */ #include @@ -85,3 +102,5 @@ void TestCrypto::initialize() } INIT_PLUGIN(TestCrypto); + +/* vi: set ts=8 sw=4 sts=4 noet: */ diff --git a/modules/test/msgdelay.cpp b/modules/test/msgdelay.cpp index 549bac3e..c2c211d2 100644 --- a/modules/test/msgdelay.cpp +++ b/modules/test/msgdelay.cpp @@ -1,11 +1,11 @@ -/* +/** * msgdelay.cpp * This file is part of the YATE Project http://YATE.null.ro * * An arbitrary message delayer * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2011-2013 Null Team + * Copyright (C) 2011-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/modules/test/nettest.cpp b/modules/test/nettest.cpp index 20fd58cc..f76b9963 100644 --- a/modules/test/nettest.cpp +++ b/modules/test/nettest.cpp @@ -1,10 +1,11 @@ /** * nettest.cpp - * Network and socket performance test module * This file is part of the YATE Project http://YATE.null.ro * + * Network and socket performance test module + * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * Author: Marian Podgoreanu * * This software is distributed under multiple licenses; @@ -384,7 +385,7 @@ bool FDSetSelect::add(int handle, bool read, bool write, bool event) // Reset all file descriptor sets void FDSetSelect::reset() -{ +{ m_read->reset(); m_write->reset(); m_event->reset(); diff --git a/modules/test/randcall.cpp b/modules/test/randcall.cpp index 89b25075..9ab7d110 100644 --- a/modules/test/randcall.cpp +++ b/modules/test/randcall.cpp @@ -1,11 +1,11 @@ -/* +/** * randcall.cpp * This file is part of the YATE Project http://YATE.null.ro * * A sample random call generator * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/modules/test/test.cpp b/modules/test/test.cpp index 69c1c2d8..d734004d 100644 --- a/modules/test/test.cpp +++ b/modules/test/test.cpp @@ -1,7 +1,21 @@ -/* - test.c - This file holds the entry point of the Telephony Engine -*/ +/** + * test.cpp + * This file is part of the YATE Project http://YATE.null.ro + * + * Yet Another Telephony Engine - a fully featured software PBX and IVR + * Copyright (C) 2004-2014 Null Team + * + * This software is distributed under multiple licenses; + * see the COPYING file in the main directory for licensing + * information for this specific distribution. + * + * This use of this software may be subject to additional restrictions. + * See the LEGAL file in the main directory for details. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + */ #include @@ -41,20 +55,4 @@ void TestPlugin::initialize() INIT_PLUGIN(TestPlugin); -/* - * vim:ts=4:et:sw=4:ht=8 - * - * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team - * - * This software is distributed under multiple licenses; - * see the COPYING file in the main directory for licensing - * information for this specific distribution. - * - * This use of this software may be subject to additional restrictions. - * See the LEGAL file in the main directory for details. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - */ +/* vi: set ts=8 sw=4 sts=4 noet: */ diff --git a/modules/test/test1.cpp b/modules/test/test1.cpp index 3a7a9b51..5fe77488 100644 --- a/modules/test/test1.cpp +++ b/modules/test/test1.cpp @@ -1,7 +1,21 @@ -/* - test.c - This file holds the entry point of the Telephony Engine -*/ +/** + * test1.cpp + * This file is part of the YATE Project http://YATE.null.ro + * + * Yet Another Telephony Engine - a fully featured software PBX and IVR + * Copyright (C) 2004-2014 Null Team + * + * This software is distributed under multiple licenses; + * see the COPYING file in the main directory for licensing + * information for this specific distribution. + * + * This use of this software may be subject to additional restrictions. + * See the LEGAL file in the main directory for details. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + */ #include @@ -94,3 +108,5 @@ void TestPlugin1::initialize() } INIT_PLUGIN(TestPlugin1); + +/* vi: set ts=8 sw=4 sts=4 noet: */ diff --git a/modules/tonedetect.cpp b/modules/tonedetect.cpp index 00ed6e2a..a45ce1ca 100644 --- a/modules/tonedetect.cpp +++ b/modules/tonedetect.cpp @@ -5,7 +5,7 @@ * Detectors for various tones * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -94,7 +94,7 @@ public: Mixed }; ToneConsumer(const String& id, const String& name); - virtual ~ToneConsumer(); + virtual ~ToneConsumer(); virtual unsigned long Consume(const DataBlock& data, unsigned long tStamp, unsigned long flags); virtual const String& toString() const { return m_name; } @@ -229,7 +229,7 @@ ToneConsumer::ToneConsumer(const String& id, const String& name) : m_id(id), m_name(name), m_mode(Mono), m_detFax(true), m_detCont(false), m_detDtmf(true), m_detDnis(false), m_fax(s_paramsCNG), m_cont(s_paramsCOTv) -{ +{ Debug(&plugin,DebugAll,"ToneConsumer::ToneConsumer(%s,'%s') [%p]", id.c_str(),name.c_str(),this); for (int i = 0; i < 4; i++) { diff --git a/modules/tonegen.cpp b/modules/tonegen.cpp index 0d1a504c..36e65db3 100644 --- a/modules/tonegen.cpp +++ b/modules/tonegen.cpp @@ -5,7 +5,7 @@ * Tones generator * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/modules/wavefile.cpp b/modules/wavefile.cpp index 67c1ec33..93b90b9f 100644 --- a/modules/wavefile.cpp +++ b/modules/wavefile.cpp @@ -5,7 +5,7 @@ * Wave file driver (record+playback) * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/modules/yiaxchan.cpp b/modules/yiaxchan.cpp index 92df0a82..15e5ee7c 100644 --- a/modules/yiaxchan.cpp +++ b/modules/yiaxchan.cpp @@ -5,7 +5,7 @@ * IAX channel * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * Author: Marian Podgoreanu * * This software is distributed under multiple licenses; @@ -1116,7 +1116,7 @@ void YIAXLineContainer::evTimer(Time& time) { lock(); ListIterator iter(m_lines); - GenObject* gen = 0; + GenObject* gen = 0; while (0 != (gen = iter.get())) { RefPointer line = static_cast(gen); if (!line) @@ -2233,7 +2233,7 @@ void YIAXDriver::msgStatusAccounts(Message& msg) } s_lines.unlock(); msg.retValue() << "accounts=" << n; - msg.retValue().append(det,";"); + msg.retValue().append(det,";"); msg.retValue() << "\r\n"; } @@ -2270,7 +2270,7 @@ void YIAXDriver::msgStatusListeners(Message& msg) } m_enginesMutex.unlock(); msg.retValue() << "listeners=" << n << ",default=" << def; - msg.retValue().append(det,";"); + msg.retValue().append(det,";"); msg.retValue() << "\r\n"; } @@ -2453,7 +2453,7 @@ unsigned long YIAXConsumer::Consume(const DataBlock& data, unsigned long tStamp, // // YIAXSource // -YIAXSource::YIAXSource(YIAXConnection* conn, u_int32_t format, const char* formatText, int type) +YIAXSource::YIAXSource(YIAXConnection* conn, u_int32_t format, const char* formatText, int type) : DataSource(formatText), YIAXData(conn,format,type) { @@ -2713,7 +2713,7 @@ void YIAXConnection::handleEvent(IAXEvent* event) startMedia(true,IAXFormat::Video); startMedia(false,IAXFormat::Video); Engine::enqueue(message("call.answered",false,true)); - break; + break; case IAXEvent::Quelch: DDebug(this,DebugCall,"QUELCH [%p]",this); m_mutedOut = true; @@ -2726,7 +2726,7 @@ void YIAXConnection::handleEvent(IAXEvent* event) DDebug(this,DebugInfo,"RINGING [%p]",this); startMedia(true); Engine::enqueue(message("call.ringing",false,true)); - break; + break; case IAXEvent::Hangup: case IAXEvent::Reject: { diff --git a/modules/yjinglechan.cpp b/modules/yjinglechan.cpp index 725b3bd8..74f11e44 100644 --- a/modules/yjinglechan.cpp +++ b/modules/yjinglechan.cpp @@ -5,7 +5,7 @@ * Jingle channel * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * Author: Marian Podgoreanu * * This software is distributed under multiple licenses; @@ -2060,7 +2060,7 @@ int YJGConnection::getRinging(const String& flags, DebugEnabler* enabler, int de { if (flags) defVal = XMPPUtils::decodeFlags(flags,s_ringFlgName); - // Set RingNoEarlySession if RingWithContent + // Set RingNoEarlySession if RingWithContent // Reset RingWithContentOnly if RingWithContent is not set if (0 != (defVal & RingWithContent)) defVal |= RingNoEarlySession; @@ -3226,7 +3226,7 @@ bool YJGConnection::changeFTHostDir(bool resetState) if (!resetState) return false; if (m_ftHostDirection != FTHostNone) - Debug(this,DebugNote,"No more hosts available [%p]",this); + Debug(this,DebugNote,"No more hosts available [%p]",this); m_ftHostDirection = FTHostNone; return false; } @@ -3482,7 +3482,7 @@ void YJGConnection::copySessionParams(NamedList& list, bool redirect) jingleAddParam(list,"file_time",String(t),copy); } -// Check media in a received content +// Check media in a received content bool YJGConnection::checkMedia(const JGEvent& event, JGSessionContent& c) { JGRtpMediaList& codecs = m_audioFormats; diff --git a/modules/yrtpchan.cpp b/modules/yrtpchan.cpp index f094b7b2..b5e3a78b 100644 --- a/modules/yrtpchan.cpp +++ b/modules/yrtpchan.cpp @@ -5,7 +5,7 @@ * RTP channel - also acts as data helper for other protocols * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -736,7 +736,7 @@ bool YRTPWrapper::startRTP(const char* raddr, unsigned int rport, Message& msg) setTimeout(msg,s_timeout); m_rtp->setReports(msg.getIntValue(YSTRING("rtcp_interval"),s_interval)); // dejittering is only meaningful for audio - if (isAudio()){ + if (isAudio()){ int minJitter = msg.getIntValue(YSTRING("minjitter"),s_minJitter); int maxJitter = msg.getIntValue(YSTRING("maxjitter"),s_maxJitter); if (minJitter >= 0 && maxJitter > 0) @@ -873,7 +873,7 @@ void YRTPWrapper::timeout(bool initial) return; if (initial) m_noAudio++; - else + else m_lostAudio++; Debug(&splugin,DebugWarn,"%s timeout in%s%s wrapper [%p]", (initial ? "Initial" : "Later"), diff --git a/modules/ysipchan.cpp b/modules/ysipchan.cpp index aecc9e61..3cfa979f 100644 --- a/modules/ysipchan.cpp +++ b/modules/ysipchan.cpp @@ -5,7 +5,7 @@ * Yet Another Sip Channel * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -799,7 +799,7 @@ public: void initializing(bool start); inline YateSIPEngine* engine() const { return m_engine; } - inline void incFailedAuths() + inline void incFailedAuths() { m_failedAuths++; } inline unsigned int failedAuths() { @@ -1464,7 +1464,7 @@ static bool msgIsAllowed(const char* buf, int len) if (!(buf && len)) return false; - + int pos = 0; // check REGISTER while (pos < len) { @@ -1513,7 +1513,7 @@ static bool msgIsAllowed(const char* buf, int len) int status = START; bool breakLoop = false; while (pos < len) { - + switch (buf[pos]) { case ' ': case '\t': @@ -2721,7 +2721,7 @@ bool YateSIPTransport::init(const NamedList& params, const NamedList& defs, else { m_rtpLocalAddr = params.getValue(YSTRING("rtp_localip")); m_maxpkt = getMaxpkt(params.getIntValue(YSTRING("tcp_maxpkt"),m_maxpkt),m_maxpkt); - // Set rtp ip for tcp outgoing + // Set rtp ip for tcp outgoing if (!m_rtpLocalAddr && tcpTransport() && tcpTransport()->outgoing()) { Lock lck(s_globalMutex); m_rtpLocalAddr = s_tcpOutRtpip; @@ -5008,7 +5008,7 @@ void YateSIPEndPoint::run() SIPEvent* e = m_engine->getEvent(); if (e) s_evCount++; - else + else s_evCount = 0; // hack: use a loop so we can use break and continue for (; e; m_engine->processEvent(e),e = 0) { @@ -5563,7 +5563,7 @@ void YateSIPRefer::run() m_transferredDrv->lock(); RefPointer chan = m_transferredDrv->find(m_transferredID); m_transferredDrv->unlock(); - if (chan && conn->getPeer() && + if (chan && conn->getPeer() && chan->connect(conn->getPeer(),m_msg->getValue(YSTRING("reason")))) { m_rspCode = 202; m_notifyCode = 200; @@ -7595,7 +7595,7 @@ void YateSIPConnection::callAccept(Message& msg) } Channel::callAccept(msg); - if ((m_reInviting == ReinviteNone) && !m_rtpForward && !isAnswered() && + if ((m_reInviting == ReinviteNone) && !m_rtpForward && !isAnswered() && msg.getBoolValue(YSTRING("autoreinvite"),false)) { // remember we want to switch to RTP forwarding when party answers m_reInviting = ReinvitePending; @@ -8626,7 +8626,7 @@ bool SIPDriver::msgExecute(Message& msg, String& dest) } SIPDriver::SIPDriver() - : Driver("sip","varchans"), + : Driver("sip","varchans"), m_parser("sip","SIP Call"), m_endpoint(0) { @@ -8840,7 +8840,7 @@ bool SIPDriver::commandComplete(Message& msg, const String& partLine, const Stri } } } - else + else return Driver::commandComplete(msg,partLine,partWord); return false; } @@ -9025,7 +9025,7 @@ void SIPDriver::msgStatusAccounts(Message& msg) accounts.append(line->getUserName()) << "|"; accounts << (line->valid() ? "online" : "offline"); } - msg.retValue().append(accounts,";"); + msg.retValue().append(accounts,";"); msg.retValue() << "\r\n"; } @@ -9074,7 +9074,7 @@ void SIPDriver::msgStatusTransports(Message& msg, bool showUdp, bool showTcp, bo } } msg.retValue() << "transports=" << n; - msg.retValue().append(buf,";"); + msg.retValue().append(buf,";"); msg.retValue() << "\r\n"; } @@ -9124,7 +9124,7 @@ void SIPDriver::msgStatusListener(Message& msg) n += m_endpoint->m_listeners.count(); } msg.retValue() << "listeners=" << n; - msg.retValue().append(buf,";"); + msg.retValue().append(buf,";"); msg.retValue() << "\r\n"; } diff --git a/modules/ysockschan.cpp b/modules/ysockschan.cpp index 3dbe1040..b738a5c4 100644 --- a/modules/ysockschan.cpp +++ b/modules/ysockschan.cpp @@ -5,7 +5,7 @@ * SOCKS channel * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -249,7 +249,7 @@ public: /** * Constructor * @param t The message type - * @param conn The connection sending or receiving this packet + * @param conn The connection sending or receiving this packet */ inline SOCKSPacket(Type t, SOCKSConn* conn) : m_type(t), m_conn(conn) @@ -271,7 +271,7 @@ public: /** * Get the connection sending or receiving this packet - * @return The connection sending or receiving this packet + * @return The connection sending or receiving this packet */ inline SOCKSConn* conn() const { return m_conn; } @@ -293,7 +293,7 @@ public: /** * Build a SOCKS request/reply message - * @param conn The connection sending this packet + * @param conn The connection sending this packet * @param request True if this is a request, false if this is a reply * @param cmdRsp CMD/RSP value * @param addrType Address type as enumeration @@ -306,7 +306,7 @@ public: /** * Build an auth methods message - * @param conn The connection sending this packet + * @param conn The connection sending this packet * @param methods The list of methods * @param count The number of methods in the list (must be at least 1) * @return Valid SOCKSPacket pointer on success @@ -316,7 +316,7 @@ public: /** * Build an auth reply message - * @param conn The connection sending this packet + * @param conn The connection sending this packet * @param method The method * @return Valid SOCKSPacket pointer on success */ @@ -324,7 +324,7 @@ public: /** * Build an username/password auth request - * @param conn The connection sending this packet + * @param conn The connection sending this packet * @param uname The username (length must be between 0 and 255) * @param pwd The password (length must be between 0 and 255) * @return Valid SOCKSPacket pointer on success @@ -333,7 +333,7 @@ public: /** * Build an username/password auth reply - * @param conn The connection sending this packet + * @param conn The connection sending this packet * @param ok The result (0 for success) * @return Valid SOCKSPacket pointer on success */ @@ -988,7 +988,7 @@ public: /** * Add an endpoint definition. Replace an existing one with the same name. - * The pointer will be owned by the engine (append to list without + * The pointer will be owned by the engine (append to list without * increasing its reference counter) * @param epDef The endpoint definition to add */ diff --git a/modules/ystunchan.cpp b/modules/ystunchan.cpp index f6fe2331..a1d0fe51 100644 --- a/modules/ystunchan.cpp +++ b/modules/ystunchan.cpp @@ -5,7 +5,7 @@ * STUN support module * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * Author: Marian Podgoreanu * * This software is distributed under multiple licenses; @@ -36,10 +36,10 @@ namespace { // anonymous uselocalusername Add USERNAME attribute when sending requests Defaults to true - localusername The USERNAME attribute for outgoing requests + localusername The USERNAME attribute for outgoing requests useremoteusername Check USERNAME attribute when receiving requests Defaults to true - remoteusername The USERNAME attribute for incoming requests + remoteusername The USERNAME attribute for incoming requests remoteip The initial remote address remoteport The initial remote port userid The id of the user that requested the filter @@ -261,7 +261,7 @@ public: virtual bool fromBuffer(u_int8_t* buffer, u_int16_t len); virtual void toBuffer(DataBlock& buffer); private: - u_int16_t m_unknownType; // The unknown type + u_int16_t m_unknownType; // The unknown type DataBlock m_data; // Data }; @@ -531,7 +531,7 @@ void YStunAttributeChangeReq::toBuffer(DataBlock& buffer) // YStunAttributeAuth void YStunAttributeAuth::toString(String& dest) { - dest = m_auth; + dest = m_auth; } bool YStunAttributeAuth::fromBuffer(u_int8_t* buffer, u_int16_t len) diff --git a/modules/zlibcompress.cpp b/modules/zlibcompress.cpp index a21eaf93..d1579cee 100644 --- a/modules/zlibcompress.cpp +++ b/modules/zlibcompress.cpp @@ -5,7 +5,7 @@ * ZLib support * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -178,7 +178,7 @@ ZLibStream::ZLibStream(ZLibComp* owner, bool comp, const NamedList& params) ::memset(&m_zlib,0,sizeof(z_stream_s)); m_zlib.next_out = (Bytef*)data(); m_zlib.avail_out = length(); - m_zlib.zalloc = Z_NULL; + m_zlib.zalloc = Z_NULL; m_zlib.zfree = Z_NULL; m_zlib.opaque = Z_NULL; int code = Z_OK; diff --git a/run.in b/run.in index caa8fcf8..549a15ae 100644 --- a/run.in +++ b/run.in @@ -1,5 +1,26 @@ #! /bin/sh +# run +# This file is part of the YATE Project http://YATE.null.ro +# +# This is a generated file. You should never need to modify it. +# Take a look at the source file run.in instead. +# +# Yet Another Telephony Engine - a fully featured software PBX and IVR +# Copyright (C) 2005-2014 Null Team +# +# This software is distributed under multiple licenses; +# see the COPYING file in the main directory for licensing +# information for this specific distribution. +# +# This use of this software may be subject to additional restrictions. +# See the LEGAL file in the main directory for details. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + # Script to run Yate from the build directory, optionally under gdb or valgrind yate="./yate" diff --git a/share/data/YATE-MIB.txt b/share/data/YATE-MIB.txt index 6e404502..5171d26b 100644 --- a/share/data/YATE-MIB.txt +++ b/share/data/YATE-MIB.txt @@ -941,7 +941,7 @@ currentASR OBJECT-TYPE MAX-ACCESS read-only STATUS current DESCRIPTION - "The ASR value for the configured time interval. A value of -1 means that there haven't been + "The ASR value for the configured time interval. A value of -1 means that there haven't been calls in order to compute the ASR value." ::= { asrData 3 } @@ -950,7 +950,7 @@ overallASR OBJECT-TYPE MAX-ACCESS read-only STATUS current DESCRIPTION - "The ASR value since YATE started. A value of -1 means that there haven't been + "The ASR value since YATE started. A value of -1 means that there haven't been calls in order to compute the ASR value." ::= { asrData 4 } @@ -1015,7 +1015,7 @@ currentNER OBJECT-TYPE MAX-ACCESS read-only STATUS current DESCRIPTION - "The NER value for the configured time interval. A value of -1 means that there haven't been + "The NER value for the configured time interval. A value of -1 means that there haven't been calls in order to compute the NER value." ::= { nerData 2 } @@ -1024,7 +1024,7 @@ overallNER OBJECT-TYPE MAX-ACCESS read-only STATUS current DESCRIPTION - "The NER value since YATE started. A value of -1 means that there haven't been + "The NER value since YATE started. A value of -1 means that there haven't been calls in order to compute the NER value." ::= { nerData 3 } diff --git a/share/scripts/banbrutes.php b/share/scripts/banbrutes.php index b572451d..66868e40 100755 --- a/share/scripts/banbrutes.php +++ b/share/scripts/banbrutes.php @@ -5,7 +5,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2011-2013 Null Team + * Copyright (C) 2011-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/share/scripts/detector.php b/share/scripts/detector.php index 77230d25..f36f4a61 100755 --- a/share/scripts/detector.php +++ b/share/scripts/detector.php @@ -5,7 +5,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2011-2013 Null Team + * Copyright (C) 2011-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/share/scripts/dialout-dialer.php b/share/scripts/dialout-dialer.php index fbe5ebf5..ab0b5991 100755 --- a/share/scripts/dialout-dialer.php +++ b/share/scripts/dialout-dialer.php @@ -5,7 +5,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2008-2013 Null Team + * Copyright (C) 2008-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/share/scripts/dialout-scheduler.php b/share/scripts/dialout-scheduler.php index ee95c561..539f0f06 100755 --- a/share/scripts/dialout-scheduler.php +++ b/share/scripts/dialout-scheduler.php @@ -5,7 +5,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2008-2013 Null Team + * Copyright (C) 2008-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/share/scripts/echo.sh b/share/scripts/echo.sh index 78d6923c..d3d73efb 100755 --- a/share/scripts/echo.sh +++ b/share/scripts/echo.sh @@ -1,5 +1,23 @@ #!/bin/sh +# echo.sh +# This file is part of the YATE Project http://YATE.null.ro +# +# Yet Another Telephony Engine - a fully featured software PBX and IVR +# Copyright (C) 2005-2014 Null Team +# +# This software is distributed under multiple licenses; +# see the COPYING file in the main directory for licensing +# information for this specific distribution. +# +# This use of this software may be subject to additional restrictions. +# See the LEGAL file in the main directory for details. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + # Bourne shell test script for the Yate external module interface # Loops back audio data # To test add a route to: external/playrec/echo.sh diff --git a/share/scripts/ivrsample.php b/share/scripts/ivrsample.php index 5e5e055b..976284eb 100755 --- a/share/scripts/ivrsample.php +++ b/share/scripts/ivrsample.php @@ -5,7 +5,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2008-2013 Null Team + * Copyright (C) 2008-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/share/scripts/leavemail.php b/share/scripts/leavemail.php index a332d871..e35b97b6 100755 --- a/share/scripts/leavemail.php +++ b/share/scripts/leavemail.php @@ -5,7 +5,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2005-2013 Null Team + * Copyright (C) 2005-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/share/scripts/libvoicemail.php b/share/scripts/libvoicemail.php index 662320fd..a8e3dc7e 100644 --- a/share/scripts/libvoicemail.php +++ b/share/scripts/libvoicemail.php @@ -6,7 +6,7 @@ * Voicemail access functions * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/share/scripts/libyate.php b/share/scripts/libyate.php index 0f243690..edf15221 100644 --- a/share/scripts/libyate.php +++ b/share/scripts/libyate.php @@ -6,7 +6,7 @@ * PHP object-oriented interface library for Yate * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/share/scripts/libyate.py b/share/scripts/libyate.py index f2dab775..cb6c3e96 100644 --- a/share/scripts/libyate.py +++ b/share/scripts/libyate.py @@ -4,7 +4,7 @@ This file is a contribute of nexlab ( http://www.nexlab.it ) for the YATE Project ( http://YATE.null.ro ). - libyate.py is Copyright (C) 2005 Nexlab S.r.l + libyate.py is Copyright (C) 2005 Nexlab S.r.l Author: Franco (nextime) Lanza Version: 0.3 @@ -98,7 +98,7 @@ class YateInit(asynchat.async_chat): if self._fileno == 0: datain = self.in_buffer self.in_buffer = '' - if (datain != '\n') and ( datain != ''): + if (datain != '\n') and ( datain != ''): self.handler(datain) def handle_close(self): @@ -110,7 +110,7 @@ class YateInit(asynchat.async_chat): class Yate: - + """ internal methods """ type = '' @@ -127,7 +127,7 @@ class Yate: self.si = YateInit(0, self) self.so = YateInit(1, self) self.se = YateInit(2, self) - + # static function to intercept incoming message from yate # ( internal use ) def __call__(self, data): @@ -140,7 +140,7 @@ class Yate: """ TODO: add feof check to respond with EOF when necessary """ - #if data == EOF: + #if data == EOF: # sys.stderr.write("antani\n") if data == None: return '' @@ -193,11 +193,11 @@ class Yate: while c < n: r = r + ":" + self.Escape(params[c][0]) + "=" + self.Escape(params[c][1]) c = c + 1 - return r + return r # asyncore.loop() wrapper for retrocompatibility with python prior to # 2.4, this is needed because python 2.3 and prior asyncore.loop - # cant use the "count=1" parameter that we need to programmate exit + # cant use the "count=1" parameter that we need to programmate exit # from the loop. def __loop__(self, timeout=30.0, use_poll=False, map=None, count=None): poll_fun = asyncore.poll @@ -212,7 +212,7 @@ class Yate: while map and count > 0: poll_fun(timeout, map) count = count - 1 - + # loop executed in separate thread def __th_loop__(self, exit_cond): self.exit_condition = exit_cond @@ -248,7 +248,7 @@ class Yate: asyncore.loop(0, True, count=1) else: self.__loop__(0, count=1) - + # static function to clean close the asyncore.loop def close(self): asyncore.close_all() @@ -352,7 +352,7 @@ class Yate: self.so.write("%s:%s\n" % ( initstr, name)) #self.se.write("%s:%s\n" % ( initstr, name)) self.flush() - + # Constructor. Creates a new outgoing message # @param $name Name of the new message # @param $retval (optional) Default return @@ -369,7 +369,7 @@ class Yate: self.name = name self.retval = retval self.origin = int(time.strftime("%s")) - self.handled = 'true' + self.handled = 'true' self.id = id self.params = [] diff --git a/share/scripts/libyatechan.php b/share/scripts/libyatechan.php index 18eb4976..0ab77411 100644 --- a/share/scripts/libyatechan.php +++ b/share/scripts/libyatechan.php @@ -6,7 +6,7 @@ * Linear-like program flow channel interface library for Yate * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/share/scripts/libyateivr.php b/share/scripts/libyateivr.php index 34d457be..955251e7 100644 --- a/share/scripts/libyateivr.php +++ b/share/scripts/libyateivr.php @@ -6,7 +6,7 @@ * Object oriented IVR * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/share/scripts/noise.sh b/share/scripts/noise.sh index fabf62e1..24206525 100755 --- a/share/scripts/noise.sh +++ b/share/scripts/noise.sh @@ -1,5 +1,23 @@ #!/bin/sh +# noise.sh +# This file is part of the YATE Project http://YATE.null.ro +# +# Yet Another Telephony Engine - a fully featured software PBX and IVR +# Copyright (C) 2005-2014 Null Team +# +# This software is distributed under multiple licenses; +# see the COPYING file in the main directory for licensing +# information for this specific distribution. +# +# This use of this software may be subject to additional restrictions. +# See the LEGAL file in the main directory for details. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + # Bourne shell test script for the Yate external module interface # Generates 2 seconds of white noise # To test add a route to: external/play/noise.sh diff --git a/share/scripts/noroute.pl b/share/scripts/noroute.pl index 78e706fb..f6003195 100755 --- a/share/scripts/noroute.pl +++ b/share/scripts/noroute.pl @@ -2,7 +2,7 @@ ####################################################### # # noroute.pl is an demo script module for Yate using Yate.pm -# Copyright Anthony Minessale II +# Copyright Anthony Minessale II # This Module is released under the GNU Public License # If you find this software useful, donations are welcome # at paypal:anthmct@yahoo.com @@ -16,7 +16,7 @@ sub demo($) { my $message = shift; printf STDERR "hello time is %s and binded is %s i'll return undef so the next module gets a chance....\n", $message->param("time"),$message->header("binded"); -# return ("true"); +# return ("true"); return undef; } diff --git a/share/scripts/overlapped.php b/share/scripts/overlapped.php index 9973e516..ecbf504a 100755 --- a/share/scripts/overlapped.php +++ b/share/scripts/overlapped.php @@ -5,7 +5,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2005-2013 Null Team + * Copyright (C) 2005-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/share/scripts/pbxassist.php b/share/scripts/pbxassist.php index f53a8e40..6d88f035 100755 --- a/share/scripts/pbxassist.php +++ b/share/scripts/pbxassist.php @@ -5,7 +5,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2007-2013 Null Team + * Copyright (C) 2007-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/share/scripts/pickup.php b/share/scripts/pickup.php index 63de4e27..f89a617e 100755 --- a/share/scripts/pickup.php +++ b/share/scripts/pickup.php @@ -5,7 +5,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2008-2013 Null Team + * Copyright (C) 2008-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/share/scripts/play.sh b/share/scripts/play.sh index a3faf2fd..76a7f3cf 100755 --- a/share/scripts/play.sh +++ b/share/scripts/play.sh @@ -1,5 +1,23 @@ #!/bin/sh +# play.sh +# This file is part of the YATE Project http://YATE.null.ro +# +# Yet Another Telephony Engine - a fully featured software PBX and IVR +# Copyright (C) 2005-2014 Null Team +# +# This software is distributed under multiple licenses; +# see the COPYING file in the main directory for licensing +# information for this specific distribution. +# +# This use of this software may be subject to additional restrictions. +# See the LEGAL file in the main directory for details. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + # Bourne shell test script for the Yate external module interface # Plays sound using the "play" program (from the sox package) # To test add a route to: external/record/play.sh diff --git a/share/scripts/playrec.php b/share/scripts/playrec.php index 1707cdbf..14237e04 100755 --- a/share/scripts/playrec.php +++ b/share/scripts/playrec.php @@ -5,7 +5,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2005-2013 Null Team + * Copyright (C) 2005-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing @@ -195,7 +195,7 @@ while ($state != "") { for ($i = 0; $i < strlen($text); $i++) gotDTMF($text[$i]); $ev->handled = true; - } + } break; } /* This is extremely important. diff --git a/share/scripts/postanm_dtmf.php b/share/scripts/postanm_dtmf.php index 7c6acc0f..1941539b 100755 --- a/share/scripts/postanm_dtmf.php +++ b/share/scripts/postanm_dtmf.php @@ -5,7 +5,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2011-2013 Null Team + * Copyright (C) 2011-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/share/scripts/queue_in.php b/share/scripts/queue_in.php index 4ecec799..81dc6ed0 100755 --- a/share/scripts/queue_in.php +++ b/share/scripts/queue_in.php @@ -5,7 +5,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2008-2013 Null Team + * Copyright (C) 2008-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/share/scripts/queue_out.php b/share/scripts/queue_out.php index d4a6aef8..60704e5c 100755 --- a/share/scripts/queue_out.php +++ b/share/scripts/queue_out.php @@ -5,7 +5,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2008-2013 Null Team + * Copyright (C) 2008-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/share/scripts/registration.php b/share/scripts/registration.php index ca4e5e7d..59d82b5a 100755 --- a/share/scripts/registration.php +++ b/share/scripts/registration.php @@ -5,7 +5,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2005-2013 Null Team + * Copyright (C) 2005-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/share/scripts/resolver.php b/share/scripts/resolver.php index 65c9f336..6e07842a 100755 --- a/share/scripts/resolver.php +++ b/share/scripts/resolver.php @@ -5,7 +5,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2009-2013 Null Team + * Copyright (C) 2009-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/share/scripts/ringback.php b/share/scripts/ringback.php index 4f57b151..d426814f 100755 --- a/share/scripts/ringback.php +++ b/share/scripts/ringback.php @@ -5,7 +5,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2010-2013 Null Team + * Copyright (C) 2010-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/share/scripts/route.php b/share/scripts/route.php index e4d2ac37..6d5e1e83 100755 --- a/share/scripts/route.php +++ b/share/scripts/route.php @@ -5,7 +5,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/share/scripts/sipfeatures.php b/share/scripts/sipfeatures.php index f0756470..972ede61 100755 --- a/share/scripts/sipfeatures.php +++ b/share/scripts/sipfeatures.php @@ -5,7 +5,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2007-2013 Null Team + * Copyright (C) 2007-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/share/scripts/test.php b/share/scripts/test.php index 7b32db36..eb0289e0 100755 --- a/share/scripts/test.php +++ b/share/scripts/test.php @@ -5,7 +5,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2004-2013 Null Team + * Copyright (C) 2004-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/share/scripts/test.py b/share/scripts/test.py index aea7623b..cf262b92 100755 --- a/share/scripts/test.py +++ b/share/scripts/test.py @@ -7,7 +7,7 @@ test.py is a really small and minimal script to test and understand the libyate.py library. - It simply install "engine.timer" and intercept messages from + It simply install "engine.timer" and intercept messages from yate and log them to stderr for 10 times, after that the script uninstall engine.timer and exit. @@ -44,8 +44,8 @@ """ from libyate import Yate -""" -Python is Object Oriented language, so, define a "yourapp" class +""" +Python is Object Oriented language, so, define a "yourapp" class """ @@ -58,7 +58,7 @@ class YateApp: self.app.__Yatecall__ = self.retenv # this function will manage the imput from Yate. - # param "d" is the Yate.type variable for incoming message + # param "d" is the Yate.type variable for incoming message def retenv(self, d): if d == "": self.app.Output("PYTHON event: empty") @@ -74,9 +74,9 @@ class YateApp: self.app.Output("PYTHON Uninstalled: " + self.app.name ) else: self.app.Output("PYTHON event: " + self.app.type ) - - # clean shutdown of our application... + + # clean shutdown of our application... def uninstall(self): self.app.Uninstall("engine.timer") @@ -97,7 +97,7 @@ class YateApp: while True: # check for events self.app.flush() - + # uninstall engine.timer after 5 messages from Yate if self.count == 5: self.uninstall() @@ -107,7 +107,7 @@ class YateApp: self.count = 0 self.app.Install("engine.timer", 10) self.app.th_loop() - + # wow, amazing, the loop still running and we can continue in the execution! # dispatch a final test message after the main loop exit self.app.Yate("final_test") @@ -115,7 +115,7 @@ class YateApp: self.app.params = [ ['param1', 'value1'] ] self.app.Dispatch() - # now wait for 10 message from yate, and then uninstall the engine.timer and exit + # now wait for 10 message from yate, and then uninstall the engine.timer and exit while self.count != 10: pass self.uninstall() @@ -125,7 +125,7 @@ class YateApp: # close file descriptors self.app.close() - + # execution start here! if __name__ == '__main__': a = YateApp() diff --git a/share/scripts/test.sh b/share/scripts/test.sh index c718ff96..ac0991d5 100755 --- a/share/scripts/test.sh +++ b/share/scripts/test.sh @@ -1,5 +1,23 @@ #!/bin/sh +# test.sh +# This file is part of the YATE Project http://YATE.null.ro +# +# Yet Another Telephony Engine - a fully featured software PBX and IVR +# Copyright (C) 2005-2014 Null Team +# +# This software is distributed under multiple licenses; +# see the COPYING file in the main directory for licensing +# information for this specific distribution. +# +# This use of this software may be subject to additional restrictions. +# See the LEGAL file in the main directory for details. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + # Bourne shell test script for the Yate external module # To test add in extmodule.conf # diff --git a/share/scripts/testpbx.php b/share/scripts/testpbx.php index b4cfcb12..950b8d92 100755 --- a/share/scripts/testpbx.php +++ b/share/scripts/testpbx.php @@ -5,7 +5,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2008-2013 Null Team + * Copyright (C) 2008-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/share/scripts/voicemail.php b/share/scripts/voicemail.php index a2c0654a..e54651ae 100755 --- a/share/scripts/voicemail.php +++ b/share/scripts/voicemail.php @@ -5,7 +5,7 @@ * This file is part of the YATE Project http://YATE.null.ro * * Yet Another Telephony Engine - a fully featured software PBX and IVR - * Copyright (C) 2005-2013 Null Team + * Copyright (C) 2005-2014 Null Team * * This software is distributed under multiple licenses; * see the COPYING file in the main directory for licensing diff --git a/share/scripts/yaypm/README.txt b/share/scripts/yaypm/README.txt index a744bdb8..dc1d8746 100644 --- a/share/scripts/yaypm/README.txt +++ b/share/scripts/yaypm/README.txt @@ -3,8 +3,8 @@ Instalation One needs: Python 2.4(Python 2.5 is better as it allows to use inlineCallbacks), Twisted 2.x(http://twistedmatrix.com/projects/core/), and -Zope 3.x(http://www.zope.org/Products/ZopeInterface) -to use yaypm. +Zope 3.x(http://www.zope.org/Products/ZopeInterface) +to use yaypm. Then yaypm can be installed: python setup.py install diff --git a/share/scripts/yaypm/yaypm/__init__.py b/share/scripts/yaypm/yaypm/__init__.py index b48a2ec8..8139ea14 100644 --- a/share/scripts/yaypm/yaypm/__init__.py +++ b/share/scripts/yaypm/yaypm/__init__.py @@ -3,9 +3,9 @@ YAYPM - Yet Another Yate(http://yate.null.ro/) Python Module, uses Twisted 2.0 (http://twistedmatrix.com/projects/core/). - + Copyright (C) 2005 Maciek Kaminski - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or @@ -45,7 +45,7 @@ try: self.format(record)) except: self.handleError(record) - + except Exception: pass @@ -69,7 +69,7 @@ def embeddedStart(*args): class AbandonedException(Exception): """ Raised when deferred is abandoned by until condition. - + """ def __init__(self, cause): self.cause = cause @@ -78,14 +78,14 @@ class AbandonedException(Exception): class DisconnectedException(Exception): """ Raised when TCPDispatcher is disconnected. - + """ pass class CancelledError(Exception): """ Raised when ... - + """ pass @@ -97,7 +97,7 @@ class CancellableDeferred(defer.Deferred): defer.Deferred.__init__(self) self.canceller = canceller self.cancelled = False - + def cancel(self, *args, **kwargs): canceller = self.canceller if not self.called: @@ -117,24 +117,24 @@ class Dispatcher: """ Message dispatcher. Registers and fires message deferreds. """ - + def __init__(self): self.handlers = {} def _autoreturn(self, m): m.ret(True) return m - + def _register_handler(self, name, hdlr_type, guard, until, autoreturn): """ - Register message/watch handler. + Register message/watch handler. """ - + d = CancellableDeferred( lambda d, m = None : self._cancelHandler(m, name, hdlr_type, d)) - + key = (name, hdlr_type) - handlers = self.handlers.get(key, {}) + handlers = self.handlers.get(key, {}) if not handlers: self.handlers[key] = handlers handlers[d] = guard @@ -146,7 +146,7 @@ class Dispatcher: until.addBoth(until_callback) if autoreturn: d.addCallback(self._autoreturn) - + return d def is_handler_installed(name, hdlr_type): @@ -156,9 +156,9 @@ class Dispatcher: self, name, hdlr_type, guard, until, autoreturn = False): """ - Register message/watch handler. Install appropriate handler in yate. + Register message/watch handler. Install appropriate handler in yate. """ - + handler = self.handlers.get((name, hdlr_type), None) if handler == None: @@ -170,20 +170,20 @@ class Dispatcher: d = self.installMsgHandler(name) else: d = self.installWatchHandler(name) - + if d: d.addCallback( lambda _: self._register_handler(name, hdlr_type, guard, until, autoreturn)) return d - + return self._register_handler( name, hdlr_type, guard, until, autoreturn) - + def _fireHandlers(self, m, hdlr_type): """ Fire message/watch handlers. """ - + if logger_messages.isEnabledFor(logging.DEBUG): logger.debug( "searching for handlers of %s: %s", @@ -211,26 +211,26 @@ class Dispatcher: d.callback(m) if hdlr_type == _HANDLER_TYPE_MSG: break - + if logger_messages.isEnabledFor(logging.DEBUG): result = "Active handlers:\n" + "-"*80 for (name, type), handlers in self.handlers.iteritems(): result = result + "\n%s \"%s\": %d handler(s)" % \ (_MSG_TYPE_DSCS[type], name, len(handlers)) - result = result + "\n" + "-"*80 + result = result + "\n" + "-"*80 logger_messages.debug(result) - + return done def _removeHandler(self, name, hdlr_type, d2remove): """ - Remove message/watch handler + Remove message/watch handler """ - + key = (name, hdlr_type) if self.handlers.has_key(key): del self.handlers[key][d2remove] - + def _cancelHandler(self, m, name, hdlr_type, d): """ Cancel YAYPM deferred. @@ -242,7 +242,7 @@ class Dispatcher: raise AbandonedException(m) except: d.errback(failure.Failure()) - + def installMsgHandler(name, prio = 100): """ Install YATE message handler. Abstract. Implementation dependent. @@ -252,7 +252,7 @@ class Dispatcher: def installWatchHandler(name): """ Install YATE watch handler. Abstract. Implementation dependent. - """ + """ raise NotImplementedError("Abstract Method!") def msg(self, name, attrs = None, retValue = None): @@ -260,7 +260,7 @@ class Dispatcher: Create message. Abstract. Implementation dependent. """ raise NotImplementedError("Abstract Method!") - + def onmsg(self, name, guard = lambda _: True, until = None, autoreturn = False): """ @@ -272,7 +272,7 @@ class Dispatcher: def onwatch(self, name, guard = lambda _: True, until = None): """ Create deferred that will fire on specified watch. - """ + """ return self._register_and_install_handler( name, _HANDLER_TYPE_WCH, guard, until) @@ -280,16 +280,16 @@ class AbstractMessage: """ Message interface. """ - + def __init__(self): raise NotImplementedError("Abstract Method!") - + def getName(self): raise NotImplementedError("Abstract Method!") def __getitem__ (self, key): raise NotImplementedError("Abstract Method!") - + def __setitem__ (self, key, value): raise NotImplementedError("Abstract Method!") @@ -307,7 +307,7 @@ def _checkIfIsAlive(method): Guards EmbeddedDispatcher MessageProxy methods against calling in wrong states. """ - + def wrapper(self, *args, **kwargs): if self._gone: raise RuntimeError( @@ -319,7 +319,7 @@ def _checkIfIsAlive(method): class EmbeddedDispatcher(Dispatcher): """ - Dispatcher that works with embedded pymodule. + Dispatcher that works with embedded pymodule. """ class _MessageProxy(AbstractMessage): """ @@ -358,9 +358,9 @@ class EmbeddedDispatcher(Dispatcher): def ret(self, handled=True, retValue=None): if logger.isEnabledFor(logging.DEBUG): logger.debug("Retuning(%s): %s", str(handled), str(self)) - + if not self._result or not self._event: - raise RuntimeError("Can't return own message!") + raise RuntimeError("Can't return own message!") self._result[0] = handled if retValue != None: self.setRetValue(retValue) @@ -372,10 +372,10 @@ class EmbeddedDispatcher(Dispatcher): reactor.callFromThread(d.callback, result) @_checkIfIsAlive - def dispatch(self): + def dispatch(self): if logger.isEnabledFor(logging.DEBUG): logger.debug("Dispatching: %s", str(self)) - if self._result or self._event: + if self._result or self._event: raise RuntimeError("Can't dispatch incomming message!") d = defer.Deferred() reactor.callInThread(self._dispatchAndSignal, d) @@ -419,47 +419,47 @@ class EmbeddedDispatcher(Dispatcher): ## root_logger.addHandler(hdlr) ## logger_messages.setLevel(logging.INFO) - + Dispatcher.__init__(self) self._timeout = timeout - global embeddedStart + global embeddedStart embeddedStart = lambda start, args, kwargs: reactor.callLater(0, start, self, *args, **kwargs) for i, script in enumerate(scripts): try: name = "__embedded_yaypm_module__%d" % i - yateproxy.debug("yaypm", + yateproxy.debug("yaypm", logging.DEBUG, "Loading script: %s as %s" % (script, name)) imp.load_source(name, script) except Exception: - yateproxy.debug("pymodule(%s)" % "yaypm", + yateproxy.debug("pymodule(%s)" % "yaypm", logging.ERROR, "Exception while loading: %s\n%s\n%s" % (script, sys.exc_info()[1], string.join(traceback.format_tb(sys.exc_info()[2])))) - yateproxy.debug("pymodule(%s)" % "yaypm", + yateproxy.debug("pymodule(%s)" % "yaypm", logging.WARN, "Reactor thread not started!") self.thread = None return - + self.thread = Thread( name = "pymodule script thread", target = reactor.run, kwargs = {"installSignalHandlers": 0}) self.interpreter = interpreter - + self.thread.start() - yateproxy.debug("pymodule(%s)" % "yaypm", + yateproxy.debug("pymodule(%s)" % "yaypm", logging.INFO, "Reactor thread started!") - + def installMsgHandler(self, name, prio = 100): """ Install Pymodule message handler. @@ -468,7 +468,7 @@ class EmbeddedDispatcher(Dispatcher): self.handlers[key] = self.handlers.get(key, {}) yateproxy.installMsgHandler(self.interpreter, name, prio) return None - + #d = CancellableDeferred() #d.callback(True) #return d @@ -481,7 +481,7 @@ class EmbeddedDispatcher(Dispatcher): self.handlers[key] = self.handlers.get(key, {}) yateproxy.installWatchHandler(self.interpreter, name) return None - + #d = CancellableDeferred() #d.callback(True) #return d @@ -490,7 +490,7 @@ class EmbeddedDispatcher(Dispatcher): """ Create YATE message wrapped with MessageProxy. """ - + m = EmbeddedDispatcher._MessageProxy( yateproxy.message_create(name, str(retValue))) @@ -498,22 +498,22 @@ class EmbeddedDispatcher(Dispatcher): for key, value in attrs.iteritems(): m[key] = str(value) return m - + def _stop(self): """ Stop dispatcher by stopping reactor. """ - + reactor.callFromThread(reactor.stop) if self.thread: while self.thread.isAlive(): self.thread.join(1) - + def _fireHandlersAndSignal(self, m, hdlr_type): """ Fire message handlers. Signal completion. - """ + """ try: if not self._fireHandlers(m, hdlr_type): m._event.set() @@ -523,11 +523,11 @@ class EmbeddedDispatcher(Dispatcher): def _timeoutHandler(self, m): if not m._event.isSet(): logger.warn("Message %s not returned in %d sec!", m, self._timeout) - + def _enqueEmbeddedMessage(self, yateMessage): """ Fire message handlers in reactor. Wait for completion. - """ + """ result = [False] event = Event() @@ -543,11 +543,11 @@ class EmbeddedDispatcher(Dispatcher): """ Fire watch handlers by reactor. It is a copy not the original message. It is better than making this call synchronous. - """ + """ reactor.callFromThread( self._fireHandlers, EmbeddedDispatcher._MessageProxy(yateMessage), _HANDLER_TYPE_WCH) - + def escape(str, extra = ":"): """ @@ -586,12 +586,12 @@ def unescape(str): i = i + 1 return s - + class TCPDispatcher(Dispatcher, LineReceiver): """ - Dispatcher that works over ExtMod protocol. + Dispatcher that works over ExtMod protocol. """ - + class _TCPMessage(AbstractMessage): """ Message interface. @@ -612,12 +612,12 @@ class TCPDispatcher(Dispatcher, LineReceiver): self._timestamp = timestamp else: self._timestamp = long(time.time()) - - if mid: + + if mid: self._mid = mid else: self._mid = str(self._timestamp) + str(random.randrange(1, 10000, 1)) - + self._returned = returned self._retvalue = retvalue @@ -651,7 +651,7 @@ class TCPDispatcher(Dispatcher, LineReceiver): result = result + ":" + escape(self._name) - if self._retvalue: + if self._retvalue: result = result + ":" + escape(str(self._retvalue)) else: result = result + ":" @@ -663,7 +663,7 @@ class TCPDispatcher(Dispatcher, LineReceiver): """ %%>message::