[-]
[+]
|
Changed |
asterisk.changes
|
|
[-]
[+]
|
Changed |
asterisk.spec
^
|
|
[-]
[+]
|
Deleted |
asterisk-1.8.28.2.tar.xz/asterisk-1.8.28.2-summary.html
^
|
@@ -1,68 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>Release Summary - asterisk-1.8.28.2</title></head>
-<body>
-<h1 align="center"><a name="top">Release Summary</a></h1>
-<h3 align="center">asterisk-1.8.28.2</h3>
-<h3 align="center">Date: 2014-06-13</h3>
-<h3 align="center"><asteriskteam@digium.com></h3>
-<hr/>
-<h2 align="center">Table of Contents</h2>
-<ol>
- <li><a href="#summary">Summary</a></li>
- <li><a href="#contributors">Contributors</a></li>
- <li><a href="#commits">Other Changes</a></li>
- <li><a href="#diffstat">Diffstat</a></li>
-</ol>
-<hr/>
-<a name="summary"><h2 align="center">Summary</h2></a>
-<center><a href="#top">[Back to Top]</a></center><br/><p>This release has been made to address one or more security vulnerabilities that have been identified. A security advisory document has been published for each vulnerability that includes additional information. Users of versions of Asterisk that are affected are strongly encouraged to review the advisories and determine what action they should take to protect their systems from these issues.</p>
-<p>Security Advisories: <a href="http://downloads.asterisk.org/pub/security/AST-2014-007.html">AST-2014-007</a></p>
-<p>The data in this summary reflects changes that have been made since the previous release, asterisk-1.8.28.0.</p>
-<hr/>
-<a name="contributors"><h2 align="center">Contributors</h2></a>
-<center><a href="#top">[Back to Top]</a></center><br/><p>This table lists the people who have submitted code, those that have tested patches, as well as those that reported issues on the issue tracker that were resolved in this release. For coders, the number is how many of their patches (of any size) were committed into this release. For testers, the number is the number of times their name was listed as assisting with testing a patch. Finally, for reporters, the number is the number of issues that they reported that were closed by commits that went into this release.</p>
-<table width="100%" border="0">
-<tr>
-<td width="33%"><h3>Coders</h3></td>
-<td width="33%"><h3>Testers</h3></td>
-<td width="33%"><h3>Reporters</h3></td>
-</tr>
-<tr valign="top">
-<td>
-5 bebuild<br/>
-</td>
-<td>
-</td>
-<td>
-</td>
-</tr>
-</table>
-<hr/>
-<a name="commits"><h2 align="center">Commits Not Associated with an Issue</h2></a>
-<center><a href="#top">[Back to Top]</a></center><br/><p>This is a list of all changes that went into this release that did not directly close an issue from the issue tracker. The commits may have been marked as being related to an issue. If that is the case, the issue numbers are listed here, as well.</p>
-<table width="100%" border="1">
-<tr><td><b>Revision</b></td><td><b>Author</b></td><td><b>Summary</b></td><td><b>Issues Referenced</b></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/tags/1.8.28.2?view=revision&revision=416056">416056</a></td><td>bebuild</td><td>Create 1.8.28.2</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/tags/1.8.28.2?view=revision&revision=416061">416061</a></td><td>bebuild</td><td>Update .version, remove summaries</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/tags/1.8.28.2?view=revision&revision=416068">416068</a></td><td>bebuild</td><td>Merge fix for regression caused by fix for AST-2014-007</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/tags/1.8.28.2?view=revision&revision=416082">416082</a></td><td>bebuild</td><td>Importing release summary for 1.8.28.2 release.</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/tags/1.8.28.2?view=revision&revision=416138">416138</a></td><td>bebuild</td><td>Update ChangeLog</td>
-<td></td></tr></table>
-<hr/>
-<a name="diffstat"><h2 align="center">Diffstat Results</h2></a>
-<center><a href="#top">[Back to Top]</a></center><br/><p>This is a summary of the changes to the source code that went into this release that was generated using the diffstat utility.</p>
-<pre>
-.version | 2
-ChangeLog | 13 +++++
-asterisk-1.8.28.1-summary.html | 70 ----------------------------
-asterisk-1.8.28.1-summary.txt | 101 -----------------------------------------
-channels/chan_sip.c | 6 ++
-include/asterisk/tcptls.h | 14 +++++
-main/http.c | 3 +
-main/manager.c | 6 ++
-main/tcptls.c | 17 ++++++
-9 files changed, 59 insertions(+), 173 deletions(-)
-</pre><br/>
-<hr/>
-</body>
-</html>
|
[-]
[+]
|
Deleted |
asterisk-1.8.28.2.tar.xz/asterisk-1.8.28.2-summary.txt
^
|
@@ -1,103 +0,0 @@
- Release Summary
-
- asterisk-1.8.28.2
-
- Date: 2014-06-13
-
- <asteriskteam@digium.com>
-
- ----------------------------------------------------------------------
-
- Table of Contents
-
- 1. Summary
- 2. Contributors
- 3. Other Changes
- 4. Diffstat
-
- ----------------------------------------------------------------------
-
- Summary
-
- [Back to Top]
-
- This release has been made to address one or more security vulnerabilities
- that have been identified. A security advisory document has been published
- for each vulnerability that includes additional information. Users of
- versions of Asterisk that are affected are strongly encouraged to review
- the advisories and determine what action they should take to protect their
- systems from these issues.
-
- Security Advisories: AST-2014-007
-
- The data in this summary reflects changes that have been made since the
- previous release, asterisk-1.8.28.0.
-
- ----------------------------------------------------------------------
-
- Contributors
-
- [Back to Top]
-
- This table lists the people who have submitted code, those that have
- tested patches, as well as those that reported issues on the issue tracker
- that were resolved in this release. For coders, the number is how many of
- their patches (of any size) were committed into this release. For testers,
- the number is the number of times their name was listed as assisting with
- testing a patch. Finally, for reporters, the number is the number of
- issues that they reported that were closed by commits that went into this
- release.
-
- Coders Testers Reporters
- 5 bebuild
-
- ----------------------------------------------------------------------
-
- Commits Not Associated with an Issue
-
- [Back to Top]
-
- This is a list of all changes that went into this release that did not
- directly close an issue from the issue tracker. The commits may have been
- marked as being related to an issue. If that is the case, the issue
- numbers are listed here, as well.
-
- +------------------------------------------------------------------------+
- | Revision | Author | Summary | Issues Referenced |
- |----------+---------+-------------------------------+-------------------|
- | 416056 | bebuild | Create 1.8.28.2 | |
- |----------+---------+-------------------------------+-------------------|
- | 416061 | bebuild | Update .version, remove | |
- | | | summaries | |
- |----------+---------+-------------------------------+-------------------|
- | | | Merge fix for regression | |
- | 416068 | bebuild | caused by fix for | |
- | | | AST-2014-007 | |
- |----------+---------+-------------------------------+-------------------|
- | 416082 | bebuild | Importing release summary for | |
- | | | 1.8.28.2 release. | |
- |----------+---------+-------------------------------+-------------------|
- | 416138 | bebuild | Update ChangeLog | |
- +------------------------------------------------------------------------+
-
- ----------------------------------------------------------------------
-
- Diffstat Results
-
- [Back to Top]
-
- This is a summary of the changes to the source code that went into this
- release that was generated using the diffstat utility.
-
- .version | 2
- ChangeLog | 13 +++++
- asterisk-1.8.28.1-summary.html | 70 ----------------------------
- asterisk-1.8.28.1-summary.txt | 101 -----------------------------------------
- channels/chan_sip.c | 6 ++
- include/asterisk/tcptls.h | 14 +++++
- main/http.c | 3 +
- main/manager.c | 6 ++
- main/tcptls.c | 17 ++++++
- 9 files changed, 59 insertions(+), 173 deletions(-)
-
- ----------------------------------------------------------------------
|
|
Deleted |
asterisk-1.8.29.0.tar.xz
^
|
[-]
[+]
|
Changed |
asterisk-1.8.30.0.tar.xz/.version
^
|
@@ -1 +1 @@
-1.8.28.2
+1.8.30.0
|
[-]
[+]
|
Changed |
asterisk-1.8.30.0.tar.xz/ChangeLog
^
|
@@ -1,58 +1,668 @@
-2014-06-13 Asterisk Development Team <asteriskteam@digium.com>
+2014-08-19 Asterisk Development Team <asteriskteam@digium.com>
- * Asterisk 1.8.28.2 Released.
+ * Asterisk 1.8.30.0 Released.
- * AST-2014-007: Fix of fix to allow AMI and SIP TCP to send messages.
+2014-08-11 Asterisk Development Team <asteriskteam@digium.com>
- The original fix for AST-2014-007 inadvertently introduced a
- regression in Asterisk's TCP and TLS handling that prevented
- Asterisk from sending data over these transports. This patch fixes
- that regression.
+ * Asterisk 1.8.30.0-rc1 Released.
-2014-06-12 Asterisk Development Team <asteriskteam@digium.com>
-
- * Asterisk 1.8.28.1 Released.
-
- * AST-2014-007: Fix DOS by consuming the number of allowed HTTP
- connections.
-
- Simply establishing a TCP connection and never sending anything to
- the configured HTTP port in http.conf will tie up a HTTP connection.
- Since there is a maximum number of open HTTP sessions allowed at a
- time you can block legitimate connections.
-
- A similar problem exists if a HTTP request is started but never
- finished.
-
- * Added http.conf session_inactivity timer option to close HTTP
- connections that aren't doing anything. Defaults to 30000 ms.
-
- * Removed the undocumented manager.conf block-sockets option. It
- interferes with TCP/TLS inactivity timeouts.
-
- * AMI and SIP TLS connections now have better authentication timeout
- protection. Though I didn't remove the bizzare TLS timeout polling
- code from chan_sip.
-
- * chan_sip can now handle SSL certificate renegotiations in the
- middle of a session. It couldn't do that before because the socket
- was non-blocking and the SSL calls were not restarted as documented
- by the OpenSSL documentation.
-
- * Fixed an off nominal leak of the ssl struct in
- handle_tcptls_connection() if the FILE stream failed to open and
- the SSL certificate negotiations failed.
-
- The patch creates a custom FILE stream handler to give the created FILE
- streams inactivity timeout and timeout after a specific moment in time
- capability. This approach eliminates the need for code using the FILE
- stream to be redesigned to deal with the timeouts.
-
- This patch indirectly fixes most of ASTERISK-18345 by fixing the usage
- of the SSL_read/SSL_write operations.
-
- ASTERISK-23673 #close
- Reported by: Richard Mudgett
+2014-08-11 10:24 +0000 [r420654-420680] Walter Doekes <walter+asterisk@wjd.nu>
+
+ * main/utils.c: general: Fix memory Corruption in
+ __ast_string_field_ptr_build_va. If the space left in a
+ stringfield is between 0 and
+ (alignof(ast_string_field_allocation)-1) adding new data would
+ cause memory corruption, because we would assume enough space
+ (unsigned underrun). Thanks Arnd Schmitter for reporting and
+ finding out the cause! ASTERISK-23508 #close Reported by: Arnd
+ Schmitter Tested by: Arnd Schmitter, JoshE Review:
+ https://reviewboard.asterisk.org/r/3898/
+
+ * main/tcptls.c: tcptls: Avoid compiler warning on non-dev-mode.
+
+2014-08-07 21:25 +0000 [r420434] Richard Mudgett <rmudgett@digium.com>
+
+ * channels/chan_sip.c: chan_sip: Replace sip_tls_read() and resolve
+ the large SDP poll issue. Replace sip_tls_read() and
+ sip_tcp_read() with a single function and resolve the poll/wait
+ issue with large SDP payloads. ASTERISK-18345 #close Reported by:
+ Stephane Chazelas Patches: tcptls_pollv4.diff (license #5835)
+ patch uploaded by Elazar Broad Review:
+ https://reviewboard.asterisk.org/r/3882/
+
+2014-08-06 16:05 +0000 [r420146] George Joseph <george.joseph@fairview5.com>
+
+ * pbx/pbx_lua.c, main/pbx.c: pbx_lua: fix regression with global
+ sym export and context clash by pbx_config. ASTERISK-23818 (lua
+ contexts being overwritten by contexts of the same name in
+ pbx_config) surfaced because pbx_lua, having the
+ AST_MODFLAG_GLOBAL_SYMBOLS set, was always force loaded before
+ pbx_config. Since I couldn't find any reason for pbx_lua to
+ export it's symbols to the rest of Asterisk, I simply changed the
+ flag to AST_MODFLAG_DEFAULT. Problem solved. What I didn't
+ realize was that the symbols need to be exported not because
+ Asterisk needs them but because any external Lua modules like
+ luasql.mysql need the base Lua language APIs exported
+ (ASTERISK-17279). Back to ASTERISK-23818... It looks like there's
+ an issue in pbx.c where context_merge was only merging includes,
+ switches and ignore patterns if the context was already existing
+ AND has extensions, or if the context was brand new. If pbx_lua
+ is loaded before pbx_config, the context will exist BUT pbx_lua,
+ being implemented as a switch, will never place extensions in it,
+ just the switch statement. The result is that when pbx_config
+ loads, it never merges the switch statement created by pbx_lua
+ into the final context. This patch sets pbx_lua's modflag back to
+ AST_MODFLAG_GLOBAL_SYMBOLS and adds an "else if" in context_merge
+ that catches the case where an existing context has includes,
+ switchs or ingore patterns but no actual extensions.
+ ASTERISK-23818 #close Reported by: Dennis Guse Reported by: Timo
+ Teräs Tested by: George Joseph Review:
+ https://reviewboard.asterisk.org/r/3891/
+
+2014-08-04 19:42 +0000 [r419942] Rusty Newton <rnewton@digium.com>
+
+ * main/manager.c: Manager - Improve documentation for manager
+ commands Getvar and Setvar. The documentation for these commands
+ did not make it clear that they could accept expressions and
+ functions. Modified to make this clear, but tried not to be
+ overly explicit. ASTERISK-21178 #close Reported by: Rusty Newton
+ Tested by: Rusty Newton Review:
+ https://reviewboard.asterisk.org/r/3854
+
+2014-07-28 18:27 +0000 [r419684] Richard Mudgett <rmudgett@digium.com>
+
+ * apps/app_queue.c, apps/app_speech_utils.c,
+ funcs/func_frame_trace.c: datastores: Audit
+ ast_channel_datastore_remove usage. Audit of v1.8 usage of
+ ast_channel_datastore_remove() for datastore memory leaks. *
+ Fixed leaks in app_speech_utils and func_frame_trace. * Fixed
+ app_speech_utils not locking the channel when accessing the
+ channel datastore list. Review:
+ https://reviewboard.asterisk.org/r/3859/
+
+2014-07-25 23:04 +0000 [r419630] Richard Mudgett <rmudgett@digium.com>
+
+ * include/asterisk/app.h, main/features.c, main/app.c,
+ apps/app_stack.c: features.c: Allow appliationmap to use Gosub.
+ Using DYNAMIC_FEATURES with a Gosub application as the mapped
+ application does not work. It does not work because Gosub just
+ pushes the current dialplan context, exten, and priority onto a
+ stack and sets the specified Gosub location. Gosub does not have
+ a dialplan execution loop to run dialplan like Macro. * Made the
+ DYNAMIC_FEATURES application mapping feature call
+ ast_app_exec_macro() and ast_app_exec_sub() for the Macro and
+ Gosub applications respectively. * Backported
+ ast_app_exec_macro() and ast_app_exec_sub() from v11 to execute
+ dialplan routines from the DYNAMIC_FEATURES application mapping
+ feature. NOTE: This issue does not affect v12+ because it already
+ does what this patch implements. AST-1391 #close Reported by:
+ Guenther Kelleter Review:
+ https://reviewboard.asterisk.org/r/3844/
+
+2014-07-24 17:55 +0000 [r419440] Corey Farrell <git@cfware.com>
+
+ * channels/chan_sip.c: chan_sip: sip_subscribe_mwi_destroy should
+ not call sip_destroy sip_subscribe_mwi_destroy calls sip_destroy
+ on the reference counted mwi->call. This results in the fields of
+ mwi->call being freed, but mwi->call itself it leaked. If other
+ code is still using mwi->call it can cause problems. This change
+ uses dialog_unref instead, to balance the ref provided by
+ sip_alloc(). ASTERISK-24087 #close Reported by: Corey Farrell
+ Review: https://reviewboard.asterisk.org/r/3834/
+
+2014-07-24 16:47 +0000 [r419374] Jason Parker <jparker@digium.com>
+
+ * addons/chan_ooh323.c: Don't cause Asterisk to exit if ooh323.conf
+ not found. (closes issue ASTERISK-23814)
+
+2014-07-22 13:17 +0000 [r419129] Kinsey Moore <kmoore@digium.com>
+
+ * addons/chan_ooh323.c, tests/test_astobj2_thrash.c,
+ apps/app_meetme.c, tests/test_logger.c,
+ addons/ooh323c/src/decode.c, tests/test_event.c,
+ tests/test_aoc.c, tests/test_hashtab_thrash.c,
+ tests/test_astobj2.c, addons/ooh323c/src/printHandler.c,
+ addons/ooh323c/src/ooq931.c: Fix more dev-mode build issues
+
+2014-07-15 17:19 +0000 [r418641] Jonathan Rose <jrose@digium.com>
+
+ * funcs/func_uri.c: func_uri: URIENCODE/URIDECODE - allow empty
+ strings as argument Previously these two dialplan functions would
+ issue warnings and return failure when an empty string is used as
+ the argument. Now they will not issue a warning and will
+ successfully return an empty string. ASTERISK-23911 #close
+ Reported by: Matt Jordan Review:
+ https://reviewboard.asterisk.org/r/3745/
+
+2014-07-13 21:47 +0000 [r418504] Corey Farrell <git@cfware.com>
+
+ * main/astobj2.c, contrib/scripts/refcounter.py: astobj2: work
+ around REF_DEBUG race which causes out of order log entries *
+ Update refcounter.py to use delta's to track the current
+ reference count. * Use result from internal_ao2_ref to write
+ old_refcount to refs_log. Review:
+ https://reviewboard.asterisk.org/r/3756/
+
+2014-07-10 01:23 +0000 [r418261] Richard Mudgett <rmudgett@digium.com>
+
+ * channels/sig_pri.c: chan_dahdi/sig_pri: Fix type mismatch in the
+ idledial feature's channel creation. Square pegs in round holes
+ don't work very well.
+
+2014-07-10 Asterisk Development Team <asteriskteam@digium.com>
+
+ * Asterisk 1.8.29.0 Released.
+
+2014-07-08 Asterisk Development Team <asteriskteam@digium.com>
+
+ * Asterisk 1.8.29.0-rc1 Released.
+
+2014-07-03 21:38 +0000 [r417956] Richard Mudgett <rmudgett@digium.com>
+
+ * channels/sig_pri.c, channels/sig_pri.h, channels/chan_dahdi.c,
+ configs/chan_dahdi.conf.sample, UPGRADE.txt: chan_dahdi: Add
+ inband_on_setup_ack compatibility option. The new
+ inband_on_setup_ack option causes Asterisk to assume inband audio
+ may be present when a SETUP_ACKNOWLEDGE message is received.
+ Q.931 Section 5.1.3 says that in scenarios with overlap dialing,
+ when a dialtone is sent from the network side, progress indicator
+ 8 "Inband info now available" MAY be sent to the CPE if no digits
+ were received with the SETUP. It is thus implied that the ie is
+ mandatory if digits came with the SETUP and dialtone is needed.
+ This option should be enabled, when the network sends dialtone
+ and you want to hear it, but the network doesn't send the
+ progress indicator when needed. NOTE: For Q.SIG setups this
+ option should be enabled when outgoing overlap dialing is also
+ enabled because Q.SIG does not send the progress indicator with
+ the SETUP ACK. The commit -r413714 (AST-1338) which causes this
+ issue was dealing with a SIP-to-ISDN interoperability issue. This
+ commit is a merge of the two patches indicated below.
+ ASTERISK-23897 #close Reported by: Pavel Troller Patches:
+ pri-4.diff (license #6302) patch uploaded by Pavel Troller
+ jira_asterisk_23897_v11.patch (license #5621) patch uploaded by
+ rmudgett Review: https://reviewboard.asterisk.org/r/3633/
+
+2014-07-03 11:19 +0000 [r417797] Matthew Jordan <mjordan@digium.com>
+
+ * main/utils.c: main/untils: Prevent potential infinite loop in
+ ast_careful_fwrite A loop in ast_careful_fwrite exists that will
+ continually attempt to write to a file stream, even in the
+ presence of EAGAIN/EINTR errors. However, if a connection that
+ uses ast_careful_fwrite closes suddenly, ast_careful_fwrite's
+ call to fflush may return EAGAIN/EINTER along with EOF. A
+ subsequent call to fflush will return EOF but not clear errno,
+ resulting in an infinite loop. This patch clears errno after it
+ is detected and handled the loop, such that any subsequent call
+ to fflush will not get erroneously stuck. Review:
+ https://reviewboard.asterisk.org/r/3704 ASTERISK-23984 #close
+ Reported by: Steve Davies patches: fflush_loop_fix uploaded by
+ one47 (License 5012)
+
+2014-06-30 03:20 +0000 [r417587] Matthew Jordan <mjordan@digium.com>
+
+ * channels/chan_sip.c: chan_sip: be more tolerant of whitespace
+ between attributes in SDP fmtp line This patch is essentially a
+ backport of a small portion of r397526 from ASTERISK-21981. In
+ that patch, pass through support and format attribute negotiation
+ was added for Opus. Part of that included being more tolerant to
+ whitespace in the fmtp line of an SDP; that part of the patch is
+ being applied here. As the author of the backport pointed out, in
+ SDP, the fmtp line is allowed to include whitespace between
+ attributes. RFC 3267 chapter 8.3 (from 2001) includes an example
+ for this. This was not removed in the updated RFC 4867 in 2007.
+ Note that this patch only applies to audio in Asterisk 1.8, which
+ is a bit more limited in its support for format attributes. It
+ does have limited support for some codecs, so this patch is still
+ useful in this version. Review:
+ https://reviewboard.asterisk.org/r/3658 ASTERISK-23916 Reported
+ by: Alexander Traud patches: sdpFMTPspace_Asterisk11.patch
+ uploaded by Alexander Traud (License 6520)
+
+2014-06-27 19:24 +0000 [r417480-417500] Corey Farrell <git@cfware.com>
+
+ * main/astobj2.c: Ensure REF_DEBUG records entrys for attempts to
+ ao2_ref an invalid object This change ensures that
+ __ao2_ref_debug writes to ref_log when given a non-NULL pointer
+ to an invalid ao2 object. This is to ensure that we record any
+ attempt manipulate references of already freed objects.
+ ASTERISK-23948 #close Reported by: Corey Farrell Review:
+ https://reviewboard.asterisk.org/r/3677/
+
+ * contrib/scripts/refcounter.py: refcounter.py: prevent use of
+ excessive RAM with large refs logs When processing a 212MB refs
+ file, refcounter.py used over 3GB of RAM. This change greatly
+ reduces memory usage in two ways: * Saving object history in
+ whole lines instead of separated values. * Not saving
+ normal/skewed/leaked object lists unless they are requested.
+ ASTERISK-23921 #close Reported by: Corey Farrell Review:
+ https://reviewboard.asterisk.org/r/3668/
+
+2014-06-26 12:21 +0000 [r417318] Matthew Jordan <mjordan@digium.com>
+
+ * main/udptl.c: udptl: Correct FEC to not consider negative
+ sequence numbers as missing When using FEC, with span=3 and
+ entries=4 Asterisk will attempt to repair the packet with
+ sequence number 5, as it will see that packet -4 is missing. The
+ result is Asterisk sending garbage packets that can kill a fax.
+ This patch adds a check to see if the sequence number is valid
+ before checking if the packet is missing. Review:
+ https://reviewboard.asterisk.org/r/3657/ ASTERISK-23908 #close
+ Reported by: Torrey Searle patches: udptl_fec.patch uploaded by
+ Torrey Searle (License 5334)
+
+2014-06-26 10:02 +0000 [r417248] Corey Farrell <git@cfware.com>
+
+ * channels/chan_sip.c: chan_sip: Fix handling of "From" headers
+ longer than 256 characters From headers were processed using a
+ 256 character buffer on the stack. This change replaces that with
+ a heap allocation by ast_strdup. ASTERISK-23790 #close Reported
+ by: uniken1 Tested by: uniken1 Review:
+ https://reviewboard.asterisk.org/r/3669/ Patches:
+ chan_sip-large-from-header-1.8-r3.patch uploaded by wdoekes
+ (license 5674)
+
+2014-06-23 14:34 +0000 [r417076] Rusty Newton <rnewton@digium.com>
+
+ * configs/features.conf.sample: main/features - documentation -
+ reformat examples and options in features.conf.sample to show
+ clearly which options apply in which section The features.conf
+ sample can be a bit confusing about what parking options can be
+ set only in the general context, or both in the general context
+ (for the default parking lot) and in other parking lot contexts.
+ A bug was filed due to confusion and a little googling will show
+ lots of other confused users. Despite some comments on the
+ individual options, it still reads in a confusing way. In this
+ patch I separate out those options with some headings in to
+ attempt a better layout. I went ahead and modified other headings
+ in the file, or added them to facilitate better visual scanning.
+ ASTERISK-23667 #close Review:
+ https://reviewboard.asterisk.org/r/3621/
+
+2014-06-22 20:46 +0000 [r417016] George Joseph <george.joseph@fairview5.com>
+
+ * Makefile.rules, Makefile: build: Turn FORTIFY_SOURCE off if
+ DONT_OPTIMIZE is set. AST_FORTIFY_SOURCE is automatically set in
+ ./Makefile even if DONT_OPTIMIZE is set in menuselect. This
+ causes gcc to complain that _FORTIFY_SOURCE requires optimization
+ and the build will fail. You can specify "make
+ AST_FORTIFY_SOURCE=''" but I always forget. This patch moves the
+ set of AST_FORTIFY_SOURCE to Makefile.rules and only sets it if
+ DONT_OPTIMIZE is "no". The move is necessary because the
+ top-level Makefile doesn't include menuselect.makeopts. This
+ doesn't solve the entire problem however because res_config_mysql
+ seems to force _FORTIFY_SOURCE so res_config_mysql has to be
+ disabled for now if DONT_OPTIMIZE is set. Tested by: George
+ Joseph Review: https://reviewboard.asterisk.org/r/3664/
+
+2014-06-20 23:12 +0000 [r416869-416929] George Joseph <george.joseph@fairview5.com>
+
+ * configure, include/asterisk/autoconfig.h.in: build: Allow
+ autoconf/ast_ext_tool_check to handle cross-compiling better.
+ ast_ext_tool_check.m4 isn't handling cases where a path to a
+ package is provided (E.G. --with-mysqlclient=/some/sysroot) and
+ the package has a config tool (E.G. mysql_config) and the package
+ has its own subdirectories in include or lib. For example,
+ mysql's libraries are in ${MYSQLCLIENT_DIR}/usr/lib/mysql but
+ ast_ext_tool_check sets MYSQLCLIENT_LIB to
+ ${MYSQLCLIENT_DIR}/usr/lib. libxml2 has the same problem with its
+ includes. They're in ${LIBXML2_DIR}/usr/include/libxml2 not
+ directly in ${LIBXML2_DIR}/usr/include. Both cause configure to
+ fail and there are others in the same boat. The problem is caused
+ by logic in ast_ext_tool_check that overrides the result of the
+ config tool's --cflags and --libs options if package_DIR is set.
+ This patch prepends package_DIR (if specified) to the -L and -I
+ results from the package's config tool instead of overriding
+ them. A regenerated ./configure and
+ include/asterisk/autoconfig.h.in are included but can be
+ regenerated by running ./bootstrap.sh at any time. Tested by:
+ George Joseph Tested by: Matt Jordan Review:
+ https://reviewboard.asterisk.org/r/3550/
+
+ * autoconf/ast_ext_tool_check.m4: build: Allow
+ autoconf/ast_ext_tool_check to handle cross-compiling better.
+ ast_ext_tool_check.m4 isn't handling cases where a path to a
+ package is provided (E.G. --with-mysqlclient=/some/sysroot) and
+ the package has a config tool (E.G. mysql_config) and the package
+ has its own subdirectories in include or lib. For example,
+ mysql's libraries are in ${MYSQLCLIENT_DIR}/usr/lib/mysql but
+ ast_ext_tool_check sets MYSQLCLIENT_LIB to
+ ${MYSQLCLIENT_DIR}/usr/lib. libxml2 has the same problem with its
+ includes. They're in ${LIBXML2_DIR}/usr/include/libxml2 not
+ directly in ${LIBXML2_DIR}/usr/include. Both cause configure to
+ fail and there are others in the same boat. The problem is caused
+ by logic in ast_ext_tool_check that overrides the result of the
+ config tool's --cflags and --libs options if package_DIR is set.
+ This patch prepends package_DIR (if specified) to the -L and -I
+ results from the package's config tool instead of overriding
+ them. Tested by: George Joseph Tested by: Matt Jordan Review:
+ https://reviewboard.asterisk.org/r/3550/
+
+2014-06-19 19:33 +0000 [r416732] Kinsey Moore <kmoore@digium.com>
+
+ * channels/sip/reqresp_parser.c, main/test.c: Fix build warnings
+ with TEST_FRAMEWORK enabled
+
+2014-06-19 15:59 +0000 [r416578-416667] George Joseph <george.joseph@fairview5.com>
+
+ * pbx/pbx_lua.c: Remove the problematic and unneeded
+ AST_MODFLAG_GLOBAL_SYMBOLS from pbx_lua.c
+ AST_MODFLAG_GLOBAL_SYMBOLS was causing the module to be
+ incorrectly loaded before pbx_config. pbx_config was therefore
+ blowing away contexts that were created by pbx_lua. With
+ AST_MODFLAG_DEFAULT the load order is now correct and contexs are
+ being properly merged. AST_MODFLAG_GLOBAL_SYMBOLS was not needed
+ anyway since no other modules needed its global symbols that
+ early. ASTERISK-23818 #close Reported by: Dennis Guse Tested by:
+ Dennis Guse Tested by: George Joseph Review:
+ https://reviewboard.asterisk.org/r/3629/
+
+ * configs/extensions.lua.sample: Update extensions.lua.sample with
+ naming conflict guidance. The sample extensions.lua was causing
+ pbx_lua to fail to load when parsing 'app.goto("default", "s",
+ 1)' because in Lua 5.2, 'goto' is now a reserved word. This patch
+ adds guidance to extensions.lua.sample and changed
+ 'app.goto("default", "s", 1)' to 'app.['goto']("default", "s",
+ 1)'. https://reviewboard.asterisk.org/r/3627/ ASTERISK-23844
+ #comment This commit fixes 1.8, patch for 11->trunk coming.
+
+2014-06-17 18:22 +0000 [r416500] Mark Michelson <mmichelson@digium.com>
+
+ * funcs/func_strings.c: Allow the PUSH and UNSHIFT functions to set
+ inheritable channel variables.
+
+2014-06-17 16:20 +0000 [r416439] Kinsey Moore <kmoore@digium.com>
+
+ * res/res_musiconhold.c: MoH: Don't restart stream on repeated
+ start calls Currently, music on hold will stop and then start
+ again from the beginning if ast_moh_start() is called multiple
+ times. This can happen if a call is put on hold repeatedly (the
+ channel receives multiple HOLD control frames) and can be
+ triggered from ARI by starting MoH on a channel multiple times.
+ This is fairly jarring/annoying to users. This change prevents
+ MoH from being restarted if the requested music class is the same
+ as the one currently playing. This includes an extra check to
+ prevent the errors previously experienced in the testsuite and
+ has 100+ test runs behind it. Review:
+ https://reviewboard.asterisk.org/r/3615/
+
+2014-06-16 08:52 +0000 [r416336] Igor Goncharovskiy <igor.goncharovsky@gmail.com>
+
+ * cdr/cdr_sqlite3_custom.c, cel/cel_sqlite3_custom.c: We have faced
+ situation when using CDR and CEL by sqlite3 modules. With system
+ having high load (~100 concurrent calls created by sipp) we found
+ many cdr and cel records missed. There is special finction in
+ sqlite3, that make able to fix this situation -
+ sqlite3_wait_timeout, that also can replace awful code
+ cdr_sqlite3 ad cel_sqlite3 modules. Also this function can be
+ used for aastdb and res_config_sqlite3 to avoid missed writes to
+ sqlite db. #ASTERISK-23766 #close Reported by: Igor Goncharovsky
+ Review: https://reviewboard.asterisk.org/r/3559/
+
+2014-06-15 21:16 +0000 [r416251] Matthew Jordan <mjordan@digium.com>
+
+ * res/res_musiconhold.c: MoH: Undo commit r416150 (1.8) This patch
+ reverts r416150. When the comparison between mohclass->name and
+ state->class->name is made, you are not guaranteed that (a)
+ state->class is non-NULL or that state or state->class are in a
+ safe state. Crashes caught by the bridges/transfer_capabilities
+ test.
+
+2014-06-13 13:03 +0000 [r416150] Kinsey Moore <kmoore@digium.com>
+
+ * res/res_musiconhold.c: MoH: Don't restart stream on repeated
+ start calls Currently, music on hold will stop and then start
+ again from the beginning if ast_moh_start() is called multiple
+ times. This can happen if a call is put on hold repeatedly (the
+ channel receives multiple HOLD control frames) and can be
+ triggered from ARI by starting MoH on a channel multiple times.
+ This is fairly jarring/annoying to users. This change prevents
+ MoH from being restarted if the requested music class is the same
+ as the one currently playing. Review:
+ https://reviewboard.asterisk.org/r/3615/
+
+2014-06-13 04:58 +0000 [r416066] Richard Mudgett <rmudgett@digium.com>
+
+ * main/tcptls.c, main/manager.c, channels/chan_sip.c, main/http.c,
+ include/asterisk/tcptls.h: AST-2014-007: Fix of fix to allow AMI
+ and SIP TCP to send messages. ASTERISK-23673 #close Reported by:
+ Richard Mudgett Review: https://reviewboard.asterisk.org/r/3617/
+
+2014-06-12 21:15 +0000 [r415998] Rusty Newton <rnewton@digium.com>
+
+ * main/pbx.c: main/pbx - documentation - enhance 'core show hints'
+ and 'core show hint' help text Adds descriptive help text to
+ 'core show hints' and 'core show hint'. The text describes the
+ various columns for the sake of clarity. ASTERISK-23764 Review:
+ https://reviewboard.asterisk.org/r/3610/
+
+2014-06-12 17:16 +0000 [r415908] Corey Farrell <git@cfware.com>
+
+ * channels/sip/sdp_crypto.c: chan_sip: DEBUG messages in
+ sdp_crypto.c display despite a DEBUG level of zero Change debug
+ level for messages in sdp_crypto.c from zero to one. This ensures
+ the messages are not displayed when debugging is disabled. Change
+ does not apply to 12+ as it was already fixed in those versions.
+ ASTERISK-23246 #close Reported by: Rusty Newton Review:
+ https://reviewboard.asterisk.org/r/3605/
+
+2014-06-12 16:05 +0000 [r415841] Richard Mudgett <rmudgett@digium.com>
+
+ * include/asterisk/tcptls.h, configs/http.conf.sample,
+ include/asterisk/utils.h, main/tcptls.c, main/manager.c,
+ channels/chan_sip.c, main/http.c, UPGRADE.txt, main/utils.c:
+ AST-2014-007: Fix DOS by consuming the number of allowed HTTP
+ connections. Simply establishing a TCP connection and never
+ sending anything to the configured HTTP port in http.conf will
+ tie up a HTTP connection. Since there is a maximum number of open
+ HTTP sessions allowed at a time you can block legitimate
+ connections. A similar problem exists if a HTTP request is
+ started but never finished. * Added http.conf session_inactivity
+ timer option to close HTTP connections that aren't doing
+ anything. Defaults to 30000 ms. * Removed the undocumented
+ manager.conf block-sockets option. It interferes with TCP/TLS
+ inactivity timeouts. * AMI and SIP TLS connections now have
+ better authentication timeout protection. Though I didn't remove
+ the bizzare TLS timeout polling code from chan_sip. * chan_sip
+ can now handle SSL certificate renegotiations in the middle of a
+ session. It couldn't do that before because the socket was
+ non-blocking and the SSL calls were not restarted as documented
+ by the OpenSSL documentation. * Fixed an off nominal leak of the
+ ssl struct in handle_tcptls_connection() if the FILE stream
+ failed to open and the SSL certificate negotiations failed. The
+ patch creates a custom FILE stream handler to give the created
+ FILE streams inactivity timeout and timeout after a specific
+ moment in time capability. This approach eliminates the need for
+ code using the FILE stream to be redesigned to deal with the
+ timeouts. This patch indirectly fixes most of ASTERISK-18345 by
+ fixing the usage of the SSL_read/SSL_write operations.
+ ASTERISK-23673 #close Reported by: Richard Mudgett
+
+2014-06-12 15:38 +0000 [r415833] Scott Griepentrog <sgriepentrog@digium.com>
+
+ * apps/app_queue.c: app_queue: delayed state can cause early
+ leavewhenempty ringing In app_queue, device state changes arrive
+ in event messages and update the queue member status value. That
+ value is checked in get_member_status() to decide that the caller
+ should leave when there are no available members. Although event
+ messages can be delayed by other activity, there is no adverse
+ affect by lagged status except in one specific case: there is
+ only one available member, it was just rung, and leavewhenempty
+ is enabled set for ringing members. This change adds a direct
+ check of the device state only under this condition where the
+ caller may be dropped incorrectly, resolving this issue without
+ affecting performance of app_queue normally. AST-1248 #close
+ Review: https://reviewboard.asterisk.org/r/3595/ Reported by:
+ Thomas Arimont
+
+2014-06-10 09:11 +0000 [r415598] Alexandr Anikin <may@telecom-service.ru>
+
+ * addons/chan_ooh323.c: chan_ooh323: fix loading module failure if
+ there no accessible h323_log or ooh323 config file change return
+ 1 to return AST_MODULE_LOAD_FAILURE ASTERISK-23814 #close (closes
+ issue ASTERISK-23814) Reported by: Igor Goncharovsky Patches:
+ ASTERISK-23814-ast18.patch
+
+2014-06-09 11:55 +0000 [r415521] Walter Doekes <walter+asterisk@wjd.nu>
+
+ * contrib/scripts/safe_asterisk: safe_asterisk: Cleanup additions
+ to r415132. Replaced a stray echo that should've been a message
+ call in safe_asterisk. I'm using the contents of the old message
+ inside the if $NOTIFY so peoples log parsing scripts won't get
+ confused by new messages. I'll clean that up in trunk. (Note that
+ a 'make install' still won't overwrite your old safe_asterisk if
+ it exists. See ASTERISK-21965.) ASTERISK-23492 #close
+
+2014-06-09 03:43 +0000 [r415463] Corey Farrell <git@cfware.com>
+
+ * main/asterisk.c, include/asterisk.h, main/autoservice.c:
+ autoservice: stop thread on graceful shutdown This change adds
+ thread shutdown to autoservice for graceful shutdowns only.
+ ast_register_cleanup is backported to 1.8 to allow this. The
+ logger callid is also released on shutdown in 11+. ASTERISK-23827
+ #close Reported by: Corey Farrell Review:
+ https://reviewboard.asterisk.org/r/3594/
+
+2014-06-06 21:13 +0000 [r415359] Jonathan Rose <jrose@digium.com>
+
+ * main/config.c, main/manager.c, channels/chan_sip.c,
+ include/asterisk/config.h, include/asterisk/manager.h: chan_sip:
+ Fix order of variables specified in SIPNotify action Prior to
+ this patch, sequential variables would be ordered in reverse from
+ the order specified in the manager action. Review:
+ https://reviewboard.asterisk.org/r/3588/
+
+2014-06-05 17:36 +0000 [r415225] Richard Mudgett <rmudgett@digium.com>
+
+ * main/config.c: config: Fix config files not reloading when only
+ an included file changes. The twisted logic determining if a
+ config file should be reloaded was mostly broken and disabled.
+ The incorrect test that ASTERISK-23383 fixed actually reenabled
+ the broken logic. The incorrect test was causing the timestamp to
+ always be cleared which caused config files with includes to
+ always be reloaded. * Made wildcard includes always cause a
+ reload. Determining if a file was deleted cannot be determined
+ without restructuring the cache to determine if any files are
+ missing from the last files actually loaded. Also without
+ refactoring config_text_file_load(), the glob loop couldn't check
+ more than one file for changes anyway. * Made remove the cache
+ entry if the file no longer exists when trying to get its
+ timestamp or it is no longer a regular file. This fixes the
+ corner case where the file was loaded, then deleted, then the
+ config reloaded, then the file restored with the same timestamp,
+ and then the config reloaded again. * Made remove the cache entry
+ include list when actually loading the file. This gets rid of any
+ stale includes the file had from the last time the file was
+ loaded. ASTERISK-23683 #close Reported by: tootai Review:
+ https://reviewboard.asterisk.org/r/3575/
+
+2014-06-04 15:16 +0000 [r415132] Walter Doekes <walter+asterisk@wjd.nu>
+
+ * contrib/scripts/safe_asterisk: safe_asterisk: Cleanup and debian
+ compatibility. Cleans up the safe_asterisk script and adds the
+ ASTSAFE_FOREGROUND option that allows the debian asterisk init
+ script to capture the right pid. * Drop the vim #modeline which
+ wasn't used. Use test consistently without the odd configure xno
+ syntax. Double quote all paths. General cleanup. * Don't output
+ message()s to the console but only to TTY if set. * Allow TTY to
+ be "no" as well as empty (debian compatibility with
+ debian/patches/safe_asterisk-config). * Add option to export
+ ASTSAFE_FOREGROUND=1 from the init script that calls this to
+ disable backgrounding. Debian uses a similar method in
+ debian/patches/safe_asterisk-nobg). ASTERISK-23492 #close Review:
+ https://reviewboard.asterisk.org/r/3574/
+
+2014-06-04 07:18 +0000 [r415060] Corey Farrell <git@cfware.com>
+
+ * apps/app_confbridge.c: app_confbridge: Correct verification of
+ conference name length Conference names were not checked for
+ maximum length, allowing unexpected behaviour. This change adds
+ checking to ensure the maximum length is not exceeded. The
+ maximum length is also changed from 32 to AST_MAX_EXTENSION.
+ ASTERISK-23035 #close Reported by: Iñaki Cívico Tested by: Iñaki
+ Cívico Patches: confbridge-enforce_max-1.8.patch uploaded by
+ coreyfarrell (license 5909) confbridge-enforce_max-11up.patch
+ uploaded by coreyfarrell (license 5909)
+
+2014-06-03 07:31 +0000 [r414997] Walter Doekes <walter+asterisk@wjd.nu>
+
+ * funcs/func_odbc.c: func_odbc: Fix fixed size buffers fix
+ (r414968). The change that removed the fixed size buffers in
+ odbc-related code -- removing arbitrary column width limits --
+ was incomplete. This change adds: no segfault on writesql without
+ insertsql and return value checks after strdup. While I was in
+ the vicinity I cleaned up the linefeeds in the odbc function
+ descriptions, moved some code for clarity, removed some blobs and
+ noted (but didn't fix) that the 'odbc write ... exec' CLI command
+ doesn't behave as the dialplan equivalent when insertsql= is
+ used. ASTERISK-23582 #close Review:
+ https://reviewboard.asterisk.org/r/3579/
+
+2014-05-30 11:50 +0000 [r414880] Matthew Jordan <mjordan@digium.com>
+
+ * main/config.c: main/config.c: AMI action UpdateConfig EmptyCat
+ clears all categories When invoking UpdateConfig AMI action with
+ Action set to EmptyCat, Asterisk will make all categories empty
+ in the config but the one requested with a Cat variable. This is
+ due to a bug in ast_category_empty (main/config.c) that makes an
+ incorrect comparison for a category name. This patch corrects the
+ comparison such that only the requested category is cleared.
+ Review: https://reviewboard.asterisk.org/r/3573/ ASTERISK-23803
+ #close Reported by: zvision patches: manager.c.diff uploaded by
+ zvision (License 5755)
+
+2014-05-29 15:55 +0000 [r414813] Kinsey Moore <kmoore@digium.com>
+
+ * main/pbx.c: PBX: Prevent incorrect hint parsing Dynamic and
+ pattern matching hints should not be checked for their last known
+ state until they are instantiated by subscribers. (closes issue
+ AFS-56) Reported by: John Hardin Patch AFS-56-pbx.diff submitted
+ by Matt Jordan (license 6283)
+
+2014-05-28 11:34 +0000 [r414693] Joshua Colp <jcolp@digium.com>
+
+ * funcs/func_odbc.c, res/res_config_odbc.c: res_config_odbc: Use
+ dynamically sized buffers to store row data so values do not get
+ truncated. ASTERISK-23582 #close ASTERISk-23582 #comment Reported
+ by: Walter Doekes Review:
+ https://reviewboard.asterisk.org/r/3557/
+
+2014-05-27 21:16 +0000 [r414564-414620] Walter Doekes <walter+asterisk@wjd.nu>
+
+ * channels/chan_sip.c: chan_sip: Start session timer at 200, not at
+ INVITE. Asterisk started counting the session timer at INVITE
+ while the other end correctly started at 200. This meant that for
+ short session-expiries (90 seconds) combined with long ringing
+ times (e.g. 30 seconds), asterisk would wrongly assume that the
+ timer was hit before the other end thought it was time to send a
+ session refresh. This resulted in prematurely ended calls. This
+ changes the session timer to start counting first at 200 like RFC
+ says it should. (Also removed a few excess NULL checks that would
+ never hit, because if they did, asterisk would have crashed
+ already.) ASTERISK-22551 #close Reported by: i2045 Review:
+ https://reviewboard.asterisk.org/r/3562/
+
+ * res/res_config_odbc.c: res_config_odbc: Fix old and new
+ ast_string_field memory leaks. The ODBC realtime driver uses ^NN
+ parameter encoding to cope with the special meaning of the
+ semi-colon. A semi-colon in a field is interpreted as if the key
+ was supplied twice, something which isn't otherwise possible with
+ fixed database columns. E.g. allow=alaw;ulaw is parsed as
+ allow=alaw and allow=ulaw. A literal semi-colon is rewritten to
+ ^3B when stored in the database. The module uses a stringfield to
+ efficiently store the encoded parameters. However, this
+ stringfield wasn't always freed in some off-nominal cases. Commit
+ r413241 fixed initialization so the encoding for INSERT and
+ DELETE queries wouldn't crash. (Only SELECTs and UPDATEs worked
+ apparently.) But that commit forgot the frees. This change cleans
+ that up. Review: https://reviewboard.asterisk.org/r/3555/
+
+2014-05-23 16:06 +0000 [r414488] Jonathan Rose <jrose@digium.com>
+
+ * channels/chan_sip.c: Backport Asterisk 11 r413876 to 1.8 ........
+ r413876 | jrose | 2014-05-13 12:40:00 -0500 (Tue, 13 May 2014) |
+ 6 lines chan_sip: Add TLS and SRTP status to CLI command 'sip
+ show channel' ASTERISK-23564 #close Reported by: Patrick Laimbock
+ Review: https://reviewboard.asterisk.org/r/3474/
2014-05-29 Asterisk Development Team <asteriskteam@digium.com>
|
[-]
[+]
|
Changed |
asterisk-1.8.30.0.tar.xz/Makefile
^
|
@@ -176,7 +176,6 @@
_ASTCFLAGS+=-Werror
_ASTCFLAGS+=-Wunused
_ASTCFLAGS+=$(AST_DECLARATION_AFTER_STATEMENT)
- _ASTCFLAGS+=$(AST_FORTIFY_SOURCE)
_ASTCFLAGS+=-Wundef
_ASTCFLAGS+=-Wmissing-format-attribute
_ASTCFLAGS+=-Wformat=2
|
[-]
[+]
|
Changed |
asterisk-1.8.30.0.tar.xz/Makefile.rules
^
|
@@ -82,6 +82,8 @@
# and if that doesn't fail then compile again with optimizer disabled
ifeq ($(findstring DONT_OPTIMIZE,$(MENUSELECT_CFLAGS))$(AST_DEVMODE),DONT_OPTIMIZEyes)
COMPILE_DOUBLE=yes
+else
+_ASTCFLAGS+=$(AST_FORTIFY_SOURCE)
endif
ifeq ($(findstring BUILD_NATIVE,$(MENUSELECT_CFLAGS)),BUILD_NATIVE)
|
[-]
[+]
|
Changed |
asterisk-1.8.30.0.tar.xz/UPGRADE.txt
^
|
@@ -18,6 +18,11 @@
===
===========================================================
+from 1.8.28.2 to 1.8.29.0:
+* Added the inband_on_setup_ack compatibility option to chan_dahdi.conf to
+ deal with switches that don't send an inband progress indication in the
+ SETUP ACKNOWLEDGE message.
+
from 1.8.28.0 to 1.8.28.1:
* Added http.conf session_inactivity timer option to close HTTP connections
that aren't doing anything.
|
[-]
[+]
|
Changed |
asterisk-1.8.30.0.tar.xz/addons/chan_ooh323.c
^
|
@@ -455,7 +455,7 @@
if (ch) {
manager_event(EVENT_FLAG_SYSTEM, "ChannelUpdate",
"Channel: %s\r\nChanneltype: %s\r\n"
- "CallRef: %d\r\n", ch->name, "OOH323", i->call_reference);
+ "CallRef: %u\r\n", ch->name, "OOH323", i->call_reference);
}
} else
ast_log(LOG_WARNING, "Unable to allocate channel structure\n");
@@ -1111,7 +1111,7 @@
ast_channel_lock(ast);
if (!p->alertsent) {
if (gH323Debug) {
- ast_debug(1, "Sending forced ringback for %s, res = %d\n",
+ ast_debug(1, "Sending forced ringback for %s, res = %u\n",
callToken, ooManualRingback(callToken));
} else {
ooManualRingback(callToken);
@@ -1166,7 +1166,7 @@
p->lastrtptx = time(NULL);
if (f->frametype == AST_FRAME_MODEM) {
- ast_debug(1, "Send UDPTL %d/%d len %d for %s\n",
+ ast_debug(1, "Send UDPTL %u/%d len %d for %s\n",
f->frametype, f->subclass.integer, f->datalen, ast->name);
if (p->udptl)
res = ast_udptl_write(p->udptl, f);
@@ -1211,7 +1211,7 @@
ast_mutex_unlock(&p->lock);
return 0;
} else {
- ast_log(LOG_WARNING, "Can't send %d type frames with OOH323 write\n",
+ ast_log(LOG_WARNING, "Can't send %u type frames with OOH323 write\n",
f->frametype);
ast_mutex_unlock(&p->lock);
return 0;
@@ -1270,7 +1270,7 @@
if (ast->_state != AST_STATE_UP) {
if (!p->progsent) {
if (gH323Debug)
- ast_log(LOG_DEBUG,"Sending manual progress for %s, res = %d\n", callToken,
+ ast_log(LOG_DEBUG,"Sending manual progress for %s, res = %u\n", callToken,
ooManualProgress(callToken));
else
ooManualProgress(callToken);
@@ -1282,7 +1282,7 @@
if (ast->_state == AST_STATE_RING || ast->_state == AST_STATE_RINGING) {
if (!p->alertsent) {
if (gH323Debug) {
- ast_debug(1, "Sending manual ringback for %s, res = %d\n",
+ ast_debug(1, "Sending manual ringback for %s, res = %u\n",
callToken,
ooManualRingback(callToken));
} else {
@@ -2087,7 +2087,7 @@
ast_queue_control(c, AST_CONTROL_ANSWER);
ast_channel_unlock(p->owner);
manager_event(EVENT_FLAG_SYSTEM,"ChannelUpdate","Channel: %s\r\nChanneltype: %s\r\n"
- "CallRef: %d\r\n", c->name, "OOH323", p->call_reference);
+ "CallRef: %u\r\n", c->name, "OOH323", p->call_reference);
}
ast_mutex_unlock(&p->lock);
@@ -2916,7 +2916,7 @@
ast_cli(a->fd, "%-15.15s%s\n", "AMA flags: ",
ast_cdr_flags2str(peer->amaflags));
ast_cli(a->fd, "%-15.15s%s\n", "IP:Port: ", ip_port);
- ast_cli(a->fd, "%-15.15s%d\n", "OutgoingLimit: ", peer->outgoinglimit);
+ ast_cli(a->fd, "%-15.15s%u\n", "OutgoingLimit: ", peer->outgoinglimit);
ast_cli(a->fd, "%-15.15s%d\n", "rtptimeout: ", peer->rtptimeout);
if (peer->rtpmaskstr[0])
ast_cli(a->fd, "%-15.15s%s\n", "rtpmask: ", peer->rtpmaskstr);
@@ -3062,7 +3062,7 @@
ast_cdr_flags2str(user->amaflags));
ast_cli(a->fd, "%-15.15s%s\n", "Context: ", user->context);
ast_cli(a->fd, "%-15.15s%d\n", "IncomingLimit: ", user->incominglimit);
- ast_cli(a->fd, "%-15.15s%d\n", "InUse: ", user->inUse);
+ ast_cli(a->fd, "%-15.15s%u\n", "InUse: ", user->inUse);
ast_cli(a->fd, "%-15.15s%d\n", "rtptimeout: ", user->rtptimeout);
if (user->rtpmaskstr[0])
ast_cli(a->fd, "%-15.15s%s\n", "rtpmask: ", user->rtpmaskstr);
@@ -3317,7 +3317,7 @@
/* Make sure we can register our OOH323 channel type */
if (ast_channel_register(&ooh323_tech)) {
ast_log(LOG_ERROR, "Unable to register channel class %s\n", type);
- return 0;
+ return AST_MODULE_LOAD_DECLINE;
}
ast_rtp_glue_register(&ooh323_rtp);
ast_udptl_proto_register(&ooh323_udptl);
@@ -3325,9 +3325,9 @@
/* fire up the H.323 Endpoint */
if (OO_OK != ooH323EpInitialize(OO_CALLMODE_AUDIOCALL, gLogFile)) {
- ast_log(LOG_ERROR, "Failed to initialize OOH323 endpoint-"
+ ast_log(LOG_ERROR, "Failed to initialize OOH323 endpoint-"
"OOH323 Disabled\n");
- return 1;
+ return AST_MODULE_LOAD_DECLINE;
}
if (gIsGateway)
@@ -3341,10 +3341,9 @@
ooH323EpSetLocalAddress(gIP, gPort);
ooH323EpSetCallerID(gCallerID);
- if(ooH323EpSetTCPPortRange(ooconfig.mTCPPortStart,
- ooconfig.mTCPPortEnd) == OO_FAILED) {
- ast_log(LOG_ERROR, "h225portrange: Failed to set range\n");
- }
+ if(ooH323EpSetTCPPortRange(ooconfig.mTCPPortStart, ooconfig.mTCPPortEnd) == OO_FAILED) {
+ ast_log(LOG_ERROR, "h225portrange: Failed to set range\n");
+ }
/* Set aliases if any */
for (pNewAlias = gAliasList; pNewAlias; pNewAlias = pNewAlias->next) {
@@ -3358,8 +3357,8 @@
case T_H225AliasAddress_email_ID:
ooH323EpAddAliasEmailID(pNewAlias->value);
break;
- default:
- ;
+ default:
+ ;
}
}
@@ -3426,6 +3425,9 @@
}
/* And start the monitor for the first time */
restart_monitor();
+ } else {
+ ast_log(LOG_ERROR, "Can't load ooh323 config file, OOH323 Disabled\n");
+ return AST_MODULE_LOAD_DECLINE;
}
return 0;
@@ -4317,7 +4319,7 @@
break;
case 5:
f = ast_udptl_read(p->udptl); /* UDPTL t.38 data */
- if (gH323Debug) ast_debug(1, "Got UDPTL %d/%d len %d for %s\n",
+ if (gH323Debug) ast_debug(1, "Got UDPTL %u/%d len %d for %s\n",
f->frametype, f->subclass.integer, f->datalen, ast->name);
p->lastrtprx = time(NULL);
break;
|
[-]
[+]
|
Changed |
asterisk-1.8.30.0.tar.xz/addons/ooh323c/src/decode.c
^
|
@@ -425,7 +425,7 @@
if (pctxt->flags & ASN1FASTCOPY) {
/* check is it possible to do optimized decoding */
- ASN1OCTET bit;
+ ASN1OCTET bit = 0;
ASN1UINT byteIndex = pctxt->buffer.byteIndex; /* save byte index */
ASN1USINT bitOffset = pctxt->buffer.bitOffset; /* save bit offset */
@@ -499,7 +499,7 @@
if (pctxt->flags & ASN1FASTCOPY) {
/* check if it is possible to do optimized decoding */
- ASN1OCTET bit;
+ ASN1OCTET bit = 0;
ASN1UINT byteIndex = pctxt->buffer.byteIndex; /* save byte index */
ASN1USINT bitOffset = pctxt->buffer.bitOffset; /* save bit offset */
|
[-]
[+]
|
Changed |
asterisk-1.8.30.0.tar.xz/addons/ooh323c/src/ooq931.c
^
|
@@ -317,7 +317,7 @@
strcpy(buf, "Escape");
break;
default:
- sprintf(buf, "<%u>", messageType);
+ sprintf(buf, "<%d>", messageType);
}
return buf;
}
@@ -358,7 +358,7 @@
strcpy(buf, "User-User");
break;
default:
- sprintf(buf, "0x%02x", number);
+ sprintf(buf, "0x%02x", (unsigned)number);
}
return buf;
}
@@ -369,8 +369,8 @@
unsigned int i;
printf("Q.931 Message:\n");
- printf(" protocolDiscriminator: %i\n", q931msg->protocolDiscriminator);
- printf(" callReference: %i\n", q931msg->callReference);
+ printf(" protocolDiscriminator: %u\n", q931msg->protocolDiscriminator);
+ printf(" callReference: %u\n", q931msg->callReference);
printf(" from: %s\n", (q931msg->fromDestination ?
"destination" : "originator"));
printf(" messageType: %s (0x%X)\n\n",
@@ -380,9 +380,9 @@
for(i = 0, curNode = q931msg->ies.head; i < q931msg->ies.count; i++) {
Q931InformationElement *ie = (Q931InformationElement*) curNode->data;
int length = (ie->length >= 0) ? ie->length : -ie->length;
- printf(" IE[%i] (offset 0x%X):\n", i, ie->offset);
+ printf(" IE[%u] (offset 0x%X):\n", i, (unsigned)ie->offset);
printf(" discriminator: %s (0x%X)\n",
- ooQ931GetIEName(ie->discriminator, buf), ie->discriminator);
+ ooQ931GetIEName(ie->discriminator, buf), (unsigned)ie->discriminator);
printf(" data length: %i\n", length);
curNode = curNode->next;
|
[-]
[+]
|
Changed |
asterisk-1.8.30.0.tar.xz/addons/ooh323c/src/printHandler.c
^
|
@@ -268,7 +268,7 @@
if (bufsiz > 1) buffer[1] = '\0';
for (i = 0; i < numocts; i++) {
if (i < bufsiz - 1) {
- sprintf (lbuf, "%02x", data[i]);
+ sprintf (lbuf, "%02x", (unsigned)data[i]);
strcat (&buffer[(i*2)+1], lbuf);
}
else break;
|
[-]
[+]
|
Changed |
asterisk-1.8.30.0.tar.xz/apps/app_confbridge.c
^
|
@@ -32,7 +32,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 378303 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 415060 $")
#include <stdio.h>
#include <stdlib.h>
@@ -149,7 +149,7 @@
});
/* Maximum length of a conference bridge name */
-#define MAX_CONF_NAME 32
+#define MAX_CONF_NAME AST_MAX_EXTENSION
/* Number of buckets our conference bridges container can have */
#define CONFERENCE_BRIDGE_BUCKETS 53
@@ -735,16 +735,21 @@
AST_APP_ARG(options);
);
- if (ast_strlen_zero(data)) {
- ast_log(LOG_WARNING, "%s requires an argument (conference name[,options])\n", app);
- return -1;
- }
-
/* We need to make a copy of the input string if we are going to modify it! */
parse = ast_strdupa(data);
AST_STANDARD_APP_ARGS(args, parse);
+ if (ast_strlen_zero(args.conf_name)) {
+ ast_log(LOG_WARNING, "%s requires an argument (conference name[,options])\n", app);
+ return -1;
+ }
+
+ if (strlen(args.conf_name) >= MAX_CONF_NAME) {
+ ast_log(LOG_WARNING, "%s does not accept conference names longer than %d\n", app, MAX_CONF_NAME - 1);
+ return -1;
+ }
+
if (args.argc == 2) {
ast_app_parse_options(app_opts, &conference_bridge_user.flags, conference_bridge_user.opt_args, args.options);
}
|
[-]
[+]
|
Changed |
asterisk-1.8.30.0.tar.xz/apps/app_meetme.c
^
|
@@ -36,7 +36,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 414401 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 419129 $")
#include <dahdi/user.h>
@@ -2825,7 +2825,7 @@
if (ast_test_flag64(confflags, CONFFLAG_DURATION_STOP) && !ast_strlen_zero(optargs[OPT_ARG_DURATION_STOP])) {
calldurationlimit = atoi(optargs[OPT_ARG_DURATION_STOP]);
- ast_verb(3, "Setting call duration limit to %d seconds.\n", calldurationlimit);
+ ast_verb(3, "Setting call duration limit to %u seconds.\n", calldurationlimit);
}
if (ast_test_flag64(confflags, CONFFLAG_DURATION_LIMIT) && !ast_strlen_zero(optargs[OPT_ARG_DURATION_LIMIT])) {
@@ -3863,12 +3863,12 @@
break;
default:
ast_debug(1,
- "Got ignored control frame on channel %s, f->frametype=%d,f->subclass=%d\n",
+ "Got ignored control frame on channel %s, f->frametype=%u,f->subclass=%d\n",
chan->name, f->frametype, f->subclass.integer);
}
} else {
ast_debug(1,
- "Got unrecognized frame on channel %s, f->frametype=%d,f->subclass=%d\n",
+ "Got unrecognized frame on channel %s, f->frametype=%u,f->subclass=%d\n",
chan->name, f->frametype, f->subclass.integer);
}
ast_frfree(f);
@@ -6639,7 +6639,7 @@
ast_cond_destroy(&cond);
ast_autoservice_stop(chan);
if (!trunk_ref->trunk->chan) {
- ast_debug(1, "Trunk didn't get created. chan: %lx\n", (long) trunk_ref->trunk->chan);
+ ast_debug(1, "Trunk didn't get created. chan: %lx\n", (unsigned long) trunk_ref->trunk->chan);
pbx_builtin_setvar_helper(chan, "SLASTATION_STATUS", "CONGESTION");
sla_change_trunk_state(trunk_ref->trunk, SLA_TRUNK_STATE_IDLE, ALL_TRUNK_REFS, NULL);
trunk_ref->chan = NULL;
|
[-]
[+]
|
Changed |
asterisk-1.8.30.0.tar.xz/apps/app_queue.c
^
|
@@ -63,7 +63,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 413586 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 419684 $")
#include <sys/time.h>
#include <sys/signal.h>
@@ -1448,7 +1448,7 @@
* is available, the function immediately returns 0. If no members are available,
* then -1 is returned.
*/
-static int get_member_status(struct call_queue *q, int max_penalty, int min_penalty, enum empty_conditions conditions)
+static int get_member_status(struct call_queue *q, int max_penalty, int min_penalty, enum empty_conditions conditions, int devstate)
{
struct member *member;
struct ao2_iterator mem_iter;
@@ -1463,7 +1463,7 @@
}
}
- switch (member->status) {
+ switch (devstate ? ast_device_state(member->state_interface) : member->status) {
case AST_DEVICE_INVALID:
if (conditions & QUEUE_EMPTY_INVALID) {
ast_debug(4, "%s is unavailable because his device state is 'invalid'\n", member->membername);
@@ -1513,8 +1513,12 @@
}
}
ao2_iterator_destroy(&mem_iter);
-
ao2_unlock(q);
+
+ if (!devstate && (conditions & QUEUE_EMPTY_RINGING)) {
+ /* member state still may be RINGING due to lag in event message - check again with device state */
+ return get_member_status(q, max_penalty, min_penalty, conditions, 1);
+ }
return -1;
}
@@ -2610,7 +2614,7 @@
/* This is our one */
if (q->joinempty) {
int status = 0;
- if ((status = get_member_status(q, qe->max_penalty, qe->min_penalty, q->joinempty))) {
+ if ((status = get_member_status(q, qe->max_penalty, qe->min_penalty, q->joinempty, 0))) {
*reason = QUEUE_JOINEMPTY;
ao2_unlock(q);
queue_t_unref(q, "Done with realtime queue");
@@ -4303,7 +4307,7 @@
if (qe->parent->leavewhenempty) {
int status = 0;
- if ((status = get_member_status(qe->parent, qe->max_penalty, qe->min_penalty, qe->parent->leavewhenempty))) {
+ if ((status = get_member_status(qe->parent, qe->max_penalty, qe->min_penalty, qe->parent->leavewhenempty, 0))) {
*reason = QUEUE_LEAVEEMPTY;
ast_queue_log(qe->parent->name, qe->chan->uniqueid, "NONE", "EXITEMPTY", "%d|%d|%ld", qe->pos, qe->opos, (long) time(NULL) - qe->start);
leave_queue(qe);
@@ -4569,6 +4573,7 @@
/* No need to lock the channels because they are already locked in ast_do_masquerade */
if ((datastore = ast_channel_datastore_find(old_chan, &queue_transfer_info, NULL))) {
ast_channel_datastore_remove(old_chan, datastore);
+ /* Datastore is freed in try_calling() */
} else {
ast_log(LOG_WARNING, "Can't find the queue_transfer datastore.\n");
}
@@ -5441,6 +5446,7 @@
}
if ((tds = ast_channel_datastore_find(qe->chan, &queue_transfer_info, NULL))) {
ast_channel_datastore_remove(qe->chan, tds);
+ /* tds was added by setup_transfer_datastore() and is freed below. */
}
ast_channel_unlock(qe->chan);
update_queue(qe->parent, member, callcompletedinsl, (time(NULL) - callstart));
@@ -6372,7 +6378,7 @@
if (qe.parent->leavewhenempty) {
int status = 0;
- if ((status = get_member_status(qe.parent, qe.max_penalty, qe.min_penalty, qe.parent->leavewhenempty))) {
+ if ((status = get_member_status(qe.parent, qe.max_penalty, qe.min_penalty, qe.parent->leavewhenempty, 0))) {
record_abandoned(&qe);
reason = QUEUE_LEAVEEMPTY;
ast_queue_log(args.queuename, chan->uniqueid, "NONE", "EXITEMPTY", "%d|%d|%ld", qe.pos, qe.opos, (long)(time(NULL) - qe.start));
|
[-]
[+]
|
Changed |
asterisk-1.8.30.0.tar.xz/apps/app_speech_utils.c
^
|
@@ -31,7 +31,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 411313 $");
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 419684 $");
#include "asterisk/file.h"
#include "asterisk/channel.h"
@@ -289,7 +289,9 @@
return NULL;
}
+ ast_channel_lock(chan);
datastore = ast_channel_datastore_find(chan, &speech_datastore, NULL);
+ ast_channel_unlock(chan);
if (datastore == NULL) {
return NULL;
}
@@ -298,6 +300,35 @@
return speech;
}
+/*!
+ * \internal
+ * \brief Destroy the speech datastore on the given channel.
+ *
+ * \param chan Channel to destroy speech datastore.
+ *
+ * \retval 0 on success.
+ * \retval -1 not found.
+ */
+static int speech_datastore_destroy(struct ast_channel *chan)
+{
+ struct ast_datastore *datastore;
+ int res;
+
+ ast_channel_lock(chan);
+ datastore = ast_channel_datastore_find(chan, &speech_datastore, NULL);
+ if (datastore) {
+ ast_channel_datastore_remove(chan, datastore);
+ }
+ ast_channel_unlock(chan);
+ if (datastore) {
+ ast_datastore_free(datastore);
+ res = 0;
+ } else {
+ res = -1;
+ }
+ return res;
+}
+
/* Helper function to find a specific speech recognition result by number and nbest alternative */
static struct ast_speech_result *find_result(struct ast_speech_result *results, char *result_num)
{
@@ -519,7 +550,9 @@
}
pbx_builtin_setvar_helper(chan, "ERROR", NULL);
datastore->data = speech;
+ ast_channel_lock(chan);
ast_channel_datastore_add(chan, datastore);
+ ast_channel_unlock(chan);
return 0;
}
@@ -662,7 +695,6 @@
int oldreadformat = AST_FORMAT_SLINEAR;
char dtmf[AST_MAX_EXTENSION] = "";
struct timeval start = { 0, 0 }, current;
- struct ast_datastore *datastore = NULL;
char *parse, *filename_tmp = NULL, *filename = NULL, tmp[2] = "", dtmf_terminator = '#';
const char *tmp2 = NULL;
struct ast_flags options = { 0 };
@@ -891,11 +923,7 @@
/* See if it was because they hung up */
if (done == 3) {
- /* Destroy speech structure */
- ast_speech_destroy(speech);
- datastore = ast_channel_datastore_find(chan, &speech_datastore, NULL);
- if (datastore != NULL)
- ast_channel_datastore_remove(chan, datastore);
+ speech_datastore_destroy(chan);
} else {
/* Channel is okay so restore read format */
ast_set_read_format(chan, oldreadformat);
@@ -908,22 +936,10 @@
/*! \brief SpeechDestroy() Dialplan Application */
static int speech_destroy(struct ast_channel *chan, const char *data)
{
- int res = 0;
- struct ast_speech *speech = find_speech(chan);
- struct ast_datastore *datastore = NULL;
-
- if (speech == NULL)
+ if (!chan) {
return -1;
-
- /* Destroy speech structure */
- ast_speech_destroy(speech);
-
- datastore = ast_channel_datastore_find(chan, &speech_datastore, NULL);
- if (datastore != NULL) {
- ast_channel_datastore_remove(chan, datastore);
}
-
- return res;
+ return speech_datastore_destroy(chan);
}
static int unload_module(void)
|
[-]
[+]
|
Changed |
asterisk-1.8.30.0.tar.xz/apps/app_stack.c
^
|
@@ -26,13 +26,13 @@
*/
/*** MODULEINFO
- <use>res_agi</use>
+ <use type="module">res_agi</use>
<support_level>core</support_level>
***/
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 413586 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 419630 $")
#include "asterisk/pbx.h"
#include "asterisk/module.h"
@@ -205,10 +205,10 @@
</agi>
***/
-static const char * const app_gosub = "Gosub";
-static const char * const app_gosubif = "GosubIf";
-static const char * const app_return = "Return";
-static const char * const app_pop = "StackPop";
+static const char app_gosub[] = "Gosub";
+static const char app_gosubif[] = "GosubIf";
+static const char app_return[] = "Return";
+static const char app_pop[] = "StackPop";
static void gosub_free(void *data);
@@ -223,11 +223,14 @@
unsigned char arguments;
struct varshead varshead;
int priority;
- unsigned int is_agi:1;
+ /*! TRUE if the return location marks the end of a special routine. */
+ unsigned int is_special:1;
char *context;
char extension[0];
};
+AST_LIST_HEAD(gosub_stack_list, gosub_stack_frame);
+
static int frame_set_var(struct ast_channel *chan, struct gosub_stack_frame *frame, const char *var, const char *value)
{
struct ast_var_t *variables;
@@ -296,8 +299,9 @@
static void gosub_free(void *data)
{
- AST_LIST_HEAD(, gosub_stack_frame) *oldlist = data;
+ struct gosub_stack_list *oldlist = data;
struct gosub_stack_frame *oldframe;
+
AST_LIST_LOCK(oldlist);
while ((oldframe = AST_LIST_REMOVE_HEAD(oldlist, entries))) {
gosub_release_frame(NULL, oldframe);
@@ -311,7 +315,8 @@
{
struct ast_datastore *stack_store;
struct gosub_stack_frame *oldframe;
- AST_LIST_HEAD(, gosub_stack_frame) *oldlist;
+ struct gosub_stack_list *oldlist;
+ int res = 0;
ast_channel_lock(chan);
if (!(stack_store = ast_channel_datastore_find(chan, &stack_info, NULL))) {
@@ -322,23 +327,30 @@
oldlist = stack_store->data;
AST_LIST_LOCK(oldlist);
- oldframe = AST_LIST_REMOVE_HEAD(oldlist, entries);
- AST_LIST_UNLOCK(oldlist);
-
+ oldframe = AST_LIST_FIRST(oldlist);
if (oldframe) {
- gosub_release_frame(chan, oldframe);
+ if (oldframe->is_special) {
+ ast_debug(1, "%s attempted to pop special return location.\n", app_pop);
+
+ /* Abort the special routine dialplan execution. Dialplan programming error. */
+ res = -1;
+ } else {
+ AST_LIST_REMOVE_HEAD(oldlist, entries);
+ gosub_release_frame(chan, oldframe);
+ }
} else {
ast_debug(1, "%s called with an empty gosub stack\n", app_pop);
}
+ AST_LIST_UNLOCK(oldlist);
ast_channel_unlock(chan);
- return 0;
+ return res;
}
static int return_exec(struct ast_channel *chan, const char *data)
{
struct ast_datastore *stack_store;
struct gosub_stack_frame *oldframe;
- AST_LIST_HEAD(, gosub_stack_frame) *oldlist;
+ struct gosub_stack_list *oldlist;
const char *retval = data;
int res = 0;
@@ -358,12 +370,24 @@
ast_log(LOG_ERROR, "Return without Gosub: stack is empty\n");
ast_channel_unlock(chan);
return -1;
- } else if (oldframe->is_agi) {
- /* Exit from AGI */
+ }
+ if (oldframe->is_special) {
+ /* Exit from special routine. */
res = -1;
}
- ast_explicit_goto(chan, oldframe->context, oldframe->extension, oldframe->priority);
+ /*
+ * We cannot use ast_explicit_goto() because we MUST restore
+ * what was there before. Channels that do not have a PBX may
+ * not have the context or exten set.
+ */
+ ast_copy_string(chan->context, oldframe->context, sizeof(chan->context));
+ ast_copy_string(chan->exten, oldframe->extension, sizeof(chan->exten));
+ if (ast_test_flag(chan, AST_FLAG_IN_AUTOLOOP)) {
+ --oldframe->priority;
+ }
+ chan->priority = oldframe->priority;
+
gosub_release_frame(chan, oldframe);
/* Set a return value, if any */
@@ -372,10 +396,96 @@
return res;
}
+/*!
+ * \internal
+ * \brief Add missing context and/or exten to Gosub application argument string.
+ * \since 1.8.30.0
+ * \since 11.0
+ *
+ * \param chan Channel to obtain context/exten.
+ * \param args Gosub application argument string.
+ *
+ * \details
+ * Fills in the optional context and exten from the given channel.
+ * Convert: [[context,]exten,]priority[(arg1[,...][,argN])]
+ * To: context,exten,priority[(arg1[,...][,argN])]
+ *
+ * \retval expanded Gosub argument string on success. Must be freed.
+ * \retval NULL on error.
+ *
+ * \note The parsing needs to be kept in sync with the
+ * gosub_exec() argument format.
+ */
+static const char *expand_gosub_args(struct ast_channel *chan, const char *args)
+{
+ int len;
+ char *parse;
+ char *label;
+ char *new_args;
+ const char *context;
+ const char *exten;
+ const char *pri;
+
+ /* Separate the context,exten,pri from the optional routine arguments. */
+ parse = ast_strdupa(args);
+ label = strsep(&parse, "(");
+ if (parse) {
+ char *endparen;
+
+ endparen = strrchr(parse, ')');
+ if (endparen) {
+ *endparen = '\0';
+ } else {
+ ast_log(LOG_WARNING, "Ouch. No closing paren: '%s'?\n", args);
+ }
+ }
+
+ /* Split context,exten,pri */
+ context = strsep(&label, ",");
+ exten = strsep(&label, ",");
+ pri = strsep(&label, ",");
+ if (!exten) {
+ /* Only a priority in this one */
+ pri = context;
+ exten = NULL;
+ context = NULL;
+ } else if (!pri) {
+ /* Only an extension and priority in this one */
+ pri = exten;
+ exten = context;
+ context = NULL;
+ }
+
+ ast_channel_lock(chan);
+ if (ast_strlen_zero(exten)) {
+ exten = chan->exten;
+ }
+ if (ast_strlen_zero(context)) {
+ context = chan->context;
+ }
+ len = strlen(context) + strlen(exten) + strlen(pri) + 3;
+ if (!ast_strlen_zero(parse)) {
+ len += 2 + strlen(parse);
+ }
+ new_args = ast_malloc(len);
+ if (new_args) {
+ if (ast_strlen_zero(parse)) {
+ snprintf(new_args, len, "%s,%s,%s", context, exten, pri);
+ } else {
+ snprintf(new_args, len, "%s,%s,%s(%s)", context, exten, pri, parse);
+ }
+ }
+ ast_channel_unlock(chan);
+
+ ast_debug(4, "Gosub args:%s new_args:%s\n", args, new_args ? new_args : "");
+
+ return new_args;
+}
+
static int gosub_exec(struct ast_channel *chan, const char *data)
{
struct ast_datastore *stack_store;
- AST_LIST_HEAD(, gosub_stack_frame) *oldlist;
+ struct gosub_stack_list *oldlist;
struct gosub_stack_frame *newframe;
struct gosub_stack_frame *lastframe;
char argname[15];
@@ -565,7 +675,7 @@
static int local_read(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
{
struct ast_datastore *stack_store;
- AST_LIST_HEAD(, gosub_stack_frame) *oldlist;
+ struct gosub_stack_list *oldlist;
struct gosub_stack_frame *frame;
struct ast_var_t *variables;
@@ -605,7 +715,7 @@
static int local_write(struct ast_channel *chan, const char *cmd, char *var, const char *value)
{
struct ast_datastore *stack_store;
- AST_LIST_HEAD(, gosub_stack_frame) *oldlist;
+ struct gosub_stack_list *oldlist;
struct gosub_stack_frame *frame;
if (!chan) {
@@ -683,7 +793,7 @@
static int stackpeek_read(struct ast_channel *chan, const char *cmd, char *data, struct ast_str **str, ssize_t len)
{
struct ast_datastore *stack_store;
- AST_LIST_HEAD(, gosub_stack_frame) *oldlist;
+ struct gosub_stack_list *oldlist;
struct gosub_stack_frame *frame;
int n;
AST_DECLARE_APP_ARGS(args,
@@ -756,6 +866,7 @@
break;
default:
ast_log(LOG_ERROR, "Unknown argument '%s' to STACK_PEEK\n", args.which);
+ break;
}
AST_LIST_UNLOCK(oldlist);
@@ -769,11 +880,206 @@
.read2 = stackpeek_read,
};
+/*!
+ * \internal
+ * \brief Pop stack frames until remove a special return location.
+ * \since 1.8.30.0
+ * \since 11.0
+ *
+ * \param chan Channel to balance stack on.
+ *
+ * \note The channel is already locked when called.
+ *
+ * \return Nothing
+ */
+static void balance_stack(struct ast_channel *chan)
+{
+ struct ast_datastore *stack_store;
+ struct gosub_stack_list *oldlist;
+ struct gosub_stack_frame *oldframe;
+ int found;
+
+ stack_store = ast_channel_datastore_find(chan, &stack_info, NULL);
+ if (!stack_store) {
+ ast_log(LOG_WARNING, "No %s stack allocated.\n", app_gosub);
+ return;
+ }
+
+ oldlist = stack_store->data;
+ AST_LIST_LOCK(oldlist);
+ do {
+ oldframe = AST_LIST_REMOVE_HEAD(oldlist, entries);
+ if (!oldframe) {
+ break;
+ }
+ found = oldframe->is_special;
+ gosub_release_frame(chan, oldframe);
+ } while (!found);
+ AST_LIST_UNLOCK(oldlist);
+}
+
+/*!
+ * \internal
+ * \brief Run a subroutine on a channel.
+ * \since 1.8.30.0
+ * \since 11.0
+ *
+ * \note Absolutely _NO_ channel locks should be held before calling this function.
+ *
+ * \param chan Channel to execute subroutine on.
+ * \param sub_args Gosub application argument string.
+ * \param ignore_hangup TRUE if a hangup does not stop execution of the routine.
+ *
+ * \retval 0 success
+ * \retval -1 on error
+ */
+static int gosub_run(struct ast_channel *chan, const char *sub_args, int ignore_hangup)
+{
+ const char *saved_context;
+ const char *saved_exten;
+ int saved_priority;
+ int saved_hangup_flags;
+ int saved_autoloopflag;
+ int res;
+
+ ast_channel_lock(chan);
+
+ ast_verb(3, "%s Internal %s(%s) start\n", chan->name, app_gosub, sub_args);
+
+ /* Save non-hangup softhangup flags. */
+ saved_hangup_flags = chan->_softhangup
+ & (AST_SOFTHANGUP_ASYNCGOTO | AST_SOFTHANGUP_UNBRIDGE);
+ if (saved_hangup_flags) {
+ chan->_softhangup &= ~(AST_SOFTHANGUP_ASYNCGOTO | AST_SOFTHANGUP_UNBRIDGE);
+ }
+
+ /* Save autoloop flag */
+ saved_autoloopflag = ast_test_flag(chan, AST_FLAG_IN_AUTOLOOP);
+ ast_set_flag(chan, AST_FLAG_IN_AUTOLOOP);
+
+ /* Save current dialplan location */
+ saved_context = ast_strdupa(chan->context);
+ saved_exten = ast_strdupa(chan->exten);
+ saved_priority = chan->priority;
+
+ ast_debug(4, "%s Original location: %s,%s,%d\n", chan->name,
+ saved_context, saved_exten, saved_priority);
+
+ ast_channel_unlock(chan);
+ res = gosub_exec(chan, sub_args);
+ ast_debug(4, "%s exited with status %d\n", app_gosub, res);
+ ast_channel_lock(chan);
+ if (!res) {
+ struct ast_datastore *stack_store;
+
+ /* Mark the return location as special. */
+ stack_store = ast_channel_datastore_find(chan, &stack_info, NULL);
+ if (!stack_store) {
+ /* Should never happen! */
+ ast_log(LOG_ERROR, "No %s stack!\n", app_gosub);
+ res = -1;
+ } else {
+ struct gosub_stack_list *oldlist;
+ struct gosub_stack_frame *cur;
+
+ oldlist = stack_store->data;
+ cur = AST_LIST_FIRST(oldlist);
+ cur->is_special = 1;
+ }
+ }
+ if (!res) {
+ int found = 0; /* set if we find at least one match */
+
+ /*
+ * Run gosub body autoloop.
+ *
+ * Note that this loop is inverted from the normal execution
+ * loop because we just executed the Gosub application as the
+ * first extension of the autoloop.
+ */
+ do {
+ /* Check for hangup. */
+ if (chan->_softhangup & AST_SOFTHANGUP_UNBRIDGE) {
+ saved_hangup_flags |= AST_SOFTHANGUP_UNBRIDGE;
+ chan->_softhangup &= ~AST_SOFTHANGUP_UNBRIDGE;
+ }
+ if (ast_check_hangup(chan)) {
+ if (chan->_softhangup & AST_SOFTHANGUP_ASYNCGOTO) {
+ ast_log(LOG_ERROR, "%s An async goto just messed up our execution location.\n",
+ chan->name);
+ break;
+ }
+ if (!ignore_hangup) {
+ break;
+ }
+ }
+
+ /* Next dialplan priority. */
+ ++chan->priority;
+
+ ast_channel_unlock(chan);
+ res = ast_spawn_extension(chan, chan->context, chan->exten, chan->priority,
+ S_COR(chan->caller.id.number.valid, chan->caller.id.number.str, NULL),
+ &found, 1);
+ ast_channel_lock(chan);
+ } while (!res);
+ if (found && res) {
+ /* Something bad happened, or a hangup has been requested. */
+ ast_debug(1, "Spawn extension (%s,%s,%d) exited with %d on '%s'\n",
+ chan->context, chan->exten, chan->priority, res, chan->name);
+ ast_verb(2, "Spawn extension (%s, %s, %d) exited non-zero on '%s'\n",
+ chan->context, chan->exten, chan->priority, chan->name);
+ }
+
+ /* Did the routine return? */
+ if (chan->priority == saved_priority
+ && !strcmp(chan->context, saved_context)
+ && !strcmp(chan->exten, saved_exten)) {
+ ast_verb(3, "%s Internal %s(%s) complete GOSUB_RETVAL=%s\n",
+ chan->name, app_gosub, sub_args,
+ S_OR(pbx_builtin_getvar_helper(chan, "GOSUB_RETVAL"), ""));
+ } else {
+ ast_log(LOG_NOTICE, "%s Abnormal '%s(%s)' exit. Popping routine return locations.\n",
+ chan->name, app_gosub, sub_args);
+ balance_stack(chan);
+ pbx_builtin_setvar_helper(chan, "GOSUB_RETVAL", "");
+ }
+
+ /* We executed the requested subroutine to the best of our ability. */
+ res = 0;
+ }
+
+ ast_debug(4, "%s Ending location: %s,%s,%d\n", chan->name,
+ chan->context, chan->exten, chan->priority);
+
+ /* Restore dialplan location */
+ if (!(chan->_softhangup & AST_SOFTHANGUP_ASYNCGOTO)) {
+ ast_copy_string(chan->context, saved_context, sizeof(chan->context));
+ ast_copy_string(chan->exten, saved_exten, sizeof(chan->exten));
+ chan->priority = saved_priority;
+ }
+
+ /* Restore autoloop flag */
+ ast_set2_flag(chan, saved_autoloopflag, AST_FLAG_IN_AUTOLOOP);
+
+ /* Restore non-hangup softhangup flags. */
+ if (saved_hangup_flags) {
+ ast_softhangup_nolock(chan, saved_hangup_flags);
+ }
+
+ ast_channel_unlock(chan);
+
+ return res;
+}
+
static int handle_gosub(struct ast_channel *chan, AGI *agi, int argc, const char * const *argv)
{
- int old_priority, priority;
- char old_context[AST_MAX_CONTEXT], old_extension[AST_MAX_EXTENSION];
- struct ast_app *theapp;
+ int res;
+ int priority;
+ int old_autoloopflag;
+ int old_priority;
+ const char *old_context;
+ const char *old_extension;
char *gosub_args;
if (argc < 4 || argc > 5) {
@@ -797,78 +1103,122 @@
return RESULT_FAILURE;
}
- /* Save previous location, since we're going to change it */
- ast_copy_string(old_context, chan->context, sizeof(old_context));
- ast_copy_string(old_extension, chan->exten, sizeof(old_extension));
- old_priority = chan->priority;
-
- if (!(theapp = pbx_findapp("Gosub"))) {
- ast_log(LOG_ERROR, "Gosub() cannot be found in the list of loaded applications\n");
- ast_agi_send(agi->fd, chan, "503 result=-2 Gosub is not loaded\n");
- return RESULT_FAILURE;
- }
-
- /* Apparently, if you run ast_pbx_run on a channel that already has a pbx
- * structure, you need to add 1 to the priority to get it to go to the
- * right place. But if it doesn't have a pbx structure, then leaving off
- * the 1 is the right thing to do. See how this code differs when we
- * call a Gosub for the CALLEE channel in Dial or Queue.
- */
if (argc == 5) {
- if (ast_asprintf(&gosub_args, "%s,%s,%d(%s)", argv[1], argv[2], priority + (chan->pbx ? 1 : 0), argv[4]) < 0) {
+ if (ast_asprintf(&gosub_args, "%s,%s,%d(%s)", argv[1], argv[2], priority, argv[4]) < 0) {
gosub_args = NULL;
}
} else {
- if (ast_asprintf(&gosub_args, "%s,%s,%d", argv[1], argv[2], priority + (chan->pbx ? 1 : 0)) < 0) {
+ if (ast_asprintf(&gosub_args, "%s,%s,%d", argv[1], argv[2], priority) < 0) {
gosub_args = NULL;
}
}
+ if (!gosub_args) {
+ ast_agi_send(agi->fd, chan, "503 result=-2 Memory allocation failure\n");
+ return RESULT_FAILURE;
+ }
+
+ ast_channel_lock(chan);
- if (gosub_args) {
- int res;
+ ast_verb(3, "%s AGI %s(%s) start\n", chan->name, app_gosub, gosub_args);
- ast_debug(1, "Trying gosub with arguments '%s'\n", gosub_args);
+ /* Save autoloop flag */
+ old_autoloopflag = ast_test_flag(chan, AST_FLAG_IN_AUTOLOOP);
+ ast_set_flag(chan, AST_FLAG_IN_AUTOLOOP);
- if ((res = pbx_exec(chan, theapp, gosub_args)) == 0) {
- struct ast_pbx *pbx = chan->pbx;
- struct ast_pbx_args args;
- struct ast_datastore *stack_store = ast_channel_datastore_find(chan, &stack_info, NULL);
- AST_LIST_HEAD(, gosub_stack_frame) *oldlist;
+ /* Save previous location, since we're going to change it */
+ old_context = ast_strdupa(chan->context);
+ old_extension = ast_strdupa(chan->exten);
+ old_priority = chan->priority;
+
+ ast_debug(4, "%s Original location: %s,%s,%d\n", chan->name,
+ old_context, old_extension, old_priority);
+ ast_channel_unlock(chan);
+
+ res = gosub_exec(chan, gosub_args);
+ if (!res) {
+ struct ast_datastore *stack_store;
+
+ /* Mark the return location as special. */
+ ast_channel_lock(chan);
+ stack_store = ast_channel_datastore_find(chan, &stack_info, NULL);
+ if (!stack_store) {
+ /* Should never happen! */
+ ast_log(LOG_ERROR, "No %s stack!\n", app_gosub);
+ res = -1;
+ } else {
+ struct gosub_stack_list *oldlist;
struct gosub_stack_frame *cur;
- if (!stack_store) {
- ast_log(LOG_WARNING, "No GoSub stack remaining after AGI GoSub execution.\n");
- ast_free(gosub_args);
- return RESULT_FAILURE;
- }
+
oldlist = stack_store->data;
cur = AST_LIST_FIRST(oldlist);
- cur->is_agi = 1;
+ cur->is_special = 1;
+ }
+ ast_channel_unlock(chan);
+ }
+ if (!res) {
+ struct ast_pbx *pbx;
+ struct ast_pbx_args args;
+ int abnormal_exit;
+
+ memset(&args, 0, sizeof(args));
+ args.no_hangup_chan = 1;
+
+ ast_channel_lock(chan);
+
+ /* Next dialplan priority. */
+ ++chan->priority;
+
+ /* Suppress warning about PBX already existing */
+ pbx = chan->pbx;
+ chan->pbx = NULL;
+ ast_channel_unlock(chan);
- memset(&args, 0, sizeof(args));
- args.no_hangup_chan = 1;
- /* Suppress warning about PBX already existing */
- chan->pbx = NULL;
- ast_agi_send(agi->fd, chan, "100 result=0 Trying...\n");
- ast_pbx_run_args(chan, &args);
- ast_agi_send(agi->fd, chan, "200 result=0 Gosub complete\n");
- if (chan->pbx) {
- ast_free(chan->pbx);
- }
- chan->pbx = pbx;
+ ast_agi_send(agi->fd, chan, "100 result=0 Trying...\n");
+ ast_pbx_run_args(chan, &args);
+
+ ast_channel_lock(chan);
+ ast_free(chan->pbx);
+ chan->pbx = pbx;
+
+ /* Did the routine return? */
+ if (chan->priority == old_priority
+ && !strcmp(chan->context, old_context)
+ && !strcmp(chan->exten, old_extension)) {
+ ast_verb(3, "%s AGI %s(%s) complete GOSUB_RETVAL=%s\n",
+ chan->name, app_gosub, gosub_args,
+ S_OR(pbx_builtin_getvar_helper(chan, "GOSUB_RETVAL"), ""));
+ abnormal_exit = 0;
} else {
- ast_agi_send(agi->fd, chan, "200 result=%d Gosub failed\n", res);
+ ast_log(LOG_NOTICE, "%s Abnormal AGI %s(%s) exit. Popping routine return locations.\n",
+ chan->name, app_gosub, gosub_args);
+ balance_stack(chan);
+ pbx_builtin_setvar_helper(chan, "GOSUB_RETVAL", "");
+ abnormal_exit = 1;
}
- ast_free(gosub_args);
+ ast_channel_unlock(chan);
+
+ ast_agi_send(agi->fd, chan, "200 result=0 Gosub complete%s\n",
+ abnormal_exit ? " (abnormal exit)" : "");
} else {
- ast_agi_send(agi->fd, chan, "503 result=-2 Memory allocation failure\n");
- return RESULT_FAILURE;
+ ast_agi_send(agi->fd, chan, "200 result=%d Gosub failed\n", res);
}
+ /* Must use free because the memory was allocated by asprintf(). */
+ free(gosub_args);
+
+ ast_channel_lock(chan);
+ ast_debug(4, "%s Ending location: %s,%s,%d\n", chan->name,
+ chan->context, chan->exten, chan->priority);
+
/* Restore previous location */
ast_copy_string(chan->context, old_context, sizeof(chan->context));
ast_copy_string(chan->exten, old_extension, sizeof(chan->exten));
chan->priority = old_priority;
+ /* Restore autoloop flag */
+ ast_set2_flag(chan, old_autoloopflag, AST_FLAG_IN_AUTOLOOP);
+ ast_channel_unlock(chan);
+
return RESULT_SUCCESS;
}
@@ -877,6 +1227,8 @@
static int unload_module(void)
{
+ ast_install_stack_functions(NULL);
+
ast_agi_unregister(ast_module_info->self, &gosub_agi_command);
ast_unregister_application(app_return);
@@ -892,6 +1244,12 @@
static int load_module(void)
{
+ /* Setup the stack application callback functions. */
+ static struct ast_app_stack_funcs funcs = {
+ .run_sub = gosub_run,
+ .expand_sub_args = expand_gosub_args,
+ };
+
ast_agi_register(ast_module_info->self, &gosub_agi_command);
ast_register_application_xml(app_pop, pop_exec);
@@ -902,6 +1260,9 @@
ast_custom_function_register(&peek_function);
ast_custom_function_register(&stackpeek_function);
+ funcs.module = ast_module_info->self,
+ ast_install_stack_functions(&funcs);
+
return 0;
}
|
[-]
[+]
|
Added |
asterisk-1.8.30.0.tar.xz/asterisk-1.8.30.0-summary.html
^
|
@@ -0,0 +1,161 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>Release Summary - asterisk-1.8.30.0</title></head>
+<body>
+<h1 align="center"><a name="top">Release Summary</a></h1>
+<h3 align="center">asterisk-1.8.30.0</h3>
+<h3 align="center">Date: 2014-08-19</h3>
+<h3 align="center"><asteriskteam@digium.com></h3>
+<hr/>
+<h2 align="center">Table of Contents</h2>
+<ol>
+ <li><a href="#summary">Summary</a></li>
+ <li><a href="#contributors">Contributors</a></li>
+ <li><a href="#issues">Closed Issues</a></li>
+ <li><a href="#commits">Other Changes</a></li>
+ <li><a href="#diffstat">Diffstat</a></li>
+</ol>
+<hr/>
+<a name="summary"><h2 align="center">Summary</h2></a>
+<center><a href="#top">[Back to Top]</a></center><br/><p>This release includes only bug fixes. The changes included were made only to address problems that have been identified in this release series. Users should be able to safely upgrade to this version if this release series is already in use. Users considering upgrading from a previous release series are strongly encouraged to review the UPGRADE.txt document as well as the CHANGES document for information about upgrading to this release series.</p>
+<p>The data in this summary reflects changes that have been made since the previous release, asterisk-1.8.29.0.</p>
+<hr/>
+<a name="contributors"><h2 align="center">Contributors</h2></a>
+<center><a href="#top">[Back to Top]</a></center><br/><p>This table lists the people who have submitted code, those that have tested patches, as well as those that reported issues on the issue tracker that were resolved in this release. For coders, the number is how many of their patches (of any size) were committed into this release. For testers, the number is the number of times their name was listed as assisting with testing a patch. Finally, for reporters, the number is the number of issues that they reported that were closed by commits that went into this release.</p>
+<table width="100%" border="0">
+<tr>
+<td width="33%"><h3>Coders</h3></td>
+<td width="33%"><h3>Testers</h3></td>
+<td width="33%"><h3>Reporters</h3></td>
+</tr>
+<tr valign="top">
+<td>
+2 coreyfarrell<br/>
+2 rmudgett<br/>
+2 wdoekes<br/>
+1 Elazar Broad<br/>
+1 gtjoseph<br/>
+1 jrose<br/>
+1 kmoore<br/>
+1 newtonr<br/>
+1 qwell<br/>
+</td>
+<td>
+1 Arnd Schmitter<br/>
+1 George Joseph<br/>
+1 JoshE<br/>
+1 Rusty Newton<br/>
+</td>
+<td>
+1 arnd<br/>
+1 coreyfarrell<br/>
+1 dennis.guse<br/>
+1 igorg<br/>
+1 mjordan<br/>
+1 rnewton<br/>
+1 stephane.chazelas<br/>
+</td>
+</tr>
+</table>
+<hr/>
+<a name="issues"><h2 align="center">Closed Issues</h2></a>
+<center><a href="#top">[Back to Top]</a></center><br/><p>This is a list of all issues from the issue tracker that were closed by changes that went into this release.</p>
+<h3>Category: Addons/chan_ooh323</h3><br/>
+<a href="https://issues.asterisk.org/jira/browse/ASTERISK-23814">ASTERISK-23814</a>: No call started after peer dialed<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.8?view=revision&revision=419374">419374</a><br/>
+Reporter: igorg<br/>
+Coders: qwell<br/>
+<br/>
+<h3>Category: Channels/chan_sip/Subscriptions</h3><br/>
+<a href="https://issues.asterisk.org/jira/browse/ASTERISK-24087">ASTERISK-24087</a>: [patch]chan_sip: sip_subscribe_mwi_destroy should not call sip_destroy<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.8?view=revision&revision=419440">419440</a><br/>
+Reporter: coreyfarrell<br/>
+Coders: coreyfarrell<br/>
+<br/>
+<h3>Category: Channels/chan_sip/TCP-TLS</h3><br/>
+<a href="https://issues.asterisk.org/jira/browse/ASTERISK-18345">ASTERISK-18345</a>: [patch] sips connection dropped by asterisk with a large INVITE<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.8?view=revision&revision=420434">420434</a><br/>
+Reporter: stephane.chazelas<br/>
+Coders: Elazar Broad<br/>
+<br/>
+<h3>Category: Core/ManagerInterface</h3><br/>
+<a href="https://issues.asterisk.org/jira/browse/ASTERISK-21178">ASTERISK-21178</a>: Improve documentation for manager command Getvar, Setvar<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.8?view=revision&revision=419942">419942</a><br/>
+Reporter: rnewton<br/>
+Testers: Rusty Newton<br/>
+Coders: newtonr<br/>
+<br/>
+<h3>Category: Documentation</h3><br/>
+<a href="https://issues.asterisk.org/jira/browse/ASTERISK-21178">ASTERISK-21178</a>: Improve documentation for manager command Getvar, Setvar<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.8?view=revision&revision=419942">419942</a><br/>
+Reporter: rnewton<br/>
+Testers: Rusty Newton<br/>
+Coders: newtonr<br/>
+<br/>
+<h3>Category: Functions/func_uri</h3><br/>
+<a href="https://issues.asterisk.org/jira/browse/ASTERISK-23911">ASTERISK-23911</a>: URIENCODE/URIDECODE: WARNING about passing an empty string is a bit over zealous<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.8?view=revision&revision=418641">418641</a><br/>
+Reporter: mjordan<br/>
+Coders: jrose<br/>
+<br/>
+<h3>Category: PBX/pbx_lua</h3><br/>
+<a href="https://issues.asterisk.org/jira/browse/ASTERISK-23818">ASTERISK-23818</a>: PBX_Lua: after asterisk startup module is loaded, but dialplan not available<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.8?view=revision&revision=420146">420146</a><br/>
+Reporter: dennis.guse<br/>
+Testers: George Joseph<br/>
+Coders: gtjoseph<br/>
+<br/>
+<h3>Category: Utilities/General</h3><br/>
+<a href="https://issues.asterisk.org/jira/browse/ASTERISK-23508">ASTERISK-23508</a>: Memory Corruption in __ast_string_field_ptr_build_va<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.8?view=revision&revision=420680">420680</a><br/>
+Reporter: arnd<br/>
+Testers: Arnd Schmitter, JoshE<br/>
+Coders: wdoekes<br/>
+<br/>
+<hr/>
+<a name="commits"><h2 align="center">Commits Not Associated with an Issue</h2></a>
+<center><a href="#top">[Back to Top]</a></center><br/><p>This is a list of all changes that went into this release that did not directly close an issue from the issue tracker. The commits may have been marked as being related to an issue. If that is the case, the issue numbers are listed here, as well.</p>
+<table width="100%" border="1">
+<tr><td><b>Revision</b></td><td><b>Author</b></td><td><b>Summary</b></td><td><b>Issues Referenced</b></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.8?view=revision&revision=418261">418261</a></td><td>rmudgett</td><td>chan_dahdi/sig_pri: Fix type mismatch in the idledial feature's channel creation.</td>
+<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.8?view=revision&revision=418504">418504</a></td><td>coreyfarrell</td><td>astobj2: work around REF_DEBUG race which causes out of order log entries</td>
+<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.8?view=revision&revision=419129">419129</a></td><td>kmoore</td><td>Fix more dev-mode build issues</td>
+<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.8?view=revision&revision=419684">419684</a></td><td>rmudgett</td><td>datastores: Audit ast_channel_datastore_remove usage.</td>
+<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.8?view=revision&revision=420654">420654</a></td><td>wdoekes</td><td>tcptls: Avoid compiler warning on non-dev-mode.</td>
+<td></td></tr></table>
+<hr/>
+<a name="diffstat"><h2 align="center">Diffstat Results</h2></a>
+<center><a href="#top">[Back to Top]</a></center><br/><p>This is a summary of the changes to the source code that went into this release that was generated using the diffstat utility.</p>
+<pre>
+addons/chan_ooh323.c | 26 -
+addons/ooh323c/src/decode.c | 4
+addons/ooh323c/src/ooq931.c | 12
+addons/ooh323c/src/printHandler.c | 2
+apps/app_meetme.c | 8
+apps/app_queue.c | 2
+apps/app_speech_utils.c | 56 ++--
+apps/app_stack.c | 505 ++++++++++++++++++++++++++++++++------
+channels/chan_sip.c | 186 +------------
+channels/sig_pri.c | 8
+contrib/scripts/refcounter.py | 17 -
+funcs/func_frame_trace.c | 1
+funcs/func_uri.c | 8
+include/asterisk/app.h | 161 +++++++++++-
+main/app.c | 128 +++++++++
+main/astobj2.c | 15 -
+main/features.c | 8
+main/manager.c | 19 -
+main/pbx.c | 5
+main/tcptls.c | 5
+main/utils.c | 17 +
+pbx/pbx_lua.c | 2
+tests/test_aoc.c | 2
+tests/test_astobj2.c | 2
+tests/test_astobj2_thrash.c | 2
+tests/test_event.c | 18 -
+tests/test_hashtab_thrash.c | 2
+tests/test_logger.c | 24 -
+28 files changed, 881 insertions(+), 364 deletions(-)
+</pre><br/>
+<hr/>
+</body>
+</html>
|
[-]
[+]
|
Added |
asterisk-1.8.30.0.tar.xz/asterisk-1.8.30.0-summary.txt
^
|
@@ -0,0 +1,207 @@
+ Release Summary
+
+ asterisk-1.8.30.0
+
+ Date: 2014-08-19
+
+ <asteriskteam@digium.com>
+
+ ----------------------------------------------------------------------
+
+ Table of Contents
+
+ 1. Summary
+ 2. Contributors
+ 3. Closed Issues
+ 4. Other Changes
+ 5. Diffstat
+
+ ----------------------------------------------------------------------
+
+ Summary
+
+ [Back to Top]
+
+ This release includes only bug fixes. The changes included were made only
+ to address problems that have been identified in this release series.
+ Users should be able to safely upgrade to this version if this release
+ series is already in use. Users considering upgrading from a previous
+ release series are strongly encouraged to review the UPGRADE.txt document
+ as well as the CHANGES document for information about upgrading to this
+ release series.
+
+ The data in this summary reflects changes that have been made since the
+ previous release, asterisk-1.8.29.0.
+
+ ----------------------------------------------------------------------
+
+ Contributors
+
+ [Back to Top]
+
+ This table lists the people who have submitted code, those that have
+ tested patches, as well as those that reported issues on the issue tracker
+ that were resolved in this release. For coders, the number is how many of
+ their patches (of any size) were committed into this release. For testers,
+ the number is the number of times their name was listed as assisting with
+ testing a patch. Finally, for reporters, the number is the number of
+ issues that they reported that were closed by commits that went into this
+ release.
+
+ Coders Testers Reporters
+ 2 coreyfarrell 1 Arnd Schmitter 1 arnd
+ 2 rmudgett 1 George Joseph 1 coreyfarrell
+ 2 wdoekes 1 JoshE 1 dennis.guse
+ 1 Elazar Broad 1 Rusty Newton 1 igorg
+ 1 gtjoseph 1 mjordan
+ 1 jrose 1 rnewton
+ 1 kmoore 1 stephane.chazelas
+ 1 newtonr
+ 1 qwell
+
+ ----------------------------------------------------------------------
+
+ Closed Issues
+
+ [Back to Top]
+
+ This is a list of all issues from the issue tracker that were closed by
+ changes that went into this release.
+
+ Category: Addons/chan_ooh323
+
+ ASTERISK-23814: No call started after peer dialed
+ Revision: 419374
+ Reporter: igorg
+ Coders: qwell
+
+ Category: Channels/chan_sip/Subscriptions
+
+ ASTERISK-24087: [patch]chan_sip: sip_subscribe_mwi_destroy should not call
+ sip_destroy
+ Revision: 419440
+ Reporter: coreyfarrell
+ Coders: coreyfarrell
+
+ Category: Channels/chan_sip/TCP-TLS
+
+ ASTERISK-18345: [patch] sips connection dropped by asterisk with a large
+ INVITE
+ Revision: 420434
+ Reporter: stephane.chazelas
+ Coders: Elazar Broad
+
+ Category: Core/ManagerInterface
+
+ ASTERISK-21178: Improve documentation for manager command Getvar, Setvar
+ Revision: 419942
+ Reporter: rnewton
+ Testers: Rusty Newton
+ Coders: newtonr
+
+ Category: Documentation
+
+ ASTERISK-21178: Improve documentation for manager command Getvar, Setvar
+ Revision: 419942
+ Reporter: rnewton
+ Testers: Rusty Newton
+ Coders: newtonr
+
+ Category: Functions/func_uri
+
+ ASTERISK-23911: URIENCODE/URIDECODE: WARNING about passing an empty string
+ is a bit over zealous
+ Revision: 418641
+ Reporter: mjordan
+ Coders: jrose
+
+ Category: PBX/pbx_lua
+
+ ASTERISK-23818: PBX_Lua: after asterisk startup module is loaded, but
+ dialplan not available
+ Revision: 420146
+ Reporter: dennis.guse
+ Testers: George Joseph
+ Coders: gtjoseph
+
+ Category: Utilities/General
+
+ ASTERISK-23508: Memory Corruption in __ast_string_field_ptr_build_va
+ Revision: 420680
+ Reporter: arnd
+ Testers: Arnd Schmitter, JoshE
+ Coders: wdoekes
+
+ ----------------------------------------------------------------------
+
+ Commits Not Associated with an Issue
+
+ [Back to Top]
+
+ This is a list of all changes that went into this release that did not
+ directly close an issue from the issue tracker. The commits may have been
+ marked as being related to an issue. If that is the case, the issue
+ numbers are listed here, as well.
+
+ +------------------------------------------------------------------------+
+ | Revision | Author | Summary | Issues |
+ | | | | Referenced |
+ |----------+--------------+---------------------------------+------------|
+ | | | chan_dahdi/sig_pri: Fix type | |
+ | 418261 | rmudgett | mismatch in the idledial | |
+ | | | feature's channel creation. | |
+ |----------+--------------+---------------------------------+------------|
+ | | | astobj2: work around REF_DEBUG | |
+ | 418504 | coreyfarrell | race which causes out of order | |
+ | | | log entries | |
+ |----------+--------------+---------------------------------+------------|
+ | 419129 | kmoore | Fix more dev-mode build issues | |
+ |----------+--------------+---------------------------------+------------|
+ | | | datastores: Audit | |
+ | 419684 | rmudgett | ast_channel_datastore_remove | |
+ | | | usage. | |
+ |----------+--------------+---------------------------------+------------|
+ | 420654 | wdoekes | tcptls: Avoid compiler warning | |
+ | | | on non-dev-mode. | |
+ +------------------------------------------------------------------------+
+
+ ----------------------------------------------------------------------
+
+ Diffstat Results
+
+ [Back to Top]
+
+ This is a summary of the changes to the source code that went into this
+ release that was generated using the diffstat utility.
+
+ addons/chan_ooh323.c | 26 -
+ addons/ooh323c/src/decode.c | 4
+ addons/ooh323c/src/ooq931.c | 12
+ addons/ooh323c/src/printHandler.c | 2
+ apps/app_meetme.c | 8
+ apps/app_queue.c | 2
+ apps/app_speech_utils.c | 56 ++--
+ apps/app_stack.c | 505 ++++++++++++++++++++++++++++++++------
+ channels/chan_sip.c | 186 +------------
+ channels/sig_pri.c | 8
+ contrib/scripts/refcounter.py | 17 -
+ funcs/func_frame_trace.c | 1
+ funcs/func_uri.c | 8
+ include/asterisk/app.h | 161 +++++++++++-
+ main/app.c | 128 +++++++++
+ main/astobj2.c | 15 -
+ main/features.c | 8
+ main/manager.c | 19 -
+ main/pbx.c | 5
+ main/tcptls.c | 5
+ main/utils.c | 17 +
+ pbx/pbx_lua.c | 2
+ tests/test_aoc.c | 2
+ tests/test_astobj2.c | 2
+ tests/test_astobj2_thrash.c | 2
+ tests/test_event.c | 18 -
+ tests/test_hashtab_thrash.c | 2
+ tests/test_logger.c | 24 -
+ 28 files changed, 881 insertions(+), 364 deletions(-)
+
+ ----------------------------------------------------------------------
|
[-]
[+]
|
Changed |
asterisk-1.8.30.0.tar.xz/autoconf/ast_ext_tool_check.m4
^
|
@@ -5,39 +5,37 @@
# AST_EXT_TOOL_CHECK([package], [tool name], [--cflags], [--libs], [includes], [expression])
AC_DEFUN([AST_EXT_TOOL_CHECK],
[
- if test "x${PBX_$1}" != "x1" -a "${USE_$1}" != "no"; then
- PBX_$1=0
- AC_PATH_TOOL(CONFIG_$1, $2, No, [${$1_DIR}/bin:$PATH])
- if test ! "x${CONFIG_$1}" = xNo; then
- if test x"$3" = x ; then A=--cflags ; else A="$3" ; fi
- $1_INCLUDE=$(${CONFIG_$1} $A)
- if test x"$4" = x ; then A=--libs ; else A="$4" ; fi
- $1_LIB=$(${CONFIG_$1} $A)
- if test x"$5" != x ; then
- saved_cppflags="${CPPFLAGS}"
- if test "x${$1_DIR}" != "x"; then
- $1_INCLUDE="-I${$1_DIR}/include"
- fi
- CPPFLAGS="${CPPFLAGS} ${$1_INCLUDE}"
+ if test "x${PBX_$1}" != "x1" -a "${USE_$1}" != "no"; then
+ PBX_$1=0
+ AC_PATH_TOOL(CONFIG_$1, $2, No, [${$1_DIR}/bin:$PATH])
+ if test ! "x${CONFIG_$1}" = xNo; then
+ if test x"$3" = x ; then A=--cflags ; else A="$3" ; fi
+ $1_INCLUDE=$(${CONFIG_$1} $A)
+ $1_INCLUDE=$(echo ${$1_INCLUDE} | $SED -e "s|-I|-I${$1_DIR}|g")
+
+ if test x"$4" = x ; then A=--libs ; else A="$4" ; fi
+ $1_LIB=$(${CONFIG_$1} $A)
+ $1_LIB=$(echo ${$1_LIB} | $SED -e "s|-L|-L${$1_DIR}|g")
- saved_libs="${LIBS}"
- LIBS="${$1_LIB}"
+ if test x"$5" != x ; then
+ saved_cppflags="${CPPFLAGS}"
+ CPPFLAGS="${CPPFLAGS} ${$1_INCLUDE}"
- AC_LINK_IFELSE(
- [ AC_LANG_PROGRAM( [ $5 ],
- [ $6; ]
- )],
- [ PBX_$1=1
- AC_DEFINE([HAVE_$1], 1, [Define if your system has the $1 headers.])
- ],
- []
- )
- CPPFLAGS="${saved_cppflags}"
- LIBS="${saved_libs}"
- else
- PBX_$1=1
- AC_DEFINE([HAVE_$1], 1, [Define if your system has the $1 libraries.])
- fi
+ saved_libs="${LIBS}"
+ LIBS=${$1_LIB}
+
+ AC_LINK_IFELSE(
+ [ AC_LANG_PROGRAM( [ $5 ], [ $6; ])],
+ [ PBX_$1=1 AC_DEFINE([HAVE_$1], 1,
+ [Define if your system has the $1 headers.])],
+ []
+ )
+ CPPFLAGS="${saved_cppflags}"
+ LIBS="${saved_libs}"
+ else
+ PBX_$1=1
+ AC_DEFINE([HAVE_$1], 1, [Define if your system has the $1 libraries.])
+ fi
+ fi
fi
- fi
])
|
[-]
[+]
|
Changed |
asterisk-1.8.30.0.tar.xz/cdr/cdr_sqlite3_custom.c
^
|
@@ -39,7 +39,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 337973 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 416336 $")
#include <sqlite3.h>
@@ -229,7 +229,6 @@
int res = 0;
char *error = NULL;
char *sql = NULL;
- int count = 0;
if (db == NULL) {
/* Should not have loaded, but be failsafe. */
@@ -265,16 +264,7 @@
ast_free(value_string);
}
- /* XXX This seems awful arbitrary... */
- for (count = 0; count < 5; count++) {
- res = sqlite3_exec(db, sql, NULL, NULL, &error);
- if (res != SQLITE_BUSY && res != SQLITE_LOCKED) {
- break;
- }
- usleep(200);
- }
-
- if (error) {
+ if (sqlite3_exec(db, sql, NULL, NULL, &error) != SQLITE_OK) {
ast_log(LOG_ERROR, "%s. SQL: %s.\n", error, sql);
sqlite3_free(error);
}
@@ -316,7 +306,7 @@
free_config(0);
return AST_MODULE_LOAD_DECLINE;
}
-
+ sqlite3_busy_timeout(db, 1000);
/* is the table there? */
sql = sqlite3_mprintf("SELECT COUNT(AcctId) FROM %q;", table);
res = sqlite3_exec(db, sql, NULL, NULL, NULL);
|
[-]
[+]
|
Changed |
asterisk-1.8.30.0.tar.xz/cel/cel_sqlite3_custom.c
^
|
@@ -41,7 +41,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 355319 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 416336 $")
#include <sqlite3.h>
@@ -231,7 +231,6 @@
{
char *error = NULL;
char *sql = NULL;
- int count = 0;
if (db == NULL) {
/* Should not have loaded, but be failsafe. */
@@ -266,18 +265,7 @@
ast_free(value_string);
}
- /* XXX This seems awful arbitrary... */
- for (count = 0; count < 5; count++) {
- int res = sqlite3_exec(db, sql, NULL, NULL, &error);
- if (res != SQLITE_BUSY && res != SQLITE_LOCKED) {
- break;
- }
- usleep(200);
- }
-
- ast_mutex_unlock(&lock);
-
- if (error) {
+ if (sqlite3_exec(db, sql, NULL, NULL, &error) != SQLITE_OK) {
ast_log(LOG_ERROR, "%s. SQL: %s.\n", error, sql);
sqlite3_free(error);
}
@@ -285,6 +273,7 @@
if (sql) {
sqlite3_free(sql);
}
+ ast_mutex_unlock(&lock);
return;
}
@@ -319,7 +308,7 @@
free_config();
return AST_MODULE_LOAD_DECLINE;
}
-
+ sqlite3_busy_timeout(db, 1000);
/* is the table there? */
sql = sqlite3_mprintf("SELECT COUNT(*) FROM %q;", table);
res = sqlite3_exec(db, sql, NULL, NULL, NULL);
|
[-]
[+]
|
Changed |
asterisk-1.8.30.0.tar.xz/channels/chan_dahdi.c
^
|
@@ -49,7 +49,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 414067 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 417956 $")
#if defined(__NetBSD__) || defined(__FreeBSD__)
#include <pthread.h>
@@ -1366,6 +1366,7 @@
.localdialplan = PRI_NATIONAL_ISDN + 1,
.nodetype = PRI_CPE,
.qsigchannelmapping = DAHDI_CHAN_MAPPING_PHYSICAL,
+ .inband_on_setup_ack = 1,
.inband_on_proceeding = 1,
#if defined(HAVE_PRI_CCSS)
@@ -12709,6 +12710,7 @@
pris[span].pri.layer1_ignored = 0;
}
pris[span].pri.append_msn_to_user_tag = conf->pri.pri.append_msn_to_user_tag;
+ pris[span].pri.inband_on_setup_ack = conf->pri.pri.inband_on_setup_ack;
pris[span].pri.inband_on_proceeding = conf->pri.pri.inband_on_proceeding;
ast_copy_string(pris[span].pri.initial_user_tag, conf->chan.cid_tag, sizeof(pris[span].pri.initial_user_tag));
ast_copy_string(pris[span].pri.msn_list, conf->pri.pri.msn_list, sizeof(pris[span].pri.msn_list));
@@ -17818,6 +17820,8 @@
#endif /* defined(HAVE_PRI_MWI) */
} else if (!strcasecmp(v->name, "append_msn_to_cid_tag")) {
confp->pri.pri.append_msn_to_user_tag = ast_true(v->value);
+ } else if (!strcasecmp(v->name, "inband_on_setup_ack")) {
+ confp->pri.pri.inband_on_setup_ack = ast_true(v->value);
} else if (!strcasecmp(v->name, "inband_on_proceeding")) {
confp->pri.pri.inband_on_proceeding = ast_true(v->value);
} else if (!strcasecmp(v->name, "layer1_presence")) {
|
[-]
[+]
|
Changed |
asterisk-1.8.30.0.tar.xz/channels/chan_sip.c
^
|
@@ -209,7 +209,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 416068 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 420434 $")
#include <signal.h>
#include <sys/signal.h>
@@ -2499,156 +2499,6 @@
}
/*!
- * \brief Read a SIP request or response from a TLS connection
- *
- * Because TLS operations are hidden from view via a FILE handle, the
- * logic for reading data is a bit complex, and we have to make periodic
- * checks to be sure we aren't taking too long to perform the necessary
- * action.
- *
- * \todo XXX This should be altered in the future not to use a FILE pointer
- *
- * \param req The request structure to fill in
- * \param tcptls_session The TLS connection on which the data is being received
- * \param authenticated A flag indicating whether authentication has occurred yet.
- * This is only relevant in a server role.
- * \param start The time at which we started attempting to read data. Used in
- * determining if there has been a timeout.
- * \param me Thread info. Used as a means of determining if the session needs to be stoppped.
- * \retval -1 Failed to read data
- * \retval 0 Succeeded in reading data
- */
-static int sip_tls_read(struct sip_request *req, struct sip_request *reqcpy, struct ast_tcptls_session_instance *tcptls_session,
- int authenticated, time_t start, struct sip_threadinfo *me)
-{
- int res, content_length, after_poll = 1, need_poll = 1;
- size_t datalen = ast_str_strlen(req->data);
- char buf[1024] = "";
- int timeout = -1;
-
- /* Read in headers one line at a time */
- while (datalen < 4 || strncmp(REQ_OFFSET_TO_STR(req, data->used - 4), "\r\n\r\n", 4)) {
- if (!tcptls_session->client && !authenticated) {
- if ((timeout = sip_check_authtimeout(start)) < 0) {
- ast_debug(2, "SIP TLS server failed to determine authentication timeout\n");
- return -1;
- }
-
- if (timeout == 0) {
- ast_debug(2, "SIP TLS server timed out\n");
- return -1;
- }
- } else {
- timeout = -1;
- }
-
- /* special polling behavior is required for TLS
- * sockets because of the buffering done in the
- * TLS layer */
- if (need_poll) {
- need_poll = 0;
- after_poll = 1;
- res = ast_wait_for_input(tcptls_session->fd, timeout);
- if (res < 0) {
- ast_debug(2, "SIP TLS server :: ast_wait_for_input returned %d\n", res);
- return -1;
- } else if (res == 0) {
- /* timeout */
- ast_debug(2, "SIP TLS server timed out\n");
- return -1;
- }
- }
-
- ast_mutex_lock(&tcptls_session->lock);
- if (!fgets(buf, sizeof(buf), tcptls_session->f)) {
- ast_mutex_unlock(&tcptls_session->lock);
- if (after_poll) {
- return -1;
- } else {
- need_poll = 1;
- continue;
- }
- }
- ast_mutex_unlock(&tcptls_session->lock);
- after_poll = 0;
- if (me->stop) {
- return -1;
- }
- ast_str_append(&req->data, 0, "%s", buf);
-
- datalen = ast_str_strlen(req->data);
- if (datalen > SIP_MAX_PACKET_SIZE) {
- ast_log(LOG_WARNING, "Rejecting TLS packet from '%s' because way too large: %zu\n",
- ast_sockaddr_stringify(&tcptls_session->remote_address), datalen);
- return -1;
- }
- }
- copy_request(reqcpy, req);
- parse_request(reqcpy);
- /* In order to know how much to read, we need the content-length header */
- if (sscanf(get_header(reqcpy, "Content-Length"), "%30d", &content_length)) {
- while (content_length > 0) {
- size_t bytes_read;
- if (!tcptls_session->client && !authenticated) {
- if ((timeout = sip_check_authtimeout(start)) < 0) {
- return -1;
- }
-
- if (timeout == 0) {
- ast_debug(2, "SIP TLS server timed out\n");
- return -1;
- }
- } else {
- timeout = -1;
- }
-
- if (need_poll) {
- need_poll = 0;
- after_poll = 1;
- res = ast_wait_for_input(tcptls_session->fd, timeout);
- if (res < 0) {
- ast_debug(2, "SIP TLS server :: ast_wait_for_input returned %d\n", res);
- return -1;
- } else if (res == 0) {
- /* timeout */
- ast_debug(2, "SIP TLS server timed out\n");
- return -1;
- }
- }
-
- ast_mutex_lock(&tcptls_session->lock);
- if (!(bytes_read = fread(buf, 1, MIN(sizeof(buf) - 1, content_length), tcptls_session->f))) {
- ast_mutex_unlock(&tcptls_session->lock);
- if (after_poll) {
- return -1;
- } else {
- need_poll = 1;
- continue;
- }
- }
- buf[bytes_read] = '\0';
- ast_mutex_unlock(&tcptls_session->lock);
- after_poll = 0;
- if (me->stop) {
- return -1;
- }
- content_length -= strlen(buf);
- ast_str_append(&req->data, 0, "%s", buf);
-
- datalen = ast_str_strlen(req->data);
- if (datalen > SIP_MAX_PACKET_SIZE) {
- ast_log(LOG_WARNING, "Rejecting TLS packet from '%s' because way too large: %zu\n",
- ast_sockaddr_stringify(&tcptls_session->remote_address), datalen);
- return -1;
- }
- }
- }
- /*! \todo XXX If there's no Content-Length or if the content-length and what
- we receive is not the same - we should generate an error */
- return 0;
-}
-
-/*!
* \brief Indication of a TCP message's integrity
*/
enum message_integrity {
@@ -2801,14 +2651,14 @@
}
/*!
- * \brief Read SIP request or response from a TCP connection
+ * \brief Read SIP request or response from a TCP/TLS connection
*
* \param req The request structure to be filled in
- * \param tcptls_session The TCP connection from which to read
+ * \param tcptls_session The TCP/TLS connection from which to read
* \retval -1 Failed to read data
* \retval 0 Successfully read data
*/
-static int sip_tcp_read(struct sip_request *req, struct ast_tcptls_session_instance *tcptls_session,
+static int sip_tcptls_read(struct sip_request *req, struct ast_tcptls_session_instance *tcptls_session,
int authenticated, time_t start)
{
enum message_integrity message_integrity = MESSAGE_FRAGMENT;
@@ -2826,7 +2676,7 @@
}
if (timeout == 0) {
- ast_debug(2, "SIP TCP server timed out\n");
+ ast_debug(2, "SIP TCP/TLS server timed out\n");
return -1;
}
} else {
@@ -2834,19 +2684,22 @@
}
res = ast_wait_for_input(tcptls_session->fd, timeout);
if (res < 0) {
- ast_debug(2, "SIP TCP server :: ast_wait_for_input returned %d\n", res);
+ ast_debug(2, "SIP TCP/TLS server :: ast_wait_for_input returned %d\n", res);
return -1;
} else if (res == 0) {
- ast_debug(2, "SIP TCP server timed out\n");
+ ast_debug(2, "SIP TCP/TLS server timed out\n");
return -1;
}
- res = recv(tcptls_session->fd, readbuf, sizeof(readbuf) - 1, 0);
+ res = ast_tcptls_server_read(tcptls_session, readbuf, sizeof(readbuf) - 1);
if (res < 0) {
- ast_debug(2, "SIP TCP server error when receiving data\n");
+ if (errno == EAGAIN || errno == EINTR) {
+ continue;
+ }
+ ast_debug(2, "SIP TCP/TLS server error when receiving data\n");
return -1;
} else if (res == 0) {
- ast_debug(2, "SIP TCP server has shut down\n");
+ ast_debug(2, "SIP TCP/TLS server has shut down\n");
return -1;
}
readbuf[res] = '\0';
@@ -2855,10 +2708,10 @@
ast_str_append(&req->data, 0, "%s", ast_str_buffer(tcptls_session->overflow_buf));
ast_str_reset(tcptls_session->overflow_buf);
}
-
+
datalen = ast_str_strlen(req->data);
if (datalen > SIP_MAX_PACKET_SIZE) {
- ast_log(LOG_WARNING, "Rejecting TCP packet from '%s' because way too large: %zu\n",
+ ast_log(LOG_WARNING, "Rejecting TCP/TLS packet from '%s' because way too large: %zu\n",
ast_sockaddr_stringify(&tcptls_session->remote_address), datalen);
return -1;
}
@@ -3025,12 +2878,7 @@
}
req.socket.fd = tcptls_session->fd;
- if (tcptls_session->ssl) {
- res = sip_tls_read(&req, &reqcpy, tcptls_session, authenticated, start, me);
- } else {
- res = sip_tcp_read(&req, tcptls_session, authenticated, start);
- }
-
+ res = sip_tcptls_read(&req, tcptls_session, authenticated, start);
if (res < 0) {
goto cleanup;
}
@@ -6108,9 +5956,9 @@
{
if (mwi->call) {
mwi->call->mwi = NULL;
- sip_destroy(mwi->call);
+ mwi->call = dialog_unref(mwi->call, "sip_subscription_mwi destruction");
}
-
+
AST_SCHED_DEL(sched, mwi->resub);
ast_string_field_free_memory(mwi);
ast_free(mwi);
@@ -6902,6 +6750,11 @@
ast_rtp_instance_update_source(p->rtp);
res = transmit_response_with_sdp(p, "200 OK", &p->initreq, XMIT_CRITICAL, oldsdp, TRUE);
ast_set_flag(&p->flags[1], SIP_PAGE2_DIALOG_ESTABLISHED);
+ /* RFC says the session timer starts counting on 200,
+ * not on INVITE. */
+ if (p->stimer->st_active == TRUE) {
+ start_session_timer(p);
+ }
}
sip_pvt_unlock(p);
return res;
@@ -10105,7 +9958,7 @@
if (debug)
ast_verbose("Discarded description format %s for ID %u\n", mimeSubtype, codec);
}
- } else if (sscanf(a, "fmtp: %30u %63s", &codec, fmtp_string) == 2) {
+ } else if (sscanf(a, "fmtp: %30u %63[^\t\n]", &codec, fmtp_string) == 2) {
struct ast_rtp_payload_type payload;
payload = ast_rtp_codecs_payload_lookup(newaudiortp, codec);
@@ -13548,7 +13401,7 @@
static int manager_sipnotify(struct mansession *s, const struct message *m)
{
const char *channame = astman_get_header(m, "Channel");
- struct ast_variable *vars = astman_get_variables(m);
+ struct ast_variable *vars = astman_get_variables_order(m, ORDER_NATURAL);
struct sip_pvt *p;
struct ast_variable *header, *var;
@@ -16033,7 +15886,8 @@
static enum sip_get_dest_result get_destination(struct sip_pvt *p, struct sip_request *oreq, int *cc_recall_core_id)
{
char tmp[256] = "", *uri, *unused_password, *domain;
- char tmpf[256] = "", *from = NULL;
+ RAII_VAR(char *, tmpf, NULL, ast_free);
+ char *from = NULL;
struct sip_request *req;
char *decoded_uri;
@@ -16073,7 +15927,7 @@
/* XXX Why is this done in get_destination? Isn't it already done?
Needs to be checked
*/
- ast_copy_string(tmpf, get_header(req, "From"), sizeof(tmpf));
+ tmpf = ast_strdup(get_header(req, "From"));
if (!ast_strlen_zero(tmpf)) {
from = get_in_brackets(tmpf);
if (parse_uri_legacy_check(from, "sip:,sips:", &from, NULL, &domain, NULL)) {
@@ -16857,19 +16711,21 @@
int sipmethod, const char *uri, enum xmittype reliable,
struct ast_sockaddr *addr, struct sip_peer **authpeer)
{
- char from[256], *of, *name, *unused_password, *domain;
+ char *of, *name, *unused_password, *domain;
+ RAII_VAR(char *, ofbuf, NULL, ast_free); /* beware, everyone starts pointing to this */
+ RAII_VAR(char *, namebuf, NULL, ast_free);
enum check_auth_result res = AUTH_DONT_KNOW;
char calleridname[256];
char *uri2 = ast_strdupa(uri);
terminate_uri(uri2); /* trim extra stuff */
- ast_copy_string(from, get_header(req, "From"), sizeof(from));
+ ofbuf = ast_strdup(get_header(req, "From"));
/* XXX here tries to map the username for invite things */
/* strip the display-name portion off the beginning of the FROM header. */
- if (!(of = (char *) get_calleridname(from, calleridname, sizeof(calleridname)))) {
- ast_log(LOG_ERROR, "FROM header can not be parsed \n");
+ if (!(of = (char *) get_calleridname(ofbuf, calleridname, sizeof(calleridname)))) {
+ ast_log(LOG_ERROR, "FROM header can not be parsed\n");
return res;
}
@@ -16945,8 +16801,7 @@
}
if (!ast_strlen_zero(hdr) && (hdr = strstr(hdr, "username=\""))) {
- ast_copy_string(from, hdr + strlen("username=\""), sizeof(from));
- name = from;
+ namebuf = name = ast_strdup(hdr + strlen("username=\""));
name = strsep(&name, "\"");
}
}
@@ -19349,6 +19204,20 @@
return NULL;
}
+static const char *transport2str(enum sip_transport transport)
+{
+ switch (transport) {
+ case SIP_TRANSPORT_TLS:
+ return "TLS";
+ case SIP_TRANSPORT_UDP:
+ return "UDP";
+ case SIP_TRANSPORT_TCP:
+ return "TCP";
+ }
+
+ return "Undefined";
+}
+
/*! \brief Show details of one active dialog */
static char *sip_show_channel(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
{
@@ -19450,6 +19319,10 @@
}
}
+ /* add transport and media types */
+ ast_cli(a->fd, " Transport: %s\n", transport2str(cur->socket.type));
+ ast_cli(a->fd, " Media: %s\n", cur->srtp ? "SRTP" : cur->rtp ? "RTP" : "None");
+
ast_cli(a->fd, "\n\n");
found++;
@@ -23793,12 +23666,8 @@
ast_party_redirecting_free(&redirecting);
}
- if (p->stimer->st_active == TRUE) {
- if (reinvite == 0) {
- start_session_timer(p);
- } else {
- restart_session_timer(p);
- }
+ if (reinvite && p->stimer->st_active == TRUE) {
+ restart_session_timer(p);
}
if (!req->ignore && p)
@@ -24813,7 +24682,9 @@
}
stop_media_flows(p); /* Immediately stop RTP, VRTP and UDPTL as applicable */
- stop_session_timer(p); /* Stop Session-Timer */
+ if (p->stimer) {
+ stop_session_timer(p); /* Stop Session-Timer */
+ }
if (!ast_strlen_zero(get_header(req, "Also"))) {
ast_log(LOG_NOTICE, "Client '%s' using deprecated BYE/Also transfer method. Ask vendor to support REFER instead\n",
@@ -26844,11 +26715,6 @@
/*! \brief Session-Timers: Restart session timer */
static void restart_session_timer(struct sip_pvt *p)
{
- if (!p->stimer) {
- ast_log(LOG_WARNING, "Null stimer in restart_session_timer - %s\n", p->callid);
- return;
- }
-
if (p->stimer->st_active == TRUE) {
ast_debug(2, "Session timer stopped: %d - %s\n", p->stimer->st_schedid, p->callid);
AST_SCHED_DEL_UNREF(sched, p->stimer->st_schedid,
@@ -26861,11 +26727,6 @@
/*! \brief Session-Timers: Stop session timer */
static void stop_session_timer(struct sip_pvt *p)
{
- if (!p->stimer) {
- ast_log(LOG_WARNING, "Null stimer in stop_session_timer - %s\n", p->callid);
- return;
- }
-
if (p->stimer->st_active == TRUE) {
p->stimer->st_active = FALSE;
ast_debug(2, "Session timer stopped: %d - %s\n", p->stimer->st_schedid, p->callid);
@@ -26880,11 +26741,6 @@
{
unsigned int timeout_ms;
- if (!p->stimer) {
- ast_log(LOG_WARNING, "Null stimer in start_session_timer - %s\n", p->callid);
- return;
- }
-
if (p->stimer->st_schedid > -1) {
/* in the event a timer is already going, stop it */
ast_debug(2, "Session timer stopped: %d - %s\n", p->stimer->st_schedid, p->callid);
@@ -26974,7 +26830,11 @@
/* An error occurred. Stop session timer processing */
if (p->stimer) {
ast_debug(2, "Session timer stopped: %d - %s\n", p->stimer->st_schedid, p->callid);
+ /* Don't pass go, don't collect $200.. we are the scheduled
+ * callback. We can rip ourself out here. */
p->stimer->st_schedid = -1;
+ /* Calling stop_session_timer is nice for consistent debug
+ * logs. */
stop_session_timer(p);
}
|
[-]
[+]
|
Changed |
asterisk-1.8.30.0.tar.xz/channels/sig_pri.c
^
|
@@ -940,12 +940,12 @@
return -1;
}
-static struct ast_channel *sig_pri_new_ast_channel(struct sig_pri_chan *p, int state, int ulaw, int transfercapability, char *exten, const struct ast_channel *requestor)
+static struct ast_channel *sig_pri_new_ast_channel(struct sig_pri_chan *p, int state, enum sig_pri_law law, int transfercapability, char *exten, const struct ast_channel *requestor)
{
struct ast_channel *c;
if (p->calls->new_ast_channel) {
- c = p->calls->new_ast_channel(p->chan_pvt, state, ulaw, exten, requestor);
+ c = p->calls->new_ast_channel(p->chan_pvt, state, law, exten, requestor);
} else {
return NULL;
}
@@ -1469,6 +1469,9 @@
#if defined(HAVE_PRI_CALL_WAITING)
new_chan->is_call_waiting = old_chan->is_call_waiting;
#endif /* defined(HAVE_PRI_CALL_WAITING) */
+#if defined(HAVE_PRI_SETUP_ACK_INBAND)
+ new_chan->no_dialed_digits = old_chan->no_dialed_digits;
+#endif /* defined(HAVE_PRI_SETUP_ACK_INBAND) */
#if defined(HAVE_PRI_AOC_EVENTS)
old_chan->aoc_s_request_invoke_id_valid = 0;
@@ -1484,6 +1487,9 @@
#if defined(HAVE_PRI_CALL_WAITING)
old_chan->is_call_waiting = 0;
#endif /* defined(HAVE_PRI_CALL_WAITING) */
+#if defined(HAVE_PRI_SETUP_ACK_INBAND)
+ old_chan->no_dialed_digits = 0;
+#endif /* defined(HAVE_PRI_SETUP_ACK_INBAND) */
/* More stuff to transfer to the new channel. */
new_chan->call_level = old_chan->call_level;
@@ -4595,7 +4601,7 @@
int res;
int chanpos = 0;
int x;
- int law;
+ enum sig_pri_law law;
struct ast_channel *c;
struct timeval tv, lowest, *next;
int doidling=0;
@@ -4699,7 +4705,7 @@
*/
sig_pri_lock_private(pri->pvts[nextidle]);
sig_pri_unlock_private(pri->pvts[nextidle]);
- idle = sig_pri_request(pri->pvts[nextidle], AST_FORMAT_ULAW, NULL, 0);
+ idle = sig_pri_request(pri->pvts[nextidle], SIG_PRI_ULAW, NULL, 0);
ast_mutex_lock(&pri->lock);
if (idle) {
pri->pvts[nextidle]->isidlecall = 1;
@@ -6316,8 +6322,19 @@
* We explicitly DO NOT want to check PRI_PROG_CALL_NOT_E2E_ISDN
* because it will mess up ISDN to SIP interoperability for
* the ALERTING message.
+ *
+ * Q.931 Section 5.1.3 says that in scenarios with overlap
+ * dialing where no called digits are received and the tone
+ * option requires dialtone, the switch MAY send an inband
+ * progress indication ie to indicate dialtone presence in
+ * the SETUP ACKNOWLEDGE. Therefore, if we did not send any
+ * digits with the SETUP then we must assume that dialtone
+ * is present and open the voice path. Fortunately when
+ * interoperating with SIP, we should be sending digits.
*/
- && (e->setup_ack.progressmask & PRI_PROG_INBAND_AVAILABLE)
+ && ((e->setup_ack.progressmask & PRI_PROG_INBAND_AVAILABLE)
+ || pri->inband_on_setup_ack
+ || pri->pvts[chanpos]->no_dialed_digits)
#endif /* defined(HAVE_PRI_SETUP_ACK_INBAND) */
) {
/*
@@ -6869,7 +6886,12 @@
if (!keypad || !ast_strlen_zero(c + p->stripmsd + dp_strip))
#endif /* defined(HAVE_PRI_SETUP_KEYPAD) */
{
- pri_sr_set_called(sr, c + p->stripmsd + dp_strip, pridialplan, s ? 1 : 0);
+ char *called = c + p->stripmsd + dp_strip;
+
+ pri_sr_set_called(sr, called, pridialplan, s ? 1 : 0);
+#if defined(HAVE_PRI_SETUP_ACK_INBAND)
+ p->no_dialed_digits = !called[0];
+#endif /* defined(HAVE_PRI_SETUP_ACK_INBAND) */
}
#if defined(HAVE_PRI_SUBADDR)
|
[-]
[+]
|
Changed |
asterisk-1.8.30.0.tar.xz/channels/sig_pri.h
^
|
@@ -286,6 +286,10 @@
/*! \brief TRUE if this is a call waiting call */
unsigned int is_call_waiting:1;
#endif /* defined(HAVE_PRI_CALL_WAITING) */
+#if defined(HAVE_PRI_SETUP_ACK_INBAND)
+ /*! TRUE if outgoing SETUP had no called digits */
+ unsigned int no_dialed_digits:1;
+#endif /* defined(HAVE_PRI_SETUP_ACK_INBAND) */
struct ast_channel *owner;
@@ -393,6 +397,8 @@
* appended to the initial_user_tag[].
*/
unsigned int append_msn_to_user_tag:1;
+ /*! TRUE if a SETUP ACK message needs to open the audio path. */
+ unsigned int inband_on_setup_ack:1;
/*! TRUE if a PROCEEDING message needs to unsquelch the received audio. */
unsigned int inband_on_proceeding:1;
int dialplan; /*!< Dialing plan */
|
[-]
[+]
|
Changed |
asterisk-1.8.30.0.tar.xz/channels/sip/reqresp_parser.c
^
|
@@ -25,7 +25,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 401660 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 416732 $")
#include "include/sip.h"
#include "include/sip_utils.h"
@@ -2489,8 +2489,8 @@
if (testdataptr->expected_port && testdataptr->expected_port != via->port) {
ast_test_status_update(test, "TEST#%d FAILED: VIA = \"%s\"\n"
- "parsed port = \"%d\"\n"
- "expected = \"%d\"\n"
+ "parsed port = \"%u\"\n"
+ "expected = \"%u\"\n"
"failed to parse port\n",
i, testdataptr->in, via->port, testdataptr->expected_port);
res = AST_TEST_FAIL;
|
[-]
[+]
|
Changed |
asterisk-1.8.30.0.tar.xz/channels/sip/sdp_crypto.c
^
|
@@ -31,7 +31,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 380347 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 415908 $")
#include "asterisk/options.h"
#include "asterisk/utils.h"
@@ -280,7 +280,7 @@
}
if (!p->tag) {
- ast_log(LOG_DEBUG, "Accepting crypto tag %s\n", tag);
+ ast_debug(1, "Accepting crypto tag %s\n", tag);
p->tag = ast_strdup(tag);
if (!p->tag) {
ast_log(LOG_ERROR, "Could not allocate memory for tag\n");
@@ -310,7 +310,7 @@
return -1;
}
- ast_log(LOG_DEBUG, "Crypto line: %s", p->a_crypto);
+ ast_debug(1, "Crypto line: %s", p->a_crypto);
return 0;
}
|
[-]
[+]
|
Changed |
asterisk-1.8.30.0.tar.xz/configs/chan_dahdi.conf.sample
^
|
@@ -169,6 +169,23 @@
;
;resetinterval = 3600
;
+; Assume inband audio may be present when a SETUP ACK message is received.
+; Q.931 Section 5.1.3 says that in scenarios with overlap dialing, when a
+; dialtone is sent from the network side, progress indicator 8 "Inband info
+; now available" MAY be sent to the CPE if no digits were received with
+; the SETUP. It is thus implied that the ie is mandatory if digits came
+; with the SETUP and dialtone is needed.
+; This option should be enabled, when the network sends dialtone and you
+; want to hear it, but the network doesn't send the progress indicator when
+; needed.
+;
+; NOTE: For Q.SIG setups this option should be enabled when outgoing overlap
+; dialing is also enabled because Q.SIG does not send the progress indicator
+; with the SETUP ACK.
+; Default yes in current release branches for backward compatibility.
+;
+;inband_on_setup_ack=yes
+;
; Assume inband audio may be present when a PROCEEDING message is received.
; Q.931 Section 5.1.2 says the network cannot assume that the CPE side has
; attached to the B channel at this time without explicitly sending the
|
[-]
[+]
|
Changed |
asterisk-1.8.30.0.tar.xz/configs/extensions.lua.sample
^
|
@@ -85,6 +85,7 @@
--
-- app.Dial("DAHDI/1")
-- app.dial("DAHDI/1")
+-- app["dial"]("DAHDI/1")
--
-- More examples can be found below.
--
@@ -95,6 +96,24 @@
-- autoservice_stop() and the autoservice_status() function will return true if
-- an autoservice is currently running.
--
+-- Note about naming conflicts:
+-- Lua allows you to refer to table entries using the '.' notation,
+-- I.E. app.goto(something), only if the entry doesn't conflict with an Lua
+-- reserved word. In the 'goto' example, with Lua 5.1 or earlier, 'goto' is
+-- not a reserved word so you'd be calling the Asterisk dialplan application
+-- 'goto'. Lua 5.2 however, introduced the 'goto' control statement which
+-- makes 'goto' a reserved word. This casues the interpreter to fail parsing
+-- the file and pbx_lua.so will fail to load. The same applies to any use of
+-- Lua tables including extensions, channels and any tables you create.
+--
+-- There are two ways around this: Since Lua is case-sensitive, you can use
+-- capitalized names, I.E. app.Goto(something) to refer to the Asterisk apps,
+-- functions, etc. Or you can use the full syntax, I.E. app["goto"](something).
+-- Both syntaxes are backwards compatible with earlier Lua versions. To make
+-- your Lua dialplans easier to maintain and to reduce the chance of future
+-- conflicts you may want to use the app["goto"](something) syntax for all
+-- table accesses.
+--
function outgoing_local(c, e)
app.dial("DAHDI/1/" .. e, "", "")
@@ -142,7 +161,8 @@
end;
["1000"] = function()
- app.goto("default", "s", 1)
+-- See the naming conflict note above.
+ app['goto']("default", "s", 1)
end;
["1234"] = function()
|
[-]
[+]
|
Changed |
asterisk-1.8.30.0.tar.xz/configs/features.conf.sample
^
|
@@ -3,23 +3,51 @@
;
[general]
-parkext => 700 ; What extension to dial to park. Set per parking lot.
-;parkext_exclusive=yes ; Specify that the parkext created for this parking lot
- ; will only access this parking lot. (default is no)
-parkpos => 701-720 ; What extensions to park calls on. (defafult parking lot)
- ; These need to be numeric, as Asterisk starts from the start position
- ; and increments with one for the next parked call.
- ; Set per parking lot.
-context => parkedcalls ; Which context parked calls are in (default parking lot)
- ; Set per parking lot.
-;parkinghints = no ; Add hints priorities automatically for parking slots (default is no).
- ; Set per parking lot.
-;parkingtime => 45 ; Number of seconds a call can be parked before returning.
- ; Set per parking lot. (default is 45 seconds)
+; OPTIONS THAT CAN ONLY BE SET IN THE GENERAL CONTEXT
+
+;featuredigittimeout = 1000 ; Max time (ms) between digits for
+ ; feature activation (default is 1000 ms)
+
+; Pickup Options
+;
+;pickupexten = *8 ; Configure the pickup extension. (default is *8)
+;pickupsound = beep ; to indicate a successful pickup (default: no sound)
+;pickupfailsound = beeperr ; to indicate that the pickup failed (default: no sound)
+
+; Transfer Options
+;
+;transferdigittimeout => 3 ; Number of seconds to wait between digits when transferring a call
+ ; (default is 3 seconds)
+;xfersound = beep ; to indicate an attended transfer is complete
+;xferfailsound = beeperr ; to indicate a failed transfer
+;atxfernoanswertimeout = 15 ; Timeout for answer on attended transfer default is 15 seconds.
+;atxferloopdelay = 10 ; Number of seconds to sleep between retries (if atxferdropcall = no)
+;atxfercallbackretries = 2 ; Number of times to attempt to send the call back to the transferer.
+ ; By default, this is 2.
+;atxferdropcall = no ; If someone does an attended transfer, then hangs up before the transferred
+ ; caller is connected, then by default, the system will try to call back the
+ ; person that did the transfer. If this is set to "yes", the callback will
+ ; not be attempted and the transfer will just fail.
+ ; For atxferdropcall=no to work properly, you also need to
+ ; define ATXFER_NULL_TECH in main/features.c. The reason the
+ ; code is not enabled by default is spelled out in the comment
+ ; block near the top of main/features.c describing ATXFER_NULL_TECH.
+
+; Parking Options
+;
+; These options apply to all parking lots, including the default lot defined in
+; the general context.
+;
+;courtesytone = beep ; Sound file to play to when someone picks up a parked call
+ ; and also when the Touch Monitor is activated/deactivated.
+ ; Default is no tone.
+;parkedplay = caller ; Who to play courtesytone to when picking up a parked call.
+ ; One of: parked, caller, both (default is caller)
+;parkeddynamic = yes ; Enables dynamically created parkinglots. (default is no)
+;adsipark = yes ; if you want ADSI parking announcements
;comebacktoorigin = yes ; Setting this option configures the behavior of call parking when the
; parked call times out (See the parkingtime option). The default value is 'yes'.
- ; Operates on all parking lots.
;
; 'yes' - When the parked call times out, attempt to send the call back to the peer
; that parked this call. This is done by saving off the name of the channel
@@ -46,60 +74,44 @@
; During the timeout procedure, the following variable is set
; PARKINGSLOT - extension that the call was parked in prior to timing out
-;courtesytone = beep ; Sound file to play to when someone picks up a parked call
- ; and also when the Touch Monitor is activated/deactivated.
- ; Default is no tone.
-;parkedplay = caller ; Who to play courtesytone to when picking up a parked call.
- ; One of: parked, caller, both (default is caller)
- ; Operates on all parking lots.
+
+; OPTIONS THAT CAN BE SET PER PARKING LOT
+;
+; If these options are set in the general context, they will *only* apply to the default
+; parking lot. If set in any other lot, they will *only* apply to that lot.
+
+parkext => 700 ; What extension to dial to park. This option can take any alphanumeric string.
+ ; (default is 700 for all lots)
+;parkext_exclusive=yes ; Specify that the parkext created for this parking lot
+ ; will only access this parking lot. (default is no for all lots)
+parkpos => 701-750 ; What extensions to park calls on.
+ ; (default is 701-750 for the default lot and blank for custom lots)
+ ; These need to be numeric, as Asterisk starts from the start position
+ ; and increments with one for the next parked call. Hence, leading zeros
+ ; and non-numerical characters will be ignored.
+context => parkedcalls ; Which context parked calls are in (default is parkedcalls for the default lot and blank for custom lots)
+;parkinghints = no ; Add hints priorities automatically for parking slots (default is no for all lots).
+;parkingtime => 45 ; Number of seconds a call can be parked before returning.
+ ; (default is 45 for all lots)
;parkedcalltransfers = caller ; Enables or disables DTMF based transfers when picking up a parked call.
- ; one of: callee, caller, both, no (default is no)
- ; Set per parking lot.
+ ; one of: callee, caller, both, no (default is no for all lots)
;parkedcallreparking = caller ; Enables or disables DTMF based parking when picking up a parked call.
- ; one of: callee, caller, both, no (default is no)
- ; Set per parking lot.
+ ; one of: callee, caller, both, no (default is no for all lots)
;parkedcallhangup = caller ; Enables or disables DTMF based hangups when picking up a parked call.
- ; one of: callee, caller, both, no (default is no)
- ; Set per parking lot.
+ ; one of: callee, caller, both, no (default is no for all lots)
;parkedcallrecording = caller ; Enables or disables DTMF based one-touch recording when picking up a parked call.
- ; one of: callee, caller, both, no (default is no)
- ; Set per parking lot.
-;parkeddynamic = yes ; Enables dynamically created parkinglots. (default is no)
- ; Operates on all parking lots.
-;adsipark = yes ; if you want ADSI parking announcements
- ; Operates on all parking lots.
+ ; one of: callee, caller, both, no (default is no for all lots)
;findslot => next ; Continue to the 'next' free parking space.
- ; Defaults to 'first' available
- ; Set per parking lot.
+ ; (Default is 'first' for all lots)
;parkedmusicclass=default ; This is the MOH class to use for the parked channel
; as long as the class is not set on the channel directly
- ; using Set(CHANNEL(musicclass)=whatever) in the dialplan
- ; Set per parking lot.
+ ; using Set(CHANNEL(musicclass)=whatever) in the dialplan.
+ ; (Default is 'default' for default parking lot. Non-default parkinglots
+ ; don't specify a class so the class is picked by the channel put on hold
+ ; which has the 'default' class by default.)
-;transferdigittimeout => 3 ; Number of seconds to wait between digits when transferring a call
- ; (default is 3 seconds)
-;xfersound = beep ; to indicate an attended transfer is complete
-;xferfailsound = beeperr ; to indicate a failed transfer
-;pickupexten = *8 ; Configure the pickup extension. (default is *8)
-;pickupsound = beep ; to indicate a successful pickup (default: no sound)
-;pickupfailsound = beeperr ; to indicate that the pickup failed (default: no sound)
-;featuredigittimeout = 1000 ; Max time (ms) between digits for
- ; feature activation (default is 1000 ms)
-;atxfernoanswertimeout = 15 ; Timeout for answer on attended transfer default is 15 seconds.
-;atxferdropcall = no ; If someone does an attended transfer, then hangs up before the transferred
- ; caller is connected, then by default, the system will try to call back the
- ; person that did the transfer. If this is set to "yes", the callback will
- ; not be attempted and the transfer will just fail.
- ; For atxferdropcall=no to work properly, you also need to
- ; define ATXFER_NULL_TECH in main/features.c. The reason the
- ; code is not enabled by default is spelled out in the comment
- ; block near the top of main/features.c describing ATXFER_NULL_TECH.
-;atxferloopdelay = 10 ; Number of seconds to sleep between retries (if atxferdropcall = no)
-;atxfercallbackretries = 2 ; Number of times to attempt to send the call back to the transferer.
- ; By default, this is 2.
-;
-;*** Define another parking lot
+; EXAMPLE NON-DEFAULT PARKING LOT DEFINITION
;
; You can set parkinglot with the CHANNEL dialplan function
; or by setting 'parkinglot' directly in the channel configuration file.
@@ -113,11 +125,12 @@
;parkpos => 800-850
;findslot => next
+; EXAMPLE DTMF FEATURE MAP
+;
; Note that the DTMF features listed below only work when two channels have answered and are bridged together.
; They can not be used while the remote party is ringing or in progress. If you require this feature you can use
; chan_local in combination with Answer to accomplish it.
-
[featuremap]
;blindxfer => #1 ; Blind transfer (default is #) -- Make sure to set the T and/or t option in the Dial() or Queue() app call!
;disconnect => *0 ; Disconnect (default is *) -- Make sure to set the H and/or h option in the Dial() or Queue() app call!
@@ -126,6 +139,10 @@
;parkcall => #72 ; Park call (one step parking) -- Make sure to set the K and/or k option in the Dial() app call!
;automixmon => *3 ; One Touch Record a.k.a. Touch MixMonitor -- Make sure to set the X and/or x option in the Dial() or Queue() app call!
+
+; EXAMPLE DYNAMIC FEATURES APPLICATION MAP
+;
+
[applicationmap]
; Note that the DYNAMIC_FEATURES channel variable must be set to use the features
; defined here. The value of DYNAMIC_FEATURES should be the names of the features
|
[-]
[+]
|
Changed |
asterisk-1.8.30.0.tar.xz/configure
^
|
@@ -1,14 +1,12 @@
#! /bin/sh
-# From configure.ac Revision: 409833 .
+# From configure.ac Revision: 413714 .
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for asterisk trunk.
+# Generated by GNU Autoconf 2.69 for asterisk trunk.
#
# Report bugs to <https://issues.asterisk.org>.
#
#
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
-# Foundation, Inc.
+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
#
#
# This configure script is free software; the Free Software Foundation
@@ -139,6 +137,31 @@
# CDPATH.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+# Use a proper internal environment variable to ensure we don't fall
+ # into an infinite loop, continuously re-executing ourselves.
+ if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+ _as_can_reexec=no; export _as_can_reexec;
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_exit 255
+ fi
+ # We don't want this to propagate to other subprocesses.
+ { _as_can_reexec=; unset _as_can_reexec;}
if test "x$CONFIG_SHELL" = x; then
as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
emulate sh
@@ -172,7 +195,8 @@
else
exitcode=1; echo positional parameters were not saved.
fi
-test x\$exitcode = x0 || exit 1"
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
@@ -217,21 +241,25 @@
if test "x$CONFIG_SHELL" != x; then :
- # We cannot yet assume a decent shell, so we have to provide a
- # neutralization value for shells without unset; and this also
- # works around shells that cannot unset nonexistent variables.
- # Preserve -v and -x to the replacement shell.
- BASH_ENV=/dev/null
- ENV=/dev/null
- (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
- export CONFIG_SHELL
- case $- in # ((((
- *v*x* | *x*v* ) as_opts=-vx ;;
- *v* ) as_opts=-v ;;
- *x* ) as_opts=-x ;;
- * ) as_opts= ;;
- esac
- exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
+ export CONFIG_SHELL
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
fi
if test x$as_have_required = xno; then :
@@ -334,6 +362,14 @@
} # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
# as_fn_append VAR VALUE
# ----------------------
# Append the text in VALUE to the end of the definition contained in VAR. Take
@@ -455,6 +491,10 @@
chmod +x "$as_me.lineno" ||
{ $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+ # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+ # already done that, so ensure we don't try to do so again and fall
+ # in an infinite loop. This has already happened in practice.
+ _as_can_reexec=no; export _as_can_reexec
# Don't try to exec as it changes $[0], causing all sort of problems
# (the dirname of $[0] is not the place where we might find the
# original and so on. Autoconf is especially sensitive to this).
@@ -489,16 +529,16 @@
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
+ # In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
@@ -510,28 +550,8 @@
as_mkdir_p=false
fi
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -1710,8 +1730,6 @@
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
- $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used" >&2
elif test "x$build_alias" != "x$host_alias"; then
cross_compiling=yes
fi
@@ -2034,9 +2052,9 @@
if $ac_init_version; then
cat <<\_ACEOF
asterisk configure trunk
-generated by GNU Autoconf 2.68
+generated by GNU Autoconf 2.69
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
@@ -2390,7 +2408,7 @@
test ! -s conftest.err
} && test -s conftest$ac_exeext && {
test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
+ test -x conftest$ac_exeext
}; then :
ac_retval=0
else
@@ -2604,7 +2622,8 @@
main ()
{
static int test_array [1 - 2 * !(($2) >= 0)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
;
return 0;
@@ -2620,7 +2639,8 @@
main ()
{
static int test_array [1 - 2 * !(($2) <= $ac_mid)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
;
return 0;
@@ -2646,7 +2666,8 @@
main ()
{
static int test_array [1 - 2 * !(($2) < 0)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
;
return 0;
@@ -2662,7 +2683,8 @@
main ()
{
static int test_array [1 - 2 * !(($2) >= $ac_mid)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
;
return 0;
@@ -2696,7 +2718,8 @@
main ()
{
static int test_array [1 - 2 * !(($2) <= $ac_mid)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
;
return 0;
@@ -2883,7 +2906,7 @@
test ! -s conftest.err
} && test -s conftest$ac_exeext && {
test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
+ test -x conftest$ac_exeext
}; then :
ac_retval=0
else
@@ -2937,7 +2960,7 @@
running configure, to aid debugging if configure makes a mistake.
It was created by asterisk $as_me trunk, which was
-generated by GNU Autoconf 2.68. Invocation command line was
+generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -3465,7 +3488,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3505,7 +3528,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3558,7 +3581,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}cc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3599,7 +3622,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
@@ -3657,7 +3680,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3701,7 +3724,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4147,8 +4170,7 @@
/* end confdefs.h. */
#include <stdarg.h>
#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+struct stat;
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
struct buf { int x; };
FILE * (*rcsopen) (struct buf *, struct stat *, int);
@@ -4388,7 +4410,7 @@
for ac_prog in grep ggrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+ as_fn_executable_p "$ac_path_GREP" || continue
# Check for GNU ac_path_GREP and select it if it is found.
# Check for GNU $ac_path_GREP
case `"$ac_path_GREP" --version 2>&1` in
@@ -4454,7 +4476,7 @@
for ac_prog in egrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+ as_fn_executable_p "$ac_path_EGREP" || continue
# Check for GNU ac_path_EGREP and select it if it is found.
# Check for GNU $ac_path_EGREP
case `"$ac_path_EGREP" --version 2>&1` in
@@ -4661,8 +4683,8 @@
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-# define __EXTENSIONS__ 1
- $ac_includes_default
+# define __EXTENSIONS__ 1
+ $ac_includes_default
int
main ()
{
@@ -4860,7 +4882,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4903,7 +4925,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_ac_pt_UNAME="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4968,7 +4990,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5008,7 +5030,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5060,7 +5082,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CXX="${ac_tool_prefix}g++"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5100,7 +5122,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CXX="g++"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5152,7 +5174,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_LD="${ac_tool_prefix}ld"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5192,7 +5214,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_LD="ld"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5244,7 +5266,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5284,7 +5306,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_RANLIB="ranlib"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5344,7 +5366,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5384,7 +5406,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5437,7 +5459,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}cc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5478,7 +5500,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
@@ -5536,7 +5558,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5580,7 +5602,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5776,8 +5798,7 @@
/* end confdefs.h. */
#include <stdarg.h>
#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+struct stat;
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
struct buf { int x; };
FILE * (*rcsopen) (struct buf *, struct stat *, int);
@@ -5890,7 +5911,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5934,7 +5955,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CXX="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6413,7 +6434,7 @@
for ac_prog in sed gsed; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
+ as_fn_executable_p "$ac_path_SED" || continue
# Check for GNU ac_path_SED and select it if it is found.
# Check for GNU $ac_path_SED
case `"$ac_path_SED" --version 2>&1` in
@@ -6598,7 +6619,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_AWK="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6659,7 +6680,7 @@
# by default.
for ac_prog in ginstall scoinst install; do
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
if test $ac_prog = install &&
grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
@@ -6743,7 +6764,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6783,7 +6804,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_RANLIB="ranlib"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6865,7 +6886,7 @@
for ac_prog in egrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+ as_fn_executable_p "$ac_path_EGREP" || continue
# Check for GNU ac_path_EGREP and select it if it is found.
# Check for GNU $ac_path_EGREP
case `"$ac_path_EGREP" --version 2>&1` in
@@ -6933,7 +6954,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6977,7 +6998,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_STRIP="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7033,7 +7054,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7077,7 +7098,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_AR="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7133,7 +7154,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_SHA1SUM="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7177,7 +7198,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_SHA1SUM="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7233,7 +7254,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_OPENSSL="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7277,7 +7298,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_OPENSSL="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7339,7 +7360,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7380,7 +7401,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7421,7 +7442,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_FLEX="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7462,7 +7483,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7503,7 +7524,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7544,7 +7565,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_COMPRESS="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7585,7 +7606,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7626,7 +7647,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7667,7 +7688,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_SHELL="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7708,7 +7729,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7749,7 +7770,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7790,7 +7811,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_WGET="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7831,7 +7852,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_CURL="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7872,7 +7893,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_RUBBER="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7913,7 +7934,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_CATDVI="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7954,7 +7975,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_KPATHSEA="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7995,7 +8016,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -8036,7 +8057,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_XMLSTARLET="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -8077,7 +8098,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_GIT="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -8123,7 +8144,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_FETCH="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -8219,7 +8240,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_SOXMIX="${ac_tool_prefix}soxmix"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -8259,7 +8280,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_SOXMIX="soxmix"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -8318,7 +8339,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_MD5="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -8484,7 +8505,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_acx_pthread_config="yes"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -8640,7 +8661,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_PTHREAD_CC="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -9560,7 +9581,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_AWK="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -9610,7 +9631,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path__libcurl_config="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -9652,7 +9673,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path__libcurl_config="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -11748,23 +11769,20 @@
/* end confdefs.h. */
$ac_includes_default
int
-find_stack_direction ()
+find_stack_direction (int *addr, int depth)
{
- static char *addr = 0;
- auto char dummy;
- if (addr == 0)
- {
- addr = &dummy;
- return find_stack_direction ();
- }
- else
- return (&dummy > addr) ? 1 : -1;
+ int dir, dummy = 0;
+ if (! addr)
+ addr = &dummy;
+ *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
+ dir = depth ? find_stack_direction (addr, depth - 1) : 0;
+ return dir + dummy;
}
int
-main ()
+main (int argc, char **argv)
{
- return find_stack_direction () < 0;
+ return find_stack_direction (0, argc + !argv + 20) < 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
@@ -12558,9 +12576,9 @@
if test "${disable_xmldoc}" != "yes"; then
- if test "x${PBX_LIBXML2}" != "x1" -a "${USE_LIBXML2}" != "no"; then
- PBX_LIBXML2=0
- if test -n "$ac_tool_prefix"; then
+ if test "x${PBX_LIBXML2}" != "x1" -a "${USE_LIBXML2}" != "no"; then
+ PBX_LIBXML2=0
+ if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}xml2-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}xml2-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -12580,7 +12598,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_CONFIG_LIBXML2="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -12624,7 +12642,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_ac_pt_CONFIG_LIBXML2="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -12660,23 +12678,24 @@
CONFIG_LIBXML2="$ac_cv_path_CONFIG_LIBXML2"
fi
- if test ! "x${CONFIG_LIBXML2}" = xNo; then
- if test x"" = x ; then A=--cflags ; else A="" ; fi
- LIBXML2_INCLUDE=$(${CONFIG_LIBXML2} $A)
- if test x"" = x ; then A=--libs ; else A="" ; fi
- LIBXML2_LIB=$(${CONFIG_LIBXML2} $A)
- if test x"#include <libxml/tree.h>
+ if test ! "x${CONFIG_LIBXML2}" = xNo; then
+ if test x"" = x ; then A=--cflags ; else A="" ; fi
+ LIBXML2_INCLUDE=$(${CONFIG_LIBXML2} $A)
+ LIBXML2_INCLUDE=$(echo ${LIBXML2_INCLUDE} | $SED -e "s|-I|-I${LIBXML2_DIR}|g")
+
+ if test x"" = x ; then A=--libs ; else A="" ; fi
+ LIBXML2_LIB=$(${CONFIG_LIBXML2} $A)
+ LIBXML2_LIB=$(echo ${LIBXML2_LIB} | $SED -e "s|-L|-L${LIBXML2_DIR}|g")
+
+ if test x"#include <libxml/tree.h>
#include <libxml/parser.h>" != x ; then
- saved_cppflags="${CPPFLAGS}"
- if test "x${LIBXML2_DIR}" != "x"; then
- LIBXML2_INCLUDE="-I${LIBXML2_DIR}/include"
- fi
- CPPFLAGS="${CPPFLAGS} ${LIBXML2_INCLUDE}"
+ saved_cppflags="${CPPFLAGS}"
+ CPPFLAGS="${CPPFLAGS} ${LIBXML2_INCLUDE}"
- saved_libs="${LIBS}"
- LIBS="${LIBXML2_LIB}"
+ saved_libs="${LIBS}"
+ LIBS=${LIBXML2_LIB}
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <libxml/tree.h>
#include <libxml/parser.h>
@@ -12684,30 +12703,27 @@
main ()
{
LIBXML_TEST_VERSION;
-
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- PBX_LIBXML2=1
-
+ PBX_LIBXML2=1
$as_echo "#define HAVE_LIBXML2 1" >>confdefs.h
-
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- CPPFLAGS="${saved_cppflags}"
- LIBS="${saved_libs}"
- else
- PBX_LIBXML2=1
+ CPPFLAGS="${saved_cppflags}"
+ LIBS="${saved_libs}"
+ else
+ PBX_LIBXML2=1
$as_echo "#define HAVE_LIBXML2 1" >>confdefs.h
- fi
+ fi
+ fi
fi
- fi
if test "${PBX_LIBXML2}" != 1; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: *** XML documentation will not be available because the 'libxml2' development package is missing." >&5
@@ -12955,6 +12971,8 @@
esac
rm -rf conftest*
fi
+
+
fi
@@ -12967,60 +12985,60 @@
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <stdbool.h>
-#ifndef bool
- "error: bool is not defined"
-#endif
-#ifndef false
- "error: false is not defined"
-#endif
-#if false
- "error: false is not 0"
-#endif
-#ifndef true
- "error: true is not defined"
-#endif
-#if true != 1
- "error: true is not 1"
-#endif
-#ifndef __bool_true_false_are_defined
- "error: __bool_true_false_are_defined is not defined"
-#endif
-
- struct s { _Bool s: 1; _Bool t; } s;
-
- char a[true == 1 ? 1 : -1];
- char b[false == 0 ? 1 : -1];
- char c[__bool_true_false_are_defined == 1 ? 1 : -1];
- char d[(bool) 0.5 == true ? 1 : -1];
- /* See body of main program for 'e'. */
- char f[(_Bool) 0.0 == false ? 1 : -1];
- char g[true];
- char h[sizeof (_Bool)];
- char i[sizeof s.t];
- enum { j = false, k = true, l = false * true, m = true * 256 };
- /* The following fails for
- HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
- _Bool n[m];
- char o[sizeof n == m * sizeof n[0] ? 1 : -1];
- char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
- /* Catch a bug in an HP-UX C compiler. See
- http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
- http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
- */
- _Bool q = true;
- _Bool *pq = &q;
+ #include <stdbool.h>
+ #ifndef bool
+ "error: bool is not defined"
+ #endif
+ #ifndef false
+ "error: false is not defined"
+ #endif
+ #if false
+ "error: false is not 0"
+ #endif
+ #ifndef true
+ "error: true is not defined"
+ #endif
+ #if true != 1
+ "error: true is not 1"
+ #endif
+ #ifndef __bool_true_false_are_defined
+ "error: __bool_true_false_are_defined is not defined"
+ #endif
+
+ struct s { _Bool s: 1; _Bool t; } s;
+
+ char a[true == 1 ? 1 : -1];
+ char b[false == 0 ? 1 : -1];
+ char c[__bool_true_false_are_defined == 1 ? 1 : -1];
+ char d[(bool) 0.5 == true ? 1 : -1];
+ /* See body of main program for 'e'. */
+ char f[(_Bool) 0.0 == false ? 1 : -1];
+ char g[true];
+ char h[sizeof (_Bool)];
+ char i[sizeof s.t];
+ enum { j = false, k = true, l = false * true, m = true * 256 };
+ /* The following fails for
+ HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
+ _Bool n[m];
+ char o[sizeof n == m * sizeof n[0] ? 1 : -1];
+ char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
+ /* Catch a bug in an HP-UX C compiler. See
+ http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
+ http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
+ */
+ _Bool q = true;
+ _Bool *pq = &q;
int
main ()
{
- bool e = &s;
- *pq |= q;
- *pq |= ! q;
- /* Refer to every declared value, to avoid compiler optimizations. */
- return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
- + !m + !n + !o + !p + !q + !pq);
+ bool e = &s;
+ *pq |= q;
+ *pq |= ! q;
+ /* Refer to every declared value, to avoid compiler optimizations. */
+ return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
+ + !m + !n + !o + !p + !q + !pq);
;
return 0;
@@ -13035,7 +13053,7 @@
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
$as_echo "$ac_cv_header_stdbool_h" >&6; }
-ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
+ ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
if test "x$ac_cv_type__Bool" = xyes; then :
cat >>confdefs.h <<_ACEOF
@@ -13045,6 +13063,7 @@
fi
+
if test $ac_cv_header_stdbool_h = yes; then
$as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
@@ -13062,11 +13081,11 @@
int
main ()
{
-/* FIXME: Include the comments suggested by Paul. */
+
#ifndef __cplusplus
- /* Ultrix mips cc rejects this. */
+ /* Ultrix mips cc rejects this sort of thing. */
typedef int charset[2];
- const charset cs;
+ const charset cs = { 0, 0 };
/* SunOS 4.1.1 cc rejects this. */
char const *const *pcpcc;
char **ppc;
@@ -13083,8 +13102,9 @@
++pcpcc;
ppc = (char**) pcpcc;
pcpcc = (char const *const *) ppc;
- { /* SCO 3.2v4 cc rejects this. */
- char *t;
+ { /* SCO 3.2v4 cc rejects this sort of thing. */
+ char tx;
+ char *t = &tx;
char const *s = 0 ? (char *) 0 : (char const *) 0;
*t++ = 0;
@@ -13100,10 +13120,10 @@
iptr p = 0;
++p;
}
- { /* AIX XL C 1.02.0.0 rejects this saying
+ { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
"k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
- struct s { int j; const int *ap[3]; };
- struct s *b; b->j = 5;
+ struct s { int j; const int *ap[3]; } bx;
+ struct s *b = &bx; b->j = 5;
}
{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
const int foo = 10;
@@ -13233,7 +13253,8 @@
- (LDBL_MANT_DIG < DBL_MANT_DIG)))
&& (int) LDBL_EPSILON == 0
)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
;
return 0;
@@ -17559,7 +17580,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_PKGCONFIG="${ac_tool_prefix}pkg-config"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -17599,7 +17620,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_PKGCONFIG="pkg-config"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -20926,9 +20947,9 @@
fi
- if test "x${PBX_MYSQLCLIENT}" != "x1" -a "${USE_MYSQLCLIENT}" != "no"; then
- PBX_MYSQLCLIENT=0
- if test -n "$ac_tool_prefix"; then
+ if test "x${PBX_MYSQLCLIENT}" != "x1" -a "${USE_MYSQLCLIENT}" != "no"; then
+ PBX_MYSQLCLIENT=0
+ if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}mysql_config", so it can be a program name with args.
set dummy ${ac_tool_prefix}mysql_config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -20948,7 +20969,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_CONFIG_MYSQLCLIENT="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -20992,7 +21013,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_ac_pt_CONFIG_MYSQLCLIENT="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -21028,52 +21049,50 @@
CONFIG_MYSQLCLIENT="$ac_cv_path_CONFIG_MYSQLCLIENT"
fi
- if test ! "x${CONFIG_MYSQLCLIENT}" = xNo; then
- if test x"" = x ; then A=--cflags ; else A="" ; fi
- MYSQLCLIENT_INCLUDE=$(${CONFIG_MYSQLCLIENT} $A)
- if test x"" = x ; then A=--libs ; else A="" ; fi
- MYSQLCLIENT_LIB=$(${CONFIG_MYSQLCLIENT} $A)
- if test x"" != x ; then
- saved_cppflags="${CPPFLAGS}"
- if test "x${MYSQLCLIENT_DIR}" != "x"; then
- MYSQLCLIENT_INCLUDE="-I${MYSQLCLIENT_DIR}/include"
- fi
- CPPFLAGS="${CPPFLAGS} ${MYSQLCLIENT_INCLUDE}"
+ if test ! "x${CONFIG_MYSQLCLIENT}" = xNo; then
+ if test x"" = x ; then A=--cflags ; else A="" ; fi
+ MYSQLCLIENT_INCLUDE=$(${CONFIG_MYSQLCLIENT} $A)
+ MYSQLCLIENT_INCLUDE=$(echo ${MYSQLCLIENT_INCLUDE} | $SED -e "s|-I|-I${MYSQLCLIENT_DIR}|g")
+
+ if test x"" = x ; then A=--libs ; else A="" ; fi
+ MYSQLCLIENT_LIB=$(${CONFIG_MYSQLCLIENT} $A)
+ MYSQLCLIENT_LIB=$(echo ${MYSQLCLIENT_LIB} | $SED -e "s|-L|-L${MYSQLCLIENT_DIR}|g")
+
+ if test x"" != x ; then
+ saved_cppflags="${CPPFLAGS}"
+ CPPFLAGS="${CPPFLAGS} ${MYSQLCLIENT_INCLUDE}"
- saved_libs="${LIBS}"
- LIBS="${MYSQLCLIENT_LIB}"
+ saved_libs="${LIBS}"
+ LIBS=${MYSQLCLIENT_LIB}
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
;
-
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- PBX_MYSQLCLIENT=1
-
+ PBX_MYSQLCLIENT=1
$as_echo "#define HAVE_MYSQLCLIENT 1" >>confdefs.h
-
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- CPPFLAGS="${saved_cppflags}"
- LIBS="${saved_libs}"
- else
- PBX_MYSQLCLIENT=1
+ CPPFLAGS="${saved_cppflags}"
+ LIBS="${saved_libs}"
+ else
+ PBX_MYSQLCLIENT=1
$as_echo "#define HAVE_MYSQLCLIENT 1" >>confdefs.h
- fi
+ fi
+ fi
fi
- fi
@@ -21182,9 +21201,9 @@
- if test "x${PBX_NEON}" != "x1" -a "${USE_NEON}" != "no"; then
- PBX_NEON=0
- if test -n "$ac_tool_prefix"; then
+ if test "x${PBX_NEON}" != "x1" -a "${USE_NEON}" != "no"; then
+ PBX_NEON=0
+ if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}neon-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}neon-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -21204,7 +21223,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_CONFIG_NEON="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -21248,7 +21267,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_ac_pt_CONFIG_NEON="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -21284,58 +21303,56 @@
CONFIG_NEON="$ac_cv_path_CONFIG_NEON"
fi
- if test ! "x${CONFIG_NEON}" = xNo; then
- if test x"" = x ; then A=--cflags ; else A="" ; fi
- NEON_INCLUDE=$(${CONFIG_NEON} $A)
- if test x"" = x ; then A=--libs ; else A="" ; fi
- NEON_LIB=$(${CONFIG_NEON} $A)
- if test x"" != x ; then
- saved_cppflags="${CPPFLAGS}"
- if test "x${NEON_DIR}" != "x"; then
- NEON_INCLUDE="-I${NEON_DIR}/include"
- fi
- CPPFLAGS="${CPPFLAGS} ${NEON_INCLUDE}"
+ if test ! "x${CONFIG_NEON}" = xNo; then
+ if test x"" = x ; then A=--cflags ; else A="" ; fi
+ NEON_INCLUDE=$(${CONFIG_NEON} $A)
+ NEON_INCLUDE=$(echo ${NEON_INCLUDE} | $SED -e "s|-I|-I${NEON_DIR}|g")
+
+ if test x"" = x ; then A=--libs ; else A="" ; fi
+ NEON_LIB=$(${CONFIG_NEON} $A)
+ NEON_LIB=$(echo ${NEON_LIB} | $SED -e "s|-L|-L${NEON_DIR}|g")
+
+ if test x"" != x ; then
+ saved_cppflags="${CPPFLAGS}"
+ CPPFLAGS="${CPPFLAGS} ${NEON_INCLUDE}"
- saved_libs="${LIBS}"
- LIBS="${NEON_LIB}"
+ saved_libs="${LIBS}"
+ LIBS=${NEON_LIB}
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
;
-
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- PBX_NEON=1
-
+ PBX_NEON=1
$as_echo "#define HAVE_NEON 1" >>confdefs.h
-
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- CPPFLAGS="${saved_cppflags}"
- LIBS="${saved_libs}"
- else
- PBX_NEON=1
+ CPPFLAGS="${saved_cppflags}"
+ LIBS="${saved_libs}"
+ else
+ PBX_NEON=1
$as_echo "#define HAVE_NEON 1" >>confdefs.h
- fi
+ fi
+ fi
fi
- fi
- if test "x${PBX_NEON29}" != "x1" -a "${USE_NEON29}" != "no"; then
- PBX_NEON29=0
- if test -n "$ac_tool_prefix"; then
+ if test "x${PBX_NEON29}" != "x1" -a "${USE_NEON29}" != "no"; then
+ PBX_NEON29=0
+ if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}neon-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}neon-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -21355,7 +21372,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_CONFIG_NEON29="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -21399,7 +21416,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_ac_pt_CONFIG_NEON29="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -21435,22 +21452,23 @@
CONFIG_NEON29="$ac_cv_path_CONFIG_NEON29"
fi
- if test ! "x${CONFIG_NEON29}" = xNo; then
- if test x"" = x ; then A=--cflags ; else A="" ; fi
- NEON29_INCLUDE=$(${CONFIG_NEON29} $A)
- if test x"--libs" = x ; then A=--libs ; else A="--libs" ; fi
- NEON29_LIB=$(${CONFIG_NEON29} $A)
- if test x"#include <ne_auth.h>" != x ; then
- saved_cppflags="${CPPFLAGS}"
- if test "x${NEON29_DIR}" != "x"; then
- NEON29_INCLUDE="-I${NEON29_DIR}/include"
- fi
- CPPFLAGS="${CPPFLAGS} ${NEON29_INCLUDE}"
+ if test ! "x${CONFIG_NEON29}" = xNo; then
+ if test x"" = x ; then A=--cflags ; else A="" ; fi
+ NEON29_INCLUDE=$(${CONFIG_NEON29} $A)
+ NEON29_INCLUDE=$(echo ${NEON29_INCLUDE} | $SED -e "s|-I|-I${NEON29_DIR}|g")
+
+ if test x"--libs" = x ; then A=--libs ; else A="--libs" ; fi
+ NEON29_LIB=$(${CONFIG_NEON29} $A)
+ NEON29_LIB=$(echo ${NEON29_LIB} | $SED -e "s|-L|-L${NEON29_DIR}|g")
+
+ if test x"#include <ne_auth.h>" != x ; then
+ saved_cppflags="${CPPFLAGS}"
+ CPPFLAGS="${CPPFLAGS} ${NEON29_INCLUDE}"
- saved_libs="${LIBS}"
- LIBS="${NEON29_LIB}"
+ saved_libs="${LIBS}"
+ LIBS=${NEON29_LIB}
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <ne_auth.h>
int
@@ -21459,36 +21477,33 @@
#ifndef NE_AUTH_NTLM
#error Need libneon >= 0.29.0
#endif;
-
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- PBX_NEON29=1
-
+ PBX_NEON29=1
$as_echo "#define HAVE_NEON29 1" >>confdefs.h
-
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- CPPFLAGS="${saved_cppflags}"
- LIBS="${saved_libs}"
- else
- PBX_NEON29=1
+ CPPFLAGS="${saved_cppflags}"
+ LIBS="${saved_libs}"
+ else
+ PBX_NEON29=1
$as_echo "#define HAVE_NEON29 1" >>confdefs.h
- fi
+ fi
+ fi
fi
- fi
- if test "x${PBX_NETSNMP}" != "x1" -a "${USE_NETSNMP}" != "no"; then
- PBX_NETSNMP=0
- if test -n "$ac_tool_prefix"; then
+ if test "x${PBX_NETSNMP}" != "x1" -a "${USE_NETSNMP}" != "no"; then
+ PBX_NETSNMP=0
+ if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}net-snmp-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}net-snmp-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -21508,7 +21523,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_CONFIG_NETSNMP="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -21552,7 +21567,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_ac_pt_CONFIG_NETSNMP="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -21588,24 +21603,25 @@
CONFIG_NETSNMP="$ac_cv_path_CONFIG_NETSNMP"
fi
- if test ! "x${CONFIG_NETSNMP}" = xNo; then
- if test x"" = x ; then A=--cflags ; else A="" ; fi
- NETSNMP_INCLUDE=$(${CONFIG_NETSNMP} $A)
- if test x"--agent-libs" = x ; then A=--libs ; else A="--agent-libs" ; fi
- NETSNMP_LIB=$(${CONFIG_NETSNMP} $A)
- if test x"#include <net-snmp/net-snmp-config.h>
+ if test ! "x${CONFIG_NETSNMP}" = xNo; then
+ if test x"" = x ; then A=--cflags ; else A="" ; fi
+ NETSNMP_INCLUDE=$(${CONFIG_NETSNMP} $A)
+ NETSNMP_INCLUDE=$(echo ${NETSNMP_INCLUDE} | $SED -e "s|-I|-I${NETSNMP_DIR}|g")
+
+ if test x"--agent-libs" = x ; then A=--libs ; else A="--agent-libs" ; fi
+ NETSNMP_LIB=$(${CONFIG_NETSNMP} $A)
+ NETSNMP_LIB=$(echo ${NETSNMP_LIB} | $SED -e "s|-L|-L${NETSNMP_DIR}|g")
+
+ if test x"#include <net-snmp/net-snmp-config.h>
#include <net-snmp/net-snmp-includes.h>
#include <net-snmp/agent/net-snmp-agent-includes.h>" != x ; then
- saved_cppflags="${CPPFLAGS}"
- if test "x${NETSNMP_DIR}" != "x"; then
- NETSNMP_INCLUDE="-I${NETSNMP_DIR}/include"
- fi
- CPPFLAGS="${CPPFLAGS} ${NETSNMP_INCLUDE}"
+ saved_cppflags="${CPPFLAGS}"
+ CPPFLAGS="${CPPFLAGS} ${NETSNMP_INCLUDE}"
- saved_libs="${LIBS}"
- LIBS="${NETSNMP_LIB}"
+ saved_libs="${LIBS}"
+ LIBS=${NETSNMP_LIB}
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <net-snmp/net-snmp-config.h>
#include <net-snmp/net-snmp-includes.h>
@@ -21614,30 +21630,27 @@
main ()
{
int callback = snmp_register_callback(0, 0, NULL, NULL);
-
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- PBX_NETSNMP=1
-
+ PBX_NETSNMP=1
$as_echo "#define HAVE_NETSNMP 1" >>confdefs.h
-
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- CPPFLAGS="${saved_cppflags}"
- LIBS="${saved_libs}"
- else
- PBX_NETSNMP=1
+ CPPFLAGS="${saved_cppflags}"
+ LIBS="${saved_libs}"
+ else
+ PBX_NETSNMP=1
$as_echo "#define HAVE_NETSNMP 1" >>confdefs.h
- fi
+ fi
+ fi
fi
- fi
@@ -22607,7 +22620,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_PG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -22650,7 +22663,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_ac_pt_PG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -22719,7 +22732,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_PG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -22762,7 +22775,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_ac_pt_PG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -25667,7 +25680,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_PTLIB_CONFIG="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -25729,7 +25742,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_PTLIB_CONFIG="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -28162,9 +28175,9 @@
- if test "x${PBX_GMIME}" != "x1" -a "${USE_GMIME}" != "no"; then
- PBX_GMIME=0
- if test -n "$ac_tool_prefix"; then
+ if test "x${PBX_GMIME}" != "x1" -a "${USE_GMIME}" != "no"; then
+ PBX_GMIME=0
+ if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}gmime-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}gmime-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -28184,7 +28197,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_CONFIG_GMIME="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -28228,7 +28241,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_ac_pt_CONFIG_GMIME="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -28264,52 +28277,50 @@
CONFIG_GMIME="$ac_cv_path_CONFIG_GMIME"
fi
- if test ! "x${CONFIG_GMIME}" = xNo; then
- if test x"" = x ; then A=--cflags ; else A="" ; fi
- GMIME_INCLUDE=$(${CONFIG_GMIME} $A)
- if test x"" = x ; then A=--libs ; else A="" ; fi
- GMIME_LIB=$(${CONFIG_GMIME} $A)
- if test x"#include <gmime/gmime.h>" != x ; then
- saved_cppflags="${CPPFLAGS}"
- if test "x${GMIME_DIR}" != "x"; then
- GMIME_INCLUDE="-I${GMIME_DIR}/include"
- fi
- CPPFLAGS="${CPPFLAGS} ${GMIME_INCLUDE}"
+ if test ! "x${CONFIG_GMIME}" = xNo; then
+ if test x"" = x ; then A=--cflags ; else A="" ; fi
+ GMIME_INCLUDE=$(${CONFIG_GMIME} $A)
+ GMIME_INCLUDE=$(echo ${GMIME_INCLUDE} | $SED -e "s|-I|-I${GMIME_DIR}|g")
+
+ if test x"" = x ; then A=--libs ; else A="" ; fi
+ GMIME_LIB=$(${CONFIG_GMIME} $A)
+ GMIME_LIB=$(echo ${GMIME_LIB} | $SED -e "s|-L|-L${GMIME_DIR}|g")
+
+ if test x"#include <gmime/gmime.h>" != x ; then
+ saved_cppflags="${CPPFLAGS}"
+ CPPFLAGS="${CPPFLAGS} ${GMIME_INCLUDE}"
- saved_libs="${LIBS}"
- LIBS="${GMIME_LIB}"
+ saved_libs="${LIBS}"
+ LIBS=${GMIME_LIB}
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <gmime/gmime.h>
int
main ()
{
gboolean q = g_mime_check_version(0,0,0);;
-
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- PBX_GMIME=1
-
+ PBX_GMIME=1
$as_echo "#define HAVE_GMIME 1" >>confdefs.h
-
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- CPPFLAGS="${saved_cppflags}"
- LIBS="${saved_libs}"
- else
- PBX_GMIME=1
+ CPPFLAGS="${saved_cppflags}"
+ LIBS="${saved_libs}"
+ else
+ PBX_GMIME=1
$as_echo "#define HAVE_GMIME 1" >>confdefs.h
- fi
+ fi
+ fi
fi
- fi
if test "x${PBX_GMIME}" = "x0" -a "${PKGCONFIG}" != "No"; then
# Later versions of GMime use pkg-config
@@ -29286,9 +29297,9 @@
- if test "x${PBX_SDL}" != "x1" -a "${USE_SDL}" != "no"; then
- PBX_SDL=0
- if test -n "$ac_tool_prefix"; then
+ if test "x${PBX_SDL}" != "x1" -a "${USE_SDL}" != "no"; then
+ PBX_SDL=0
+ if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}sdl-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}sdl-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -29308,7 +29319,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_CONFIG_SDL="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -29352,7 +29363,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_ac_pt_CONFIG_SDL="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -29388,52 +29399,50 @@
CONFIG_SDL="$ac_cv_path_CONFIG_SDL"
fi
- if test ! "x${CONFIG_SDL}" = xNo; then
- if test x"" = x ; then A=--cflags ; else A="" ; fi
- SDL_INCLUDE=$(${CONFIG_SDL} $A)
- if test x"" = x ; then A=--libs ; else A="" ; fi
- SDL_LIB=$(${CONFIG_SDL} $A)
- if test x"" != x ; then
- saved_cppflags="${CPPFLAGS}"
- if test "x${SDL_DIR}" != "x"; then
- SDL_INCLUDE="-I${SDL_DIR}/include"
- fi
- CPPFLAGS="${CPPFLAGS} ${SDL_INCLUDE}"
+ if test ! "x${CONFIG_SDL}" = xNo; then
+ if test x"" = x ; then A=--cflags ; else A="" ; fi
+ SDL_INCLUDE=$(${CONFIG_SDL} $A)
+ SDL_INCLUDE=$(echo ${SDL_INCLUDE} | $SED -e "s|-I|-I${SDL_DIR}|g")
+
+ if test x"" = x ; then A=--libs ; else A="" ; fi
+ SDL_LIB=$(${CONFIG_SDL} $A)
+ SDL_LIB=$(echo ${SDL_LIB} | $SED -e "s|-L|-L${SDL_DIR}|g")
+
+ if test x"" != x ; then
+ saved_cppflags="${CPPFLAGS}"
+ CPPFLAGS="${CPPFLAGS} ${SDL_INCLUDE}"
- saved_libs="${LIBS}"
- LIBS="${SDL_LIB}"
+ saved_libs="${LIBS}"
+ LIBS=${SDL_LIB}
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
;
-
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- PBX_SDL=1
-
+ PBX_SDL=1
$as_echo "#define HAVE_SDL 1" >>confdefs.h
-
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- CPPFLAGS="${saved_cppflags}"
- LIBS="${saved_libs}"
- else
- PBX_SDL=1
+ CPPFLAGS="${saved_cppflags}"
+ LIBS="${saved_libs}"
+ else
+ PBX_SDL=1
$as_echo "#define HAVE_SDL 1" >>confdefs.h
- fi
+ fi
+ fi
fi
- fi
if test "x${PBX_SDL_IMAGE}" != "x1" -a "${USE_SDL_IMAGE}" != "no"; then
@@ -30903,16 +30912,16 @@
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
+ # In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
@@ -30972,28 +30981,16 @@
as_mkdir_p=false
fi
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -31015,7 +31012,7 @@
# values after options handling.
ac_log="
This file was extended by asterisk $as_me trunk, which was
-generated by GNU Autoconf 2.68. Invocation command line was
+generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -31077,10 +31074,10 @@
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
asterisk config.status trunk
-configured by $0, generated by GNU Autoconf 2.68,
+configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
@@ -31170,7 +31167,7 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
if \$ac_cs_recheck; then
- set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
shift
\$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
CONFIG_SHELL='$SHELL'
|
[-]
[+]
|
Changed |
asterisk-1.8.30.0.tar.xz/contrib/scripts/refcounter.py
^
|
@@ -23,6 +23,7 @@
from optparse import OptionParser
+
def parse_line(line):
"""Parse out a line into its constituent parts.
@@ -46,11 +47,11 @@
'function': tokens[5],
'state': tokens[6],
'tag': tokens[7],
- }
+ }
return processed_line
-def process_file(filename):
+def process_file(options):
"""The routine that kicks off processing a ref file
Keyword Arguments:
@@ -67,6 +68,7 @@
leaked_objects = []
skewed_objects = []
current_objects = {}
+ filename = options.filepath
with open(filename, 'r') as ref_file:
for line in ref_file:
@@ -77,17 +79,31 @@
obj = parsed_line['addr']
if obj not in current_objects:
- current_objects[obj] = []
+ current_objects[obj] = {'log': [], 'curcount': 1,}
if 'constructor' not in parsed_line['state']:
- skewed_objects.append(current_objects[obj])
- current_objects[obj].append(parsed_line)
-
- if 'destructor' in parsed_line['state']:
- lifetime = current_objects.get(obj)
- finished_objects.append(lifetime)
+ current_objects[obj]['curcount'] = parsed_line['state']
+ if options.skewed:
+ skewed_objects.append((obj, current_objects[obj]))
+ else:
+ current_objects[obj]['curcount'] += int(parsed_line['delta'])
+
+ current_objects[obj]['log'].append("[%s] %s:%s %s: %s %s - [%s]" % (
+ parsed_line['thread_id'],
+ parsed_line['file'],
+ parsed_line['line'],
+ parsed_line['function'],
+ parsed_line['delta'],
+ parsed_line['tag'],
+ parsed_line['state']))
+
+ if current_objects[obj]['curcount'] == 0:
+ if options.normal:
+ finished_objects.append((obj, current_objects[obj]))
del current_objects[obj]
- leaked_objects = current_objects.values()
+ if options.leaks:
+ for key, lines in current_objects.iteritems():
+ leaked_objects.append((key, lines))
return (finished_objects, leaked_objects, skewed_objects)
@@ -103,13 +119,9 @@
print "======== %s Objects ========" % prefix
print "\n"
for obj in objects:
- print "==== %s Object %s history ====" % (prefix, obj[0]['addr'])
- for entry in obj:
- print "[%s] %s:%s %s: %s %s - [%s]" % (entry['thread_id'],
- entry['file'], entry['line'],
- entry['function'],
- entry['delta'], entry['tag'],
- entry['state'])
+ print "==== %s Object %s history ====" % (prefix, obj[0])
+ for line in obj[1]['log']:
+ print line
print "\n"
@@ -131,15 +143,19 @@
help="If specified, don't output leaked objects")
parser.add_option("-n", "--suppress-normal", action="store_false",
dest="normal", default=True,
- help="If specified, don't output objects with a " \
+ help="If specified, don't output objects with a "
"complete lifetime")
parser.add_option("-s", "--suppress-skewed", action="store_false",
dest="skewed", default=True,
- help="If specified, don't output objects with a " \
+ help="If specified, don't output objects with a "
"skewed lifetime")
(options, args) = parser.parse_args(argv)
+ if not options.leaks and not options.skewed and not options.normal:
+ print >>sys.stderr, "All options disabled"
+ return -1
+
if not os.path.isfile(options.filepath):
print >>sys.stderr, "File not found: %s" % options.filepath
return -1
@@ -147,7 +163,7 @@
try:
(finished_objects,
leaked_objects,
- skewed_objects) = process_file(options.filepath)
+ skewed_objects) = process_file(options)
if options.leaks and len(leaked_objects):
print_objects(leaked_objects, "Leaked")
|
[-]
[+]
|
Changed |
asterisk-1.8.30.0.tar.xz/contrib/scripts/safe_asterisk
^
|
@@ -1,19 +1,18 @@
#!/bin/sh
-# vim:textwidth=80:tabstop=4:shiftwidth=4:smartindent:autoindent
-CLIARGS="$*" # Grab any args passed to safe_asterisk
-TTY=9 # TTY (if you want one) for Asterisk to run on
-CONSOLE=yes # Whether or not you want a console
+CLIARGS="$*" # Grab any args passed to safe_asterisk
+TTY=9 # TTY (if you want one) for Asterisk to run on
+CONSOLE=yes # Whether or not you want a console
#NOTIFY=ben@alkaloid.net # Who to notify about crashes
#EXEC=/path/to/somescript # Run this command if Asterisk crashes
#LOGFILE=/path/to/logfile # Where to place the normal logfile (disabled if blank)
-#SYSLOG=local0 # Which syslog facility to use (disabled if blank)
-MACHINE=`hostname` # To specify which machine has crashed when getting the mail
+#SYSLOG=local0 # Which syslog facility to use (disabled if blank)
+MACHINE=`hostname` # To specify which machine has crashed when getting the mail
DUMPDROP=/tmp
SLEEPSECS=4
-ASTSBINDIR=__ASTERISK_SBIN_DIR__
-ASTVARRUNDIR=__ASTERISK_VARRUN_DIR__
-ASTPIDFILE=${ASTVARRUNDIR}/asterisk.pid
+ASTSBINDIR="__ASTERISK_SBIN_DIR__"
+ASTVARRUNDIR="__ASTERISK_VARRUN_DIR__"
+ASTPIDFILE="${ASTVARRUNDIR}/asterisk.pid"
# comment this line out to have this script _not_ kill all mpg123 processes when
# asterisk exits
@@ -34,19 +33,21 @@
# MAXFILES=32768
message() {
- echo "$1" >&2
- if test "x$SYSLOG" != "x" ; then
- logger -p "${SYSLOG}.warn" -t safe_asterisk[$$] "$1"
+ if test -n "$TTY" && test "$TTY" != "no"; then
+ echo "$1" >/dev/${TTY}
fi
- if test "x$LOGFILE" != "x" ; then
- echo "safe_asterisk[$$]: $1" >> "$LOGFILE"
+ if test -n "$SYSLOG"; then
+ logger -p "${SYSLOG}.warn" -t safe_asterisk[$$] "$1"
+ fi
+ if test -n "$LOGFILE"; then
+ echo "safe_asterisk[$$]: $1" >>"$LOGFILE"
fi
}
# Check if Asterisk is already running. If it is, then bug out, because
# starting safe_asterisk when Asterisk is running is very bad.
-VERSION=`${ASTSBINDIR}/asterisk -nrx 'core show version' 2>/dev/null`
-if test "`echo $VERSION | cut -c 1-8`" = "Asterisk" ; then
+VERSION=`"${ASTSBINDIR}/asterisk" -nrx 'core show version' 2>/dev/null`
+if test "`echo $VERSION | cut -c 1-8`" = "Asterisk"; then
message "Asterisk is already running. $0 will exit now."
exit 1
fi
@@ -55,7 +56,7 @@
# root. if running asterisk as other users, pass that to asterisk on the command
# line.
# if we're not root, fall back to standard everything.
-if test `id -u` != 0 ; then
+if test `id -u` != 0; then
echo "Oops. I'm not root. Falling back to standard prio and file max." >&2
echo "This is NOT suitable for large systems." >&2
PRIORITY=0
@@ -64,9 +65,9 @@
if `uname -s | grep Linux >/dev/null 2>&1`; then
# maximum number of open files is set to the system maximum divided by two if
# MAXFILES is not set.
- if test "x$MAXFILES" = "x" ; then
+ if test -z "$MAXFILES"; then
# just check if file-max is readable
- if test -r /proc/sys/fs/file-max ; then
+ if test -r /proc/sys/fs/file-max; then
MAXFILES=$(( `cat /proc/sys/fs/file-max` / 2 ))
fi
fi
@@ -76,8 +77,8 @@
fi
- if test "x$SYSMAXFILES" != "x"; then
- if test "x$SYSCTL_MAXFILES" != "x"; then
+ if test -n "$SYSMAXFILES"; then
+ if test -n "$SYSCTL_MAXFILES"; then
sysctl -w $SYSCTL_MAXFILES=$SYSMAXFILES
fi
fi
@@ -85,14 +86,14 @@
# set the process's filemax to whatever set above
ulimit -n $MAXFILES
- if test ! -d ${ASTVARRUNDIR} ; then
- mkdir -p ${ASTVARRUNDIR}
- chmod 770 ${ASTVARRUNDIR}
+ if test ! -d "${ASTVARRUNDIR}"; then
+ mkdir -p "${ASTVARRUNDIR}"
+ chmod 770 "${ASTVARRUNDIR}"
fi
fi
-if test "x$UMASK" != "x"; then
+if test -n "$UMASK"; then
umask $UMASK
fi
@@ -105,21 +106,21 @@
# Don't fork when running "safely"
#
ASTARGS=""
-if test "x$TTY" != "x" ; then
- if test -c /dev/tty${TTY} ; then
+if test -n "$TTY" && test "$TTY" != "no"; then
+ if test -c /dev/tty${TTY}; then
TTY=tty${TTY}
- elif test -c /dev/vc/${TTY} ; then
+ elif test -c /dev/vc/${TTY}; then
TTY=vc/${TTY}
else
message "Cannot find specified TTY (${TTY})"
exit 1
fi
ASTARGS="${ASTARGS} -vvvg"
- if test "x$CONSOLE" != "xno" ; then
+ if test "$CONSOLE" != "no"; then
ASTARGS="${ASTARGS} -c"
fi
fi
-if test ! -w "${DUMPDROP}" ; then
+if test ! -w "${DUMPDROP}"; then
message "Cannot write to ${DUMPDROP}"
exit 1
fi
@@ -133,9 +134,9 @@
# Run scripts to set any environment variables or do any other system-specific setup needed
#
-if test -d /etc/asterisk/startup.d ; then
+if test -d /etc/asterisk/startup.d; then
for script in /etc/asterisk/startup.d/*.sh; do
- if test -r ${script} ; then
+ if test -r ${script}; then
. ${script}
fi
done
@@ -143,58 +144,60 @@
run_asterisk()
{
- while :; do
-
- if test "x$TTY" != "x" ; then
+ while :; do
+ if test -n "$TTY" && test "$TTY" != "no"; then
cd /tmp
- stty sane < /dev/${TTY}
- nice -n $PRIORITY ${ASTSBINDIR}/asterisk -f ${CLIARGS} ${ASTARGS} > /dev/${TTY} 2>&1 < /dev/${TTY}
+ stty sane </dev/${TTY}
+ nice -n $PRIORITY "${ASTSBINDIR}/asterisk" -f ${CLIARGS} ${ASTARGS} >/dev/${TTY} 2>&1 </dev/${TTY}
else
cd /tmp
- nice -n $PRIORITY ${ASTSBINDIR}/asterisk -f ${CLIARGS} ${ASTARGS}
+ nice -n $PRIORITY "${ASTSBINDIR}/asterisk" -f ${CLIARGS} ${ASTARGS} >/dev/null 2>&1 </dev/null
fi
EXITSTATUS=$?
message "Asterisk ended with exit status $EXITSTATUS"
- if test "x$EXITSTATUS" = "x0" ; then
+ if test $EXITSTATUS -eq 0; then
# Properly shutdown....
message "Asterisk shutdown normally."
exit 0
- elif test "0$EXITSTATUS" -gt "128" ; then
- EXITSIGNAL=$(($EXITSTATUS - 128))
- echo "Asterisk exited on signal $EXITSIGNAL."
- if test "x$NOTIFY" != "x" ; then
+ elif test $EXITSTATUS -gt 128; then
+ EXITSIGNAL=$((EXITSTATUS - 128))
+ message "Exited on signal $EXITSIGNAL"
+ if test -n "$NOTIFY"; then
echo "Asterisk on $MACHINE exited on signal $EXITSIGNAL. Might want to take a peek." | \
mail -s "Asterisk Died" $NOTIFY
- message "Exited on signal $EXITSIGNAL"
fi
- if test "x$EXEC" != "x" ; then
+ if test -n "$EXEC"; then
$EXEC
fi
PID=`cat ${ASTPIDFILE}`
DATE=`date "+%Y-%m-%dT%H:%M:%S%z"`
- if test -f /tmp/core.${PID} ; then
- mv /tmp/core.${PID} ${DUMPDROP}/core.`hostname`-$DATE &
- elif test -f /tmp/core ; then
- mv /tmp/core ${DUMPDROP}/core.`hostname`-$DATE &
+ if test -f /tmp/core.${PID}; then
+ mv /tmp/core.${PID} "${DUMPDROP}/core.`hostname`-$DATE" &
+ elif test -f /tmp/core; then
+ mv /tmp/core "${DUMPDROP}/core.`hostname`-$DATE" &
fi
else
message "Asterisk died with code $EXITSTATUS."
PID=`cat ${ASTPIDFILE}`
DATE=`date "+%Y-%m-%dT%H:%M:%S%z"`
- if test -f /tmp/core.${PID} ; then
- mv /tmp/core.${PID} ${DUMPDROP}/core.`hostname`-$DATE &
- elif test -f /tmp/core ; then
- mv /tmp/core ${DUMPDROP}/core.`hostname`-$DATE &
+ if test -f /tmp/core.${PID}; then
+ mv /tmp/core.${PID} "${DUMPDROP}/core.`hostname`-$DATE" &
+ elif test -f /tmp/core; then
+ mv /tmp/core "${DUMPDROP}/core.`hostname`-$DATE" &
fi
fi
message "Automatically restarting Asterisk."
sleep $SLEEPSECS
- if test "0$KILLALLMPG123" -gt "0" ; then
+ if test "0$KILLALLMPG123" -gt 0; then
pkill -9 mpg123
fi
done
}
-run_asterisk &
+if test -n "$ASTSAFE_FOREGROUND"; then
+ run_asterisk
+else
+ run_asterisk &
+fi
|
[-]
[+]
|
Changed |
asterisk-1.8.30.0.tar.xz/funcs/func_frame_trace.c
^
|
@@ -31,7 +31,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 411313 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 419684 $")
#include "asterisk/module.h"
#include "asterisk/channel.h"
@@ -185,6 +185,7 @@
id = datastore->data;
ast_framehook_detach(chan, *id);
ast_channel_datastore_remove(chan, datastore);
+ ast_datastore_free(datastore);
}
if (!(datastore = ast_datastore_alloc(&frame_trace_datastore, NULL))) {
|
[-]
[+]
|
Changed |
asterisk-1.8.30.0.tar.xz/funcs/func_odbc.c
^
|
@@ -34,7 +34,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 411313 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 414997 $")
#include "asterisk/module.h"
#include "asterisk/file.h"
@@ -93,7 +93,7 @@
<description>
<para>Used in SQL templates to escape data which may contain single ticks
<literal>'</literal> which are otherwise used to delimit data.</para>
- <para>Example: SELECT foo FROM bar WHERE baz='${SQL_ESC(${ARG1})}'</para>
+ <para>Example: SELECT foo FROM bar WHERE baz='${SQL_ESC(${ARG1})}'</para>
</description>
</function>
***/
@@ -109,9 +109,9 @@
AST_RWLIST_ENTRY(acf_odbc_query) list;
char readhandle[5][30];
char writehandle[5][30];
- char sql_read[2048];
- char sql_write[2048];
- char sql_insert[2048];
+ char *sql_read;
+ char *sql_write;
+ char *sql_insert;
unsigned int flags;
int rowlimit;
struct ast_custom_function *acf;
@@ -260,7 +260,10 @@
}
ast_str_make_space(&buf, strlen(query->sql_write) * 2 + 300);
- ast_str_make_space(&insertbuf, strlen(query->sql_insert) * 2 + 300);
+ /* We only get here if sql_write is set. sql_insert is optional however. */
+ if (query->sql_insert) {
+ ast_str_make_space(&insertbuf, strlen(query->sql_insert) * 2 + 300);
+ }
/* Parse our arguments */
t = value ? ast_strdupa(value) : "";
@@ -294,7 +297,9 @@
pbx_builtin_pushvar_helper(chan, "VALUE", value ? value : "");
ast_str_substitute_variables(&buf, 0, chan, query->sql_write);
- ast_str_substitute_variables(&insertbuf, 0, chan, query->sql_insert);
+ if (query->sql_insert) {
+ ast_str_substitute_variables(&insertbuf, 0, chan, query->sql_insert);
+ }
if (bogus_chan) {
chan = ast_channel_unref(chan);
@@ -345,44 +350,47 @@
if (stmt) {
SQLRowCount(stmt, &rows);
- }
-
- if (stmt && rows == 0 && ast_str_strlen(insertbuf) != 0) {
SQLCloseCursor(stmt);
SQLFreeHandle(SQL_HANDLE_STMT, stmt);
- if (obj && !transactional) {
- ast_odbc_release_obj(obj);
- obj = NULL;
- }
- for (transactional = 0, dsn = 0; dsn < 5; dsn++) {
- if (!ast_strlen_zero(query->writehandle[dsn])) {
- if (transactional) {
- /* This can only happen second time through or greater. */
- ast_log(LOG_WARNING, "Transactions do not work well with multiple DSNs for 'writehandle'\n");
- } else if (obj) {
- ast_odbc_release_obj(obj);
- obj = NULL;
- }
+ if (rows != 0) {
+ status = "SUCCESS";
- if ((obj = ast_odbc_retrieve_transaction_obj(chan, query->writehandle[dsn]))) {
- transactional = 1;
- } else {
- obj = ast_odbc_request_obj(query->writehandle[dsn], 0);
- transactional = 0;
+ } else if (query->sql_insert) {
+ if (obj && !transactional) {
+ ast_odbc_release_obj(obj);
+ obj = NULL;
+ }
+
+ for (transactional = 0, dsn = 0; dsn < 5; dsn++) {
+ if (!ast_strlen_zero(query->writehandle[dsn])) {
+ if (transactional) {
+ /* This can only happen second time through or greater. */
+ ast_log(LOG_WARNING, "Transactions do not work well with multiple DSNs for 'writehandle'\n");
+ } else if (obj) {
+ ast_odbc_release_obj(obj);
+ obj = NULL;
+ }
+
+ if ((obj = ast_odbc_retrieve_transaction_obj(chan, query->writehandle[dsn]))) {
+ transactional = 1;
+ } else {
+ obj = ast_odbc_request_obj(query->writehandle[dsn], 0);
+ transactional = 0;
+ }
+ if (obj) {
+ stmt = ast_odbc_direct_execute(obj, generic_execute, ast_str_buffer(insertbuf));
+ }
}
- if (obj) {
- stmt = ast_odbc_direct_execute(obj, generic_execute, ast_str_buffer(insertbuf));
+ if (stmt) {
+ status = "FAILOVER";
+ SQLRowCount(stmt, &rows);
+ SQLCloseCursor(stmt);
+ SQLFreeHandle(SQL_HANDLE_STMT, stmt);
+ break;
}
}
- if (stmt) {
- status = "FAILOVER";
- SQLRowCount(stmt, &rows);
- break;
- }
}
- } else if (stmt) {
- status = "SUCCESS";
}
AST_RWLIST_UNLOCK(&queries);
@@ -397,10 +405,6 @@
pbx_builtin_setvar_helper(chan, "ODBCSTATUS", status);
}
- if (stmt) {
- SQLCloseCursor(stmt);
- SQLFreeHandle(SQL_HANDLE_STMT, stmt);
- }
if (obj && !transactional) {
ast_odbc_release_obj(obj);
obj = NULL;
@@ -855,18 +859,36 @@
return 0;
}
+static int free_acf_query(struct acf_odbc_query *query)
+{
+ if (query) {
+ if (query->acf) {
+ if (query->acf->name)
+ ast_free((char *)query->acf->name);
+ ast_string_field_free_memory(query->acf);
+ ast_free(query->acf);
+ }
+ ast_free(query->sql_read);
+ ast_free(query->sql_write);
+ ast_free(query->sql_insert);
+ ast_free(query);
+ }
+ return 0;
+}
+
static int init_acf_query(struct ast_config *cfg, char *catg, struct acf_odbc_query **query)
{
const char *tmp;
+ const char *tmp2;
int i;
if (!cfg || !catg) {
return EINVAL;
}
- *query = ast_calloc(1, sizeof(struct acf_odbc_query));
- if (! (*query))
+ if (!(*query = ast_calloc(1, sizeof(**query)))) {
return ENOMEM;
+ }
if (((tmp = ast_variable_retrieve(cfg, catg, "writehandle"))) || ((tmp = ast_variable_retrieve(cfg, catg, "dsn")))) {
char *tmp2 = ast_strdupa(tmp);
@@ -896,38 +918,60 @@
if (!ast_strlen_zero((*query)->writehandle[i]))
ast_copy_string((*query)->readhandle[i], (*query)->writehandle[i], sizeof((*query)->readhandle[i]));
}
- }
+ }
- if ((tmp = ast_variable_retrieve(cfg, catg, "readsql")))
- ast_copy_string((*query)->sql_read, tmp, sizeof((*query)->sql_read));
- else if ((tmp = ast_variable_retrieve(cfg, catg, "read"))) {
- ast_log(LOG_WARNING, "Parameter 'read' is deprecated for category %s. Please use 'readsql' instead.\n", catg);
- ast_copy_string((*query)->sql_read, tmp, sizeof((*query)->sql_read));
+ if ((tmp = ast_variable_retrieve(cfg, catg, "readsql")) ||
+ (tmp2 = ast_variable_retrieve(cfg, catg, "read"))) {
+ if (!tmp) {
+ ast_log(LOG_WARNING, "Parameter 'read' is deprecated for category %s. Please use 'readsql' instead.\n", catg);
+ tmp = tmp2;
+ }
+ if (*tmp != '\0') { /* non-empty string */
+ if (!((*query)->sql_read = ast_strdup(tmp))) {
+ free_acf_query(*query);
+ *query = NULL;
+ return ENOMEM;
+ }
+ }
}
- if (!ast_strlen_zero((*query)->sql_read) && ast_strlen_zero((*query)->readhandle[0])) {
- ast_free(*query);
+ if ((*query)->sql_read && ast_strlen_zero((*query)->readhandle[0])) {
+ free_acf_query(*query);
*query = NULL;
ast_log(LOG_ERROR, "There is SQL, but no ODBC class to be used for reading: %s\n", catg);
return EINVAL;
}
- if ((tmp = ast_variable_retrieve(cfg, catg, "writesql")))
- ast_copy_string((*query)->sql_write, tmp, sizeof((*query)->sql_write));
- else if ((tmp = ast_variable_retrieve(cfg, catg, "write"))) {
- ast_log(LOG_WARNING, "Parameter 'write' is deprecated for category %s. Please use 'writesql' instead.\n", catg);
- ast_copy_string((*query)->sql_write, tmp, sizeof((*query)->sql_write));
+ if ((tmp = ast_variable_retrieve(cfg, catg, "writesql")) ||
+ (tmp2 = ast_variable_retrieve(cfg, catg, "write"))) {
+ if (!tmp) {
+ ast_log(LOG_WARNING, "Parameter 'write' is deprecated for category %s. Please use 'writesql' instead.\n", catg);
+ tmp = tmp2;
+ }
+ if (*tmp != '\0') { /* non-empty string */
+ if (!((*query)->sql_write = ast_strdup(tmp))) {
+ free_acf_query(*query);
+ *query = NULL;
+ return ENOMEM;
+ }
+ }
}
- if (!ast_strlen_zero((*query)->sql_write) && ast_strlen_zero((*query)->writehandle[0])) {
- ast_free(*query);
+ if ((*query)->sql_write && ast_strlen_zero((*query)->writehandle[0])) {
+ free_acf_query(*query);
*query = NULL;
ast_log(LOG_ERROR, "There is SQL, but no ODBC class to be used for writing: %s\n", catg);
return EINVAL;
}
if ((tmp = ast_variable_retrieve(cfg, catg, "insertsql"))) {
- ast_copy_string((*query)->sql_insert, tmp, sizeof((*query)->sql_insert));
+ if (*tmp != '\0') { /* non-empty string */
+ if (!((*query)->sql_insert = ast_strdup(tmp))) {
+ free_acf_query(*query);
+ *query = NULL;
+ return ENOMEM;
+ }
+ }
}
/* Allow escaping of embedded commas in fields to be turned off */
@@ -945,14 +989,13 @@
}
(*query)->acf = ast_calloc(1, sizeof(struct ast_custom_function));
- if (! (*query)->acf) {
- ast_free(*query);
+ if (!(*query)->acf) {
+ free_acf_query(*query);
*query = NULL;
return ENOMEM;
}
if (ast_string_field_init((*query)->acf, 128)) {
- ast_free((*query)->acf);
- ast_free(*query);
+ free_acf_query(*query);
*query = NULL;
return ENOMEM;
}
@@ -967,10 +1010,8 @@
}
}
- if (!((*query)->acf->name)) {
- ast_string_field_free_memory((*query)->acf);
- ast_free((*query)->acf);
- ast_free(*query);
+ if (!(*query)->acf->name) {
+ free_acf_query(*query);
*query = NULL;
return ENOMEM;
}
@@ -982,10 +1023,7 @@
}
if (ast_strlen_zero((*query)->acf->syntax)) {
- ast_free((char *)(*query)->acf->name);
- ast_string_field_free_memory((*query)->acf);
- ast_free((*query)->acf);
- ast_free(*query);
+ free_acf_query(*query);
*query = NULL;
return ENOMEM;
}
@@ -997,97 +1035,69 @@
}
if (ast_strlen_zero((*query)->acf->synopsis)) {
- ast_free((char *)(*query)->acf->name);
- ast_string_field_free_memory((*query)->acf);
- ast_free((*query)->acf);
- ast_free(*query);
+ free_acf_query(*query);
*query = NULL;
return ENOMEM;
}
- if (!ast_strlen_zero((*query)->sql_read) && !ast_strlen_zero((*query)->sql_write)) {
+ if ((*query)->sql_read && (*query)->sql_write) {
ast_string_field_build((*query)->acf, desc,
"Runs the following query, as defined in func_odbc.conf, performing\n"
- "substitution of the arguments into the query as specified by ${ARG1},\n"
+ "substitution of the arguments into the query as specified by ${ARG1},\n"
"${ARG2}, ... ${ARGn}. When setting the function, the values are provided\n"
"either in whole as ${VALUE} or parsed as ${VAL1}, ${VAL2}, ... ${VALn}.\n"
"%s"
- "\nRead:\n%s\n\nWrite:\n%s\n%s%s%s",
- ast_strlen_zero((*query)->sql_insert) ? "" :
+ "\nRead:\n%s\n\nWrite:\n%s%s%s",
+ (*query)->sql_insert ?
"If the write query affects no rows, the insert query will be\n"
- "performed.\n",
+ "performed.\n" : "",
(*query)->sql_read,
(*query)->sql_write,
- ast_strlen_zero((*query)->sql_insert) ? "" : "Insert:\n",
- ast_strlen_zero((*query)->sql_insert) ? "" : (*query)->sql_insert,
- ast_strlen_zero((*query)->sql_insert) ? "" : "\n");
- } else if (!ast_strlen_zero((*query)->sql_read)) {
+ (*query)->sql_insert ? "\n\nInsert:\n" : "",
+ (*query)->sql_insert ? (*query)->sql_insert : "");
+ } else if ((*query)->sql_read) {
+ ast_string_field_build((*query)->acf, desc,
+ "Runs the following query, as defined in func_odbc.conf, performing\n"
+ "substitution of the arguments into the query as specified by ${ARG1},\n"
+ "${ARG2}, ... ${ARGn}. This function may only be read, not set.\n\nSQL:\n%s",
+ (*query)->sql_read);
+ } else if ((*query)->sql_write) {
ast_string_field_build((*query)->acf, desc,
- "Runs the following query, as defined in func_odbc.conf, performing\n"
- "substitution of the arguments into the query as specified by ${ARG1},\n"
- "${ARG2}, ... ${ARGn}. This function may only be read, not set.\n\nSQL:\n%s\n",
- (*query)->sql_read);
- } else if (!ast_strlen_zero((*query)->sql_write)) {
- ast_string_field_build((*query)->acf, desc,
"Runs the following query, as defined in func_odbc.conf, performing\n"
- "substitution of the arguments into the query as specified by ${ARG1},\n"
+ "substitution of the arguments into the query as specified by ${ARG1},\n"
"${ARG2}, ... ${ARGn}. The values are provided either in whole as\n"
"${VALUE} or parsed as ${VAL1}, ${VAL2}, ... ${VALn}.\n"
- "This function may only be set.\n%sSQL:\n%s\n%s%s%s",
- ast_strlen_zero((*query)->sql_insert) ? "" :
+ "This function may only be set.\n%s\nSQL:\n%s%s%s",
+ (*query)->sql_insert ?
"If the write query affects no rows, the insert query will be\n"
- "performed.\n",
+ "performed.\n" : "",
(*query)->sql_write,
- ast_strlen_zero((*query)->sql_insert) ? "" : "Insert:\n",
- ast_strlen_zero((*query)->sql_insert) ? "" : (*query)->sql_insert,
- ast_strlen_zero((*query)->sql_insert) ? "" : "\n");
+ (*query)->sql_insert ? "\n\nInsert:\n" : "",
+ (*query)->sql_insert ? (*query)->sql_insert : "");
} else {
- ast_string_field_free_memory((*query)->acf);
- ast_free((char *)(*query)->acf->name);
- ast_free((*query)->acf);
- ast_free(*query);
+ free_acf_query(*query);
+ *query = NULL;
ast_log(LOG_WARNING, "Section '%s' was found, but there was no SQL to execute. Ignoring.\n", catg);
return EINVAL;
}
if (ast_strlen_zero((*query)->acf->desc)) {
- ast_string_field_free_memory((*query)->acf);
- ast_free((char *)(*query)->acf->name);
- ast_free((*query)->acf);
- ast_free(*query);
+ free_acf_query(*query);
*query = NULL;
return ENOMEM;
}
- if (ast_strlen_zero((*query)->sql_read)) {
- (*query)->acf->read = NULL;
- } else {
+ if ((*query)->sql_read) {
(*query)->acf->read = acf_odbc_read;
}
- if (ast_strlen_zero((*query)->sql_write)) {
- (*query)->acf->write = NULL;
- } else {
+ if ((*query)->sql_write) {
(*query)->acf->write = acf_odbc_write;
}
return 0;
}
-static int free_acf_query(struct acf_odbc_query *query)
-{
- if (query) {
- if (query->acf) {
- if (query->acf->name)
- ast_free((char *)query->acf->name);
- ast_string_field_free_memory(query->acf);
- ast_free(query->acf);
- }
- ast_free(query);
- }
- return 0;
-}
-
static char *cli_odbc_read(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
{
AST_DECLARE_APP_ARGS(args,
@@ -1153,7 +1163,7 @@
return CLI_SHOWUSAGE;
}
- if (ast_strlen_zero(query->sql_read)) {
+ if (!query->sql_read) {
ast_cli(a->fd, "The function %s has no readsql parameter.\n", a->argv[2]);
AST_RWLIST_UNLOCK(&queries);
return CLI_SUCCESS;
@@ -1366,12 +1376,15 @@
return CLI_SHOWUSAGE;
}
- if (ast_strlen_zero(query->sql_write)) {
+ if (!query->sql_write) {
ast_cli(a->fd, "The function %s has no writesql parameter.\n", a->argv[2]);
AST_RWLIST_UNLOCK(&queries);
return CLI_SUCCESS;
}
+ /* FIXME: The code below duplicates code found in acf_odbc_write but
+ * lacks the newer sql_insert additions. */
+
ast_str_make_space(&sql, strlen(query->sql_write) * 2 + 300);
/* Evaluate function */
|
[-]
[+]
|
Changed |
asterisk-1.8.30.0.tar.xz/funcs/func_strings.c
^
|
@@ -31,7 +31,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 414214 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 416500 $")
#include <regex.h>
#include <ctype.h>
@@ -1503,6 +1503,7 @@
AST_APP_ARG(var);
AST_APP_ARG(delimiter);
);
+ const char *stripped_var;
if (!(buf = ast_str_thread_get(&result_buf, 16)) ||
!(previous_value = ast_str_thread_get(&tmp_buf, 16))) {
@@ -1520,8 +1521,15 @@
ast_get_encoded_char(args.delimiter, delimiter, &unused);
}
- varsubst = ast_alloca(strlen(args.var) + 4);
- sprintf(varsubst, "${%s}", args.var);
+ /* UNSHIFT and PUSH act as ways of setting a variable, so we need to be
+ * sure to skip leading underscores if they appear. However, we only want
+ * to skip up to two since that is the maximum number that can be used to
+ * indicate variable inheritance. Any further underscores are part of the
+ * variable name.
+ */
+ stripped_var = args.var + MIN(strspn(args.var, "_"), 2);
+ varsubst = ast_alloca(strlen(stripped_var) + 4);
+ sprintf(varsubst, "${%s}", stripped_var);
ast_str_substitute_variables(&previous_value, 0, chan, varsubst);
if (!ast_str_strlen(previous_value)) {
|
[-]
[+]
|
Changed |
asterisk-1.8.30.0.tar.xz/funcs/func_uri.c
^
|
@@ -34,7 +34,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 328209 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 418641 $")
#include "asterisk/module.h"
#include "asterisk/channel.h"
@@ -76,8 +76,8 @@
char *buf, size_t len)
{
if (ast_strlen_zero(data)) {
- ast_log(LOG_WARNING, "Syntax: URIENCODE(<data>) - missing argument!\n");
- return -1;
+ buf[0] = '\0';
+ return 0;
}
ast_uri_encode(data, buf, len, 1);
@@ -90,8 +90,8 @@
char *buf, size_t len)
{
if (ast_strlen_zero(data)) {
- ast_log(LOG_WARNING, "Syntax: URIDECODE(<data>) - missing argument!\n");
- return -1;
+ buf[0] = '\0';
+ return 0;
}
ast_copy_string(buf, data, len);
|
[-]
[+]
|
Changed |
asterisk-1.8.30.0.tar.xz/include/asterisk.h
^
|
@@ -90,6 +90,22 @@
int ast_register_atexit(void (*func)(void));
/*!
+ * \since 1.8.29
+ * \brief Register a function to be executed before Asterisk gracefully exits.
+ *
+ * If Asterisk is immediately shutdown (core stop now, or sending the TERM
+ * signal), the callback is not run. When the callbacks are run, they are run in
+ * sequence with ast_register_atexit() callbacks, in the reverse order of
+ * registration.
+ *
+ * \param func The callback function to use.
+ *
+ * \retval 0 on success.
+ * \retval -1 on error.
+ */
+int ast_register_cleanup(void (*func)(void));
+
+/*!
* \brief Unregister a function registered with ast_register_atexit().
* \param func The callback function to unregister.
*/
|
[-]
[+]
|
Changed |
asterisk-1.8.30.0.tar.xz/include/asterisk/app.h
^
|
@@ -115,24 +115,161 @@
int ast_app_getdata_full(struct ast_channel *c, const char *prompt, char *s, int maxlen, int timeout, int audiofd, int ctrlfd);
/*!
+ * \brief Run a macro on a channel, placing an optional second channel into autoservice.
+ * \since 1.8.30.0
+ * \since 11.0
+ *
+ * \details
+ * This is a shorthand method that makes it very easy to run a
+ * macro on any given channel. It is perfectly reasonable to
+ * supply a NULL autoservice_chan here in case there is no
+ * channel to place into autoservice.
+ *
+ * \note Absolutely _NO_ channel locks should be held before calling this function.
+ *
+ * \param autoservice_chan A channel to place into autoservice while the macro is run
+ * \param macro_chan Channel to execute macro on.
+ * \param macro_args Macro application argument string.
+ *
+ * \retval 0 success
+ * \retval -1 on error
+ */
+int ast_app_exec_macro(struct ast_channel *autoservice_chan, struct ast_channel *macro_chan, const char *macro_args);
+
+/*!
* \since 1.8
- * \brief Run a macro on a channel, placing a second channel into autoservice.
+ * \brief Run a macro on a channel, placing an optional second channel into autoservice.
*
- * This is a shorthand method that makes it very easy to run a macro on any given
- * channel. It is perfectly reasonable to supply a NULL autoservice_chan here in case
- * there is no channel to place into autoservice. It is very important that the
- * autoservice_chan parameter is not locked prior to calling ast_app_run_macro. A
- * deadlock could result, otherwise.
+ * \details
+ * This is a shorthand method that makes it very easy to run a
+ * macro on any given channel. It is perfectly reasonable to
+ * supply a NULL autoservice_chan here in case there is no
+ * channel to place into autoservice.
+ *
+ * \note Absolutely _NO_ channel locks should be held before calling this function.
*
* \param autoservice_chan A channel to place into autoservice while the macro is run
- * \param macro_chan The channel to run the macro on
- * \param macro_name The name of the macro to run
- * \param macro_args The arguments to pass to the macro
+ * \param macro_chan Channel to execute macro on.
+ * \param macro_name The name of the macro to run.
+ * \param macro_args The arguments to pass to the macro.
+ *
+ * \retval 0 success
+ * \retval -1 on error
+ */
+int ast_app_run_macro(struct ast_channel *autoservice_chan,
+ struct ast_channel *macro_chan, const char *macro_name, const char *macro_args);
+
+/*!
+ * \brief Stack applications callback functions.
+ */
+struct ast_app_stack_funcs {
+ /*!
+ * Module reference pointer so the module will stick around
+ * while a callback is active.
+ */
+ void *module;
+
+ /*!
+ * \brief Callback for the routine to run a subroutine on a channel.
+ *
+ * \note Absolutely _NO_ channel locks should be held before calling this function.
+ *
+ * \param chan Channel to execute subroutine on.
+ * \param args Gosub application argument string.
+ * \param ignore_hangup TRUE if a hangup does not stop execution of the routine.
+ *
+ * \retval 0 success
+ * \retval -1 on error
+ */
+ int (*run_sub)(struct ast_channel *chan, const char *args, int ignore_hangup);
+
+ /*!
+ * \brief Add missing context/exten to Gosub application argument string.
+ *
+ * \param chan Channel to obtain context/exten.
+ * \param args Gosub application argument string.
+ *
+ * \details
+ * Fills in the optional context and exten from the given channel.
+ *
+ * \retval New-args Gosub argument string on success. Must be freed.
+ * \retval NULL on error.
+ */
+ const char *(*expand_sub_args)(struct ast_channel *chan, const char *args);
+
+ /* Add new API calls to the end here. */
+};
+
+/*!
+ * \since 1.8.30.0
+ * \since 11
+ * \brief Set stack application function callbacks
+ * \param funcs Stack applications callback functions.
+ */
+void ast_install_stack_functions(const struct ast_app_stack_funcs *funcs);
+
+/*!
+ * \brief Add missing context/exten to subroutine argument string.
+ * \since 1.8.30.0
+ *
+ * \param chan Channel to obtain context/exten.
+ * \param args Gosub application argument string.
+ *
+ * \details
+ * Fills in the optional context and exten from the given channel.
+ *
+ * \retval New-args Gosub argument string on success. Must be freed.
+ * \retval NULL on error.
+ */
+const char *ast_app_expand_sub_args(struct ast_channel *chan, const char *args);
+
+/*!
+ * \since 1.8.30.0
+ * \since 11
+ * \brief Run a subroutine on a channel, placing an optional second channel into autoservice.
+ *
+ * \details
+ * This is a shorthand method that makes it very easy to run a
+ * subroutine on any given channel. It is perfectly reasonable
+ * to supply a NULL autoservice_chan here in case there is no
+ * channel to place into autoservice.
+ *
+ * \note Absolutely _NO_ channel locks should be held before calling this function.
+ *
+ * \param autoservice_chan A channel to place into autoservice while the subroutine is run
+ * \param sub_chan Channel to execute subroutine on.
+ * \param sub_args Gosub application argument string.
+ * \param ignore_hangup TRUE if a hangup does not stop execution of the routine.
+ *
+ * \retval 0 success
+ * \retval -1 on error
+ */
+int ast_app_exec_sub(struct ast_channel *autoservice_chan, struct ast_channel *sub_chan, const char *sub_args, int ignore_hangup);
+
+/*!
+ * \since 1.8.30.0
+ * \since 11
+ * \brief Run a subroutine on a channel, placing an optional second channel into autoservice.
+ *
+ * \details
+ * This is a shorthand method that makes it very easy to run a
+ * subroutine on any given channel. It is perfectly reasonable
+ * to supply a NULL autoservice_chan here in case there is no
+ * channel to place into autoservice.
+ *
+ * \note Absolutely _NO_ channel locks should be held before calling this function.
+ *
+ * \param autoservice_chan A channel to place into autoservice while the subroutine is run
+ * \param sub_chan Channel to execute subroutine on.
+ * \param sub_location The location of the subroutine to run.
+ * \param sub_args The arguments to pass to the subroutine.
+ * \param ignore_hangup TRUE if a hangup does not stop execution of the routine.
+ *
* \retval 0 success
- * \retval -1 failure
+ * \retval -1 on error
*/
-int ast_app_run_macro(struct ast_channel *autoservice_chan, struct ast_channel
- *macro_chan, const char * const macro_name, const char * const macro_args);
+int ast_app_run_sub(struct ast_channel *autoservice_chan,
+ struct ast_channel *sub_chan, const char *sub_location, const char *sub_args, int ignore_hangup);
/*!
* \brief Set voicemail function callbacks
|
[-]
[+]
|
Changed |
asterisk-1.8.30.0.tar.xz/include/asterisk/autoconfig.h.in
^
|
@@ -1219,6 +1219,11 @@
/* Define to 1 if running on Darwin. */
#undef _DARWIN_UNLIMITED_SELECT
+/* Enable large inode numbers on Mac OS X 10.5. */
+#ifndef _DARWIN_USE_64_BIT_INODE
+# define _DARWIN_USE_64_BIT_INODE 1
+#endif
+
/* Number of bits in a file offset, on hosts where this is settable. */
#undef _FILE_OFFSET_BITS
|
[-]
[+]
|
Changed |
asterisk-1.8.30.0.tar.xz/include/asterisk/config.h
^
|
@@ -461,6 +461,16 @@
struct ast_variable *ast_variables_dup(struct ast_variable *var);
/*!
+ * \brief Reverse a variable list
+ * \param var the linked list of variables to reverse
+ * \return The head of the reversed variable list
+ *
+ * \note The variable list var is not preserved in this function and should
+ * not be used after reversing it.
+ */
+struct ast_variable *ast_variables_reverse(struct ast_variable *var);
+
+/*!
* \brief Free variable list
* \param var the linked list of variables to free
*
|
[-]
[+]
|
Changed |
asterisk-1.8.30.0.tar.xz/include/asterisk/manager.h
^
|
@@ -241,9 +241,21 @@
/*! \brief Get header from mananger transaction */
const char *astman_get_header(const struct message *m, char *var);
-/*! \brief Get a linked list of the Variable: headers */
+/*! \brief Get a linked list of the Variable: headers
+ *
+ * \note Order of variables is reversed from the order they are specified in
+ * the manager message
+ */
struct ast_variable *astman_get_variables(const struct message *m);
+enum variable_orders {
+ ORDER_NATURAL,
+ ORDER_REVERSE
+};
+
+/*! \brief Get a linked list of the Variable: headers with order specified */
+struct ast_variable *astman_get_variables_order(const struct message *m, enum variable_orders order);
+
/*! \brief Send error in manager transaction */
void astman_send_error(struct mansession *s, const struct message *m, char *error);
|
[-]
[+]
|
Changed |
asterisk-1.8.30.0.tar.xz/main/app.c
^
|
@@ -29,7 +29,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 413586 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 419630 $")
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
@@ -59,6 +59,7 @@
#include "asterisk/linkedlists.h"
#include "asterisk/threadstorage.h"
#include "asterisk/test.h"
+#include "asterisk/module.h"
AST_THREADSTORAGE_PUBLIC(ast_str_thread_global_buf);
@@ -250,28 +251,145 @@
return res;
}
-int ast_app_run_macro(struct ast_channel *autoservice_chan, struct ast_channel *macro_chan, const char * const macro_name, const char * const macro_args)
+int ast_app_exec_macro(struct ast_channel *autoservice_chan, struct ast_channel *macro_chan, const char *macro_args)
{
struct ast_app *macro_app;
int res;
- char buf[1024];
macro_app = pbx_findapp("Macro");
if (!macro_app) {
- ast_log(LOG_WARNING, "Cannot run macro '%s' because the 'Macro' application in not available\n", macro_name);
+ ast_log(LOG_WARNING,
+ "Cannot run 'Macro(%s)'. The application is not available.\n", macro_args);
return -1;
}
- snprintf(buf, sizeof(buf), "%s%s%s", macro_name, ast_strlen_zero(macro_args) ? "" : ",", S_OR(macro_args, ""));
if (autoservice_chan) {
ast_autoservice_start(autoservice_chan);
}
- res = pbx_exec(macro_chan, macro_app, buf);
+
+ ast_debug(4, "%s Original location: %s,%s,%d\n", macro_chan->name,
+ macro_chan->context, macro_chan->exten, macro_chan->priority);
+
+ res = pbx_exec(macro_chan, macro_app, macro_args);
+ ast_debug(4, "Macro exited with status %d\n", res);
+
+ /*
+ * Assume anything negative from Macro is an error.
+ * Anything else is success.
+ */
+ if (res < 0) {
+ res = -1;
+ } else {
+ res = 0;
+ }
+
+ ast_debug(4, "%s Ending location: %s,%s,%d\n", macro_chan->name,
+ macro_chan->context, macro_chan->exten, macro_chan->priority);
+
+ if (autoservice_chan) {
+ ast_autoservice_stop(autoservice_chan);
+ }
+ return res;
+}
+
+int ast_app_run_macro(struct ast_channel *autoservice_chan, struct ast_channel *macro_chan, const char *macro_name, const char *macro_args)
+{
+ int res;
+ char *args_str;
+ size_t args_len;
+
+ if (ast_strlen_zero(macro_args)) {
+ return ast_app_exec_macro(autoservice_chan, macro_chan, macro_name);
+ }
+
+ /* Create the Macro application argument string. */
+ args_len = strlen(macro_name) + strlen(macro_args) + 2;
+ args_str = ast_malloc(args_len);
+ if (!args_str) {
+ return -1;
+ }
+ snprintf(args_str, args_len, "%s,%s", macro_name, macro_args);
+
+ res = ast_app_exec_macro(autoservice_chan, macro_chan, args_str);
+ ast_free(args_str);
+ return res;
+}
+
+static const struct ast_app_stack_funcs *app_stack_callbacks;
+
+void ast_install_stack_functions(const struct ast_app_stack_funcs *funcs)
+{
+ app_stack_callbacks = funcs;
+}
+
+const char *ast_app_expand_sub_args(struct ast_channel *chan, const char *args)
+{
+ const struct ast_app_stack_funcs *funcs;
+ const char *new_args;
+
+ funcs = app_stack_callbacks;
+ if (!funcs || !funcs->expand_sub_args) {
+ ast_log(LOG_WARNING,
+ "Cannot expand 'Gosub(%s)' arguments. The app_stack module is not available.\n",
+ args);
+ return NULL;
+ }
+ ast_module_ref(funcs->module);
+
+ new_args = funcs->expand_sub_args(chan, args);
+ ast_module_unref(funcs->module);
+ return new_args;
+}
+
+int ast_app_exec_sub(struct ast_channel *autoservice_chan, struct ast_channel *sub_chan, const char *sub_args, int ignore_hangup)
+{
+ const struct ast_app_stack_funcs *funcs;
+ int res;
+
+ funcs = app_stack_callbacks;
+ if (!funcs || !funcs->run_sub) {
+ ast_log(LOG_WARNING,
+ "Cannot run 'Gosub(%s)'. The app_stack module is not available.\n",
+ sub_args);
+ return -1;
+ }
+ ast_module_ref(funcs->module);
+
+ if (autoservice_chan) {
+ ast_autoservice_start(autoservice_chan);
+ }
+
+ res = funcs->run_sub(sub_chan, sub_args, ignore_hangup);
+ ast_module_unref(funcs->module);
+
if (autoservice_chan) {
ast_autoservice_stop(autoservice_chan);
}
return res;
}
+int ast_app_run_sub(struct ast_channel *autoservice_chan, struct ast_channel *sub_chan, const char *sub_location, const char *sub_args, int ignore_hangup)
+{
+ int res;
+ char *args_str;
+ size_t args_len;
+
+ if (ast_strlen_zero(sub_args)) {
+ return ast_app_exec_sub(autoservice_chan, sub_chan, sub_location, ignore_hangup);
+ }
+
+ /* Create the Gosub application argument string. */
+ args_len = strlen(sub_location) + strlen(sub_args) + 3;
+ args_str = ast_malloc(args_len);
+ if (!args_str) {
+ return -1;
+ }
+ snprintf(args_str, args_len, "%s(%s)", sub_location, sub_args);
+
+ res = ast_app_exec_sub(autoservice_chan, sub_chan, args_str, ignore_hangup);
+ ast_free(args_str);
+ return res;
+}
+
static int (*ast_has_voicemail_func)(const char *mailbox, const char *folder) = NULL;
static int (*ast_inboxcount_func)(const char *mailbox, int *newmsgs, int *oldmsgs) = NULL;
static int (*ast_inboxcount2_func)(const char *mailbox, int *urgentmsgs, int *newmsgs, int *oldmsgs) = NULL;
|
[-]
[+]
|
Changed |
asterisk-1.8.30.0.tar.xz/main/asterisk.c
^
|
@@ -65,7 +65,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 413586 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 415463 $")
#include "asterisk/_private.h"
@@ -209,6 +209,7 @@
struct ast_atexit {
void (*func)(void);
+ int is_cleanup;
AST_LIST_ENTRY(ast_atexit) list;
};
@@ -944,13 +945,13 @@
#endif /* ! LOW_MEMORY */
-static void ast_run_atexits(void)
+static void ast_run_atexits(int run_cleanups)
{
struct ast_atexit *ae;
AST_LIST_LOCK(&atexits);
while ((ae = AST_LIST_REMOVE_HEAD(&atexits, list))) {
- if (ae->func) {
+ if (ae->func && (!ae->is_cleanup || run_cleanups)) {
ae->func();
}
ast_free(ae);
@@ -972,7 +973,7 @@
AST_LIST_TRAVERSE_SAFE_END;
}
-int ast_register_atexit(void (*func)(void))
+static int register_atexit(void (*func)(void), int is_cleanup)
{
struct ast_atexit *ae;
@@ -981,6 +982,7 @@
return -1;
}
ae->func = func;
+ ae->is_cleanup = is_cleanup;
AST_LIST_LOCK(&atexits);
__ast_unregister_atexit(func);
@@ -990,6 +992,16 @@
return 0;
}
+int ast_register_atexit(void (*func)(void))
+{
+ return register_atexit(func, 0);
+}
+
+int ast_register_cleanup(void (*func)(void))
+{
+ return register_atexit(func, 1);
+}
+
void ast_unregister_atexit(void (*func)(void))
{
AST_LIST_LOCK(&atexits);
@@ -1748,8 +1760,9 @@
static void really_quit(int num, shutdown_nice_t niceness, int restart)
{
int active_channels;
+ int run_cleanups = niceness >= SHUTDOWN_NICE;
- if (niceness >= SHUTDOWN_NICE) {
+ if (run_cleanups) {
ast_module_shutdown();
}
@@ -1791,7 +1804,7 @@
if (option_verbose)
ast_verbose("Executing last minute cleanups\n");
- ast_run_atexits();
+ ast_run_atexits(run_cleanups);
ast_debug(1, "Asterisk ending (%d).\n", num);
if (ast_socket > -1) {
|
[-]
[+]
|
Changed |
asterisk-1.8.30.0.tar.xz/main/astobj2.c
^
|
@@ -24,7 +24,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 412114 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 418504 $")
#include "asterisk/_private.h"
#include "asterisk/astobj2.h"
@@ -219,22 +219,24 @@
int __ao2_ref_debug(void *user_data, const int delta, const char *tag, const char *file, int line, const char *funcname)
{
struct astobj2 *obj = INTERNAL_OBJ(user_data);
+ int old_refcount = -1;
- if (obj == NULL) {
- return -1;
+ if (obj) {
+ old_refcount = internal_ao2_ref(user_data, delta);
}
- if (ref_log) {
- if (obj->priv_data.ref_counter + delta == 0) {
+ if (ref_log && user_data) {
+ if (obj && old_refcount + delta == 0) {
fprintf(ref_log, "%p,%d,%d,%s,%d,%s,**destructor**,%s\n", user_data, delta, ast_get_tid(), file, line, funcname, tag);
fflush(ref_log);
} else if (delta != 0) {
fprintf(ref_log, "%p,%s%d,%d,%s,%d,%s,%d,%s\n", user_data, (delta < 0 ? "" : "+"),
- delta, ast_get_tid(), file, line, funcname, obj ? obj->priv_data.ref_counter : -1, tag);
+ delta, ast_get_tid(), file, line, funcname, old_refcount, tag);
fflush(ref_log);
}
}
- return internal_ao2_ref(user_data, delta);
+
+ return old_refcount;
}
int __ao2_ref(void *user_data, const int delta)
|
[-]
[+]
|
Changed |
asterisk-1.8.30.0.tar.xz/main/autoservice.c
^
|
@@ -31,7 +31,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 369001 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 415463 $")
#include <sys/time.h>
#include <signal.h>
@@ -72,6 +72,7 @@
static ast_cond_t as_cond;
static pthread_t asthread = AST_PTHREADT_NULL;
+static volatile int asexit = 0;
static int as_chan_list_state;
@@ -82,7 +83,7 @@
.subclass.integer = AST_CONTROL_HANGUP,
};
- for (;;) {
+ while (!asexit) {
struct ast_channel *mons[MAX_AUTOMONS];
struct asent *ents[MAX_AUTOMONS];
struct ast_channel *chan;
@@ -320,7 +321,19 @@
return res;
}
+static void autoservice_shutdown(void)
+{
+ pthread_t th = asthread;
+ asexit = 1;
+ if (th != AST_PTHREADT_NULL) {
+ ast_cond_signal(&as_cond);
+ pthread_kill(th, SIGURG);
+ pthread_join(th, NULL);
+ }
+}
+
void ast_autoservice_init(void)
{
+ ast_register_cleanup(autoservice_shutdown);
ast_cond_init(&as_cond, NULL);
}
|
[-]
[+]
|
Changed |
asterisk-1.8.30.0.tar.xz/main/config.c
^
|
@@ -32,7 +32,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 413586 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 415359 $")
#include "asterisk/paths.h" /* use ast_config_AST_CONFIG_DIR */
#include "asterisk/network.h" /* we do some sockaddr manipulation here */
@@ -79,6 +79,7 @@
/*! \brief Hold the mtime for config files, so if we don't need to reread our config, don't. */
struct cache_file_include {
AST_LIST_ENTRY(cache_file_include) list;
+ /*! Filename or wildcard pattern as specified by the including file. */
char include[0];
};
@@ -558,6 +559,30 @@
return cloned;
}
+struct ast_variable *ast_variables_reverse(struct ast_variable *var)
+{
+ struct ast_variable *var1, *var2;
+
+ var1 = var;
+
+ if (!var1 || !var1->next) {
+ return var1;
+ }
+
+ var2 = var1->next;
+ var1->next = NULL;
+
+ while (var2) {
+ struct ast_variable *next = var2->next;
+
+ var2->next = var1;
+ var1 = var2;
+ var2 = next;
+ }
+
+ return var1;
+}
+
void ast_variables_destroy(struct ast_variable *v)
{
struct ast_variable *vn;
@@ -994,7 +1019,7 @@
struct ast_category *cat;
for (cat = cfg->root; cat; cat = cat->next) {
- if (!strcasecmp(cat->name, category))
+ if (strcasecmp(cat->name, category))
continue;
ast_variables_destroy(cat->root);
cat->root = NULL;
@@ -1055,9 +1080,9 @@
return NULL;
}
dst = cfmtime->filename; /* writable space starts here */
- strcpy(dst, filename);
+ strcpy(dst, filename); /* Safe */
dst += strlen(dst) + 1;
- cfmtime->who_asked = strcpy(dst, who_asked);
+ cfmtime->who_asked = strcpy(dst, who_asked); /* Safe */
return cfmtime;
}
@@ -1069,21 +1094,6 @@
/*!
* \internal
- * \brief Clear the stat() data in the cached file modtime struct.
- *
- * \param cfmtime Cached file modtime.
- *
- * \return Nothing
- */
-static void cfmstat_clear(struct cache_file_mtime *cfmtime)
-{
- cfmtime->stat_size = 0;
- cfmtime->stat_mtime_nsec = 0;
- cfmtime->stat_mtime = 0;
-}
-
-/*!
- * \internal
* \brief Save the stat() data to the cached file modtime struct.
*
* \param cfmtime Cached file modtime.
@@ -1126,11 +1136,71 @@
|| cfmtime->stat_mtime_nsec != cfm_buf.stat_mtime_nsec;
}
+/*!
+ * \internal
+ * \brief Clear the cached file modtime include list.
+ *
+ * \param cfmtime Cached file modtime.
+ *
+ * \note cfmtime_head is assumed already locked.
+ *
+ * \return Nothing
+ */
+static void config_cache_flush_includes(struct cache_file_mtime *cfmtime)
+{
+ struct cache_file_include *cfinclude;
+
+ while ((cfinclude = AST_LIST_REMOVE_HEAD(&cfmtime->includes, list))) {
+ ast_free(cfinclude);
+ }
+}
+
+/*!
+ * \internal
+ * \brief Destroy the given cached file modtime entry.
+ *
+ * \param cfmtime Cached file modtime.
+ *
+ * \note cfmtime_head is assumed already locked.
+ *
+ * \return Nothing
+ */
+static void config_cache_destroy_entry(struct cache_file_mtime *cfmtime)
+{
+ config_cache_flush_includes(cfmtime);
+ ast_free(cfmtime);
+}
+
+/*!
+ * \internal
+ * \brief Remove and destroy the config cache entry for the filename and who_asked.
+ *
+ * \param filename Config filename.
+ * \param who_asked Which module asked.
+ *
+ * \return Nothing
+ */
+static void config_cache_remove(const char *filename, const char *who_asked)
+{
+ struct cache_file_mtime *cfmtime;
+
+ AST_LIST_LOCK(&cfmtime_head);
+ AST_LIST_TRAVERSE_SAFE_BEGIN(&cfmtime_head, cfmtime, list) {
+ if (!strcmp(cfmtime->filename, filename)
+ && !strcmp(cfmtime->who_asked, who_asked)) {
+ AST_LIST_REMOVE_CURRENT(list);
+ config_cache_destroy_entry(cfmtime);
+ break;
+ }
+ }
+ AST_LIST_TRAVERSE_SAFE_END;
+ AST_LIST_UNLOCK(&cfmtime_head);
+}
+
static void config_cache_attribute(const char *configfile, enum config_cache_attribute_enum attrtype, const char *filename, const char *who_asked)
{
struct cache_file_mtime *cfmtime;
struct cache_file_include *cfinclude;
- struct stat statbuf = { 0, };
/* Find our cached entry for this configuration file */
AST_LIST_LOCK(&cfmtime_head);
@@ -1148,12 +1218,6 @@
AST_LIST_INSERT_SORTALPHA(&cfmtime_head, cfmtime, list, filename);
}
- if (stat(configfile, &statbuf)) {
- cfmstat_clear(cfmtime);
- } else {
- cfmstat_save(cfmtime, &statbuf);
- }
-
switch (attrtype) {
case ATTRIBUTE_INCLUDE:
AST_LIST_TRAVERSE(&cfmtime->includes, cfinclude, list) {
@@ -1167,7 +1231,7 @@
AST_LIST_UNLOCK(&cfmtime_head);
return;
}
- strcpy(cfinclude->include, filename);
+ strcpy(cfinclude->include, filename); /* Safe */
AST_LIST_INSERT_TAIL(&cfmtime->includes, cfinclude, list);
break;
case ATTRIBUTE_EXEC:
@@ -1478,17 +1542,32 @@
{
int glob_ret;
glob_t globbuf;
+
globbuf.gl_offs = 0; /* initialize it to silence gcc */
glob_ret = glob(fn, MY_GLOB_FLAGS, NULL, &globbuf);
- if (glob_ret == GLOB_NOSPACE)
+ if (glob_ret == GLOB_NOSPACE) {
ast_log(LOG_WARNING,
"Glob Expansion of pattern '%s' failed: Not enough memory\n", fn);
- else if (glob_ret == GLOB_ABORTED)
+ } else if (glob_ret == GLOB_ABORTED) {
ast_log(LOG_WARNING,
"Glob Expansion of pattern '%s' failed: Read error\n", fn);
- else {
+ } else {
/* loop over expanded files */
int i;
+
+ if (!cfg && (globbuf.gl_pathc != 1 || strcmp(fn, globbuf.gl_pathv[0]))) {
+ /*
+ * We just want a file changed answer and since we cannot
+ * tell if a file was deleted with wildcard matching we will
+ * assume that something has always changed. Also without
+ * a lot of refactoring we couldn't check more than one file
+ * for changes in the glob loop anyway.
+ */
+ globfree(&globbuf);
+ ast_free(comment_buffer);
+ ast_free(lline_buffer);
+ return NULL;
+ }
for (i=0; i<globbuf.gl_pathc; i++) {
ast_copy_string(fn, globbuf.gl_pathv[i], sizeof(fn));
#endif
@@ -1498,11 +1577,18 @@
* or 'break' in case of errors. Nice trick.
*/
do {
- if (stat(fn, &statbuf))
+ if (stat(fn, &statbuf)) {
+ if (!ast_test_flag(&flags, CONFIG_FLAG_NOCACHE)) {
+ config_cache_remove(fn, who_asked);
+ }
continue;
+ }
if (!S_ISREG(statbuf.st_mode)) {
ast_log(LOG_WARNING, "'%s' is not a regular file, ignoring\n", fn);
+ if (!ast_test_flag(&flags, CONFIG_FLAG_NOCACHE)) {
+ config_cache_remove(fn, who_asked);
+ }
continue;
}
@@ -1528,64 +1614,44 @@
&& !cfmtime->has_exec
&& !cfmstat_cmp(cfmtime, &statbuf)
&& ast_test_flag(&flags, CONFIG_FLAG_FILEUNCHANGED)) {
- /* File is unchanged, what about the (cached) includes (if any)? */
int unchanged = 1;
+
+ /* File is unchanged, what about the (cached) includes (if any)? */
AST_LIST_TRAVERSE(&cfmtime->includes, cfinclude, list) {
- /* We must glob here, because if we did not, then adding a file to globbed directory would
- * incorrectly cause no reload to be necessary. */
- char fn2[256];
-#ifdef AST_INCLUDE_GLOB
- int glob_return;
- glob_t glob_buf = { .gl_offs = 0 };
- glob_return = glob(cfinclude->include, MY_GLOB_FLAGS, NULL, &glob_buf);
- /* On error, we reparse */
- if (glob_return == GLOB_NOSPACE || glob_return == GLOB_ABORTED)
+ if (!config_text_file_load(NULL, NULL, cfinclude->include,
+ NULL, flags, "", who_asked)) {
+ /* One change is enough to short-circuit and reload the whole shebang */
unchanged = 0;
- else {
- /* loop over expanded files */
- int j;
- for (j = 0; j < glob_buf.gl_pathc; j++) {
- ast_copy_string(fn2, glob_buf.gl_pathv[j], sizeof(fn2));
-#else
- ast_copy_string(fn2, cfinclude->include);
-#endif
- if (config_text_file_load(NULL, NULL, fn2, NULL, flags, "", who_asked) == NULL) {
- /* that second-to-last field needs to be looked at in this case... TODO */
- unchanged = 0;
- /* One change is enough to short-circuit and reload the whole shebang */
- break;
- }
-#ifdef AST_INCLUDE_GLOB
- }
+ break;
}
-#endif
}
if (unchanged) {
AST_LIST_UNLOCK(&cfmtime_head);
- ast_free(comment_buffer);
- ast_free(lline_buffer);
#ifdef AST_INCLUDE_GLOB
globfree(&globbuf);
#endif
+ ast_free(comment_buffer);
+ ast_free(lline_buffer);
return CONFIG_STATUS_FILEUNCHANGED;
}
}
- if (!ast_test_flag(&flags, CONFIG_FLAG_NOCACHE))
- AST_LIST_UNLOCK(&cfmtime_head);
- /* If cfg is NULL, then we just want an answer */
+ /* If cfg is NULL, then we just want a file changed answer. */
if (cfg == NULL) {
- ast_free(comment_buffer);
- ast_free(lline_buffer);
-#ifdef AST_INCLUDE_GLOB
- globfree(&globbuf);
-#endif
- return NULL;
+ if (cfmtime) {
+ AST_LIST_UNLOCK(&cfmtime_head);
+ }
+ continue;
}
if (cfmtime) {
+ /* Forget about what we thought we knew about this file's includes. */
+ cfmtime->has_exec = 0;
+ config_cache_flush_includes(cfmtime);
+
cfmstat_save(cfmtime, &statbuf);
+ AST_LIST_UNLOCK(&cfmtime_head);
}
ast_verb(2, "Parsing '%s': ", fn);
@@ -1737,12 +1803,8 @@
}
#endif
- if (ast_test_flag(&flags, CONFIG_FLAG_WITHCOMMENTS)) {
- ast_free(comment_buffer);
- ast_free(lline_buffer);
- comment_buffer = NULL;
- lline_buffer = NULL;
- }
+ ast_free(comment_buffer);
+ ast_free(lline_buffer);
if (count == 0)
return NULL;
@@ -3047,11 +3109,7 @@
AST_LIST_LOCK(&cfmtime_head);
while ((cfmtime = AST_LIST_REMOVE_HEAD(&cfmtime_head, list))) {
- struct cache_file_include *cfinclude;
- while ((cfinclude = AST_LIST_REMOVE_HEAD(&cfmtime->includes, list))) {
- ast_free(cfinclude);
- }
- ast_free(cfmtime);
+ config_cache_destroy_entry(cfmtime);
}
AST_LIST_UNLOCK(&cfmtime_head);
|
[-]
[+]
|
Changed |
asterisk-1.8.30.0.tar.xz/main/features.c
^
|
@@ -29,7 +29,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 413586 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 419630 $")
#include "asterisk/_private.h"
@@ -3210,7 +3210,13 @@
if (!ast_strlen_zero(feature->moh_class))
ast_moh_start(idle, feature->moh_class, NULL);
- res = pbx_exec(work, app, feature->app_args);
+ if (!strcasecmp("Gosub", feature->app)) {
+ res = ast_app_exec_sub(NULL, work, feature->app_args, 0);
+ } else if (!strcasecmp("Macro", feature->app)) {
+ res = ast_app_exec_macro(NULL, work, feature->app_args);
+ } else {
+ res = pbx_exec(work, app, feature->app_args);
+ }
if (!ast_strlen_zero(feature->moh_class))
ast_moh_stop(idle);
|
[-]
[+]
|
Changed |
asterisk-1.8.30.0.tar.xz/main/http.c
^
|
@@ -36,7 +36,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 416068 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 416066 $")
#include <time.h>
#include <sys/time.h>
|
[-]
[+]
|
Changed |
asterisk-1.8.30.0.tar.xz/main/manager.c
^
|
@@ -47,7 +47,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 416068 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 419942 $")
#include "asterisk/_private.h"
#include "asterisk/paths.h" /* use various ast_config_AST_* */
@@ -204,7 +204,7 @@
</manager>
<manager name="Setvar" language="en_US">
<synopsis>
- Set a channel variable.
+ Sets a channel variable or function value.
</synopsis>
<syntax>
<xi:include xpointer="xpointer(/docs/manager[@name='Login']/syntax/parameter[@name='ActionID'])" />
@@ -212,22 +212,23 @@
<para>Channel to set variable for.</para>
</parameter>
<parameter name="Variable" required="true">
- <para>Variable name.</para>
+ <para>Variable name, function or expression.</para>
</parameter>
<parameter name="Value" required="true">
- <para>Variable value.</para>
+ <para>Variable or function value.</para>
</parameter>
</syntax>
<description>
- <para>Set a global or local channel variable.</para>
+ <para>This command can be used to set the value of channel variables or dialplan
+ functions.</para>
<note>
- <para>If a channel name is not provided then the variable is global.</para>
+ <para>If a channel name is not provided then the variable is considered global.</para>
</note>
</description>
</manager>
<manager name="Getvar" language="en_US">
<synopsis>
- Gets a channel variable.
+ Gets a channel variable or function value.
</synopsis>
<syntax>
<xi:include xpointer="xpointer(/docs/manager[@name='Login']/syntax/parameter[@name='ActionID'])" />
@@ -235,13 +236,13 @@
<para>Channel to read variable from.</para>
</parameter>
<parameter name="Variable" required="true">
- <para>Variable name.</para>
+ <para>Variable name, function or expression.</para>
</parameter>
</syntax>
<description>
- <para>Get the value of a global or local channel variable.</para>
+ <para>Get the value of a channel variable or function return.</para>
<note>
- <para>If a channel name is not provided then the variable is global.</para>
+ <para>If a channel name is not provided then the variable is considered global.</para>
</note>
</description>
</manager>
@@ -1914,6 +1915,12 @@
struct ast_variable *astman_get_variables(const struct message *m)
{
+ return astman_get_variables_order(m, ORDER_REVERSE);
+}
+
+struct ast_variable *astman_get_variables_order(const struct message *m,
+ enum variable_orders order)
+{
int varlen;
int x;
struct ast_variable *head = NULL;
@@ -1929,6 +1936,10 @@
head = man_do_variable_value(head, m->headers[x] + varlen);
}
+ if (order == ORDER_NATURAL) {
+ head = ast_variables_reverse(head);
+ }
+
return head;
}
|
[-]
[+]
|
Changed |
asterisk-1.8.30.0.tar.xz/main/pbx.c
^
|
@@ -29,7 +29,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 413586 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 420146 $")
#include "asterisk/_private.h"
#include "asterisk/paths.h" /* use ast_config_AST_SYSTEM_NAME */
@@ -5247,7 +5247,11 @@
return -1;
}
hint_new->exten = e;
- hint_new->laststate = ast_extension_state2(e);
+ if (strstr(e->app, "${") && e->exten[0] == '_') {
+ hint_new->laststate = AST_DEVICE_INVALID;
+ } else {
+ hint_new->laststate = ast_extension_state2(e);
+ }
/* Prevent multiple add hints from adding the same hint at the same time. */
ao2_lock(hints);
@@ -6553,7 +6557,12 @@
e->command = "core show hints";
e->usage =
"Usage: core show hints\n"
- " List registered hints\n";
+ " List registered hints.\n"
+ " Hint details are shown in four columns. In order from left to right, they are:\n"
+ " 1. Hint extension URI.\n"
+ " 2. Mapped device state identifiers.\n"
+ " 3. Current extension state. The aggregate of mapped device states.\n"
+ " 4. Watchers - number of subscriptions and other entities watching this hint.\n";
return NULL;
case CLI_GENERATE:
return NULL;
@@ -6639,7 +6648,13 @@
e->command = "core show hint";
e->usage =
"Usage: core show hint <exten>\n"
- " List registered hint\n";
+ " List registered hint.\n"
+ " Hint details are shown in four columns. In order from left to right, they are:\n"
+ " 1. Hint extension URI.\n"
+ " 2. Mapped device state identifiers.\n"
+ " 3. Current extension state. The aggregate of mapped device states.\n"
+ " 4. Watchers - number of subscriptions and other entities watching this hint.\n";
+
return NULL;
case CLI_GENERATE:
return complete_core_show_hint(a->line, a->word, a->pos, a->n);
@@ -6867,7 +6882,11 @@
struct ast_exten *e;
struct ast_include *i;
struct ast_ignorepat *ip;
+#ifndef LOW_MEMORY
+ char buf[1024], buf2[1024];
+#else
char buf[256], buf2[256];
+#endif
int context_info_printed = 0;
if (context && strcmp(ast_get_context_name(c), context))
@@ -7849,6 +7868,11 @@
ast_hashtab_end_traversal(prio_iter);
}
ast_hashtab_end_traversal(exten_iter);
+ } else if (new) {
+ /* If the context existed but had no extensions, we still want to merge
+ * the includes, switches and ignore patterns.
+ */
+ context_merge_incls_swits_igps_other_registrars(new, context, registrar);
}
if (!insert_count && !new && (strcmp(context->registrar, registrar) != 0 ||
|
[-]
[+]
|
Changed |
asterisk-1.8.30.0.tar.xz/main/tcptls.c
^
|
@@ -31,7 +31,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 416068 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 420654 $")
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
@@ -434,7 +434,12 @@
*/
static void tcptls_stream_dtor(void *cookie)
{
+#ifdef AST_DEVMODE
+ /* Since the ast_assert below is the only one using stream,
+ * and ast_assert is only available with AST_DEVMODE, we
+ * put this in a conditional to avoid compiler warnings. */
struct ast_tcptls_stream *stream = cookie;
+#endif
ast_assert(stream->fd == -1);
}
|
[-]
[+]
|
Changed |
asterisk-1.8.30.0.tar.xz/main/test.c
^
|
@@ -31,7 +31,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 401660 $");
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 416732 $");
#include "asterisk/_private.h"
@@ -185,7 +185,7 @@
return;
}
- fprintf(f, "\t<testcase time=\"%d.%d\" name=\"%s%s\"%s>\n",
+ fprintf(f, "\t<testcase time=\"%u.%u\" name=\"%s%s\"%s>\n",
test->time / 1000, test->time % 1000,
test->info.category, test->info.name,
test->state == AST_TEST_PASS ? "/" : "");
@@ -210,7 +210,7 @@
fprintf(f, "Description: %s\n", test->info.description);
fprintf(f, "Result: %s\n", test_result2str[test->state]);
if (test->state != AST_TEST_NOT_RUN) {
- fprintf(f, "Time: %d\n", test->time);
+ fprintf(f, "Time: %u\n", test->time);
}
if (test->state == AST_TEST_FAIL) {
fprintf(f, "Error Description: %s\n\n", S_OR(ast_str_buffer(test->status_str), "NA"));
@@ -296,7 +296,7 @@
(test->state == AST_TEST_FAIL) ? COLOR_RED : COLOR_GREEN,
0,
sizeof(result_buf));
- ast_cli(cli->fd, "END %s - %s Time: %s%dms Result: %s\n",
+ ast_cli(cli->fd, "END %s - %s Time: %s%ums Result: %s\n",
test->info.category,
test->info.name,
test->time ? "" : "<",
@@ -385,7 +385,7 @@
* http://confluence.atlassian.com/display/BAMBOO/JUnit+parsing+in+Bamboo
*/
fprintf(f_xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
- fprintf(f_xml, "<testsuite errors=\"0\" time=\"%d.%d\" tests=\"%d\" "
+ fprintf(f_xml, "<testsuite errors=\"0\" time=\"%u.%u\" tests=\"%u\" "
"name=\"AsteriskUnitTests\">\n",
last_results.total_time / 1000, last_results.total_time % 1000,
last_results.total_tests);
@@ -398,11 +398,11 @@
if (f_txt) {
fprintf(f_txt, "Asterisk Version: %s\n", ast_get_version());
fprintf(f_txt, "Asterisk Version Number: %s\n", ast_get_version_num());
- fprintf(f_txt, "Number of Tests: %d\n", last_results.total_tests);
- fprintf(f_txt, "Number of Tests Executed: %d\n", (last_results.total_passed + last_results.total_failed));
- fprintf(f_txt, "Passed Tests: %d\n", last_results.total_passed);
- fprintf(f_txt, "Failed Tests: %d\n", last_results.total_failed);
- fprintf(f_txt, "Total Execution Time: %d\n", last_results.total_time);
+ fprintf(f_txt, "Number of Tests: %u\n", last_results.total_tests);
+ fprintf(f_txt, "Number of Tests Executed: %u\n", (last_results.total_passed + last_results.total_failed));
+ fprintf(f_txt, "Passed Tests: %u\n", last_results.total_passed);
+ fprintf(f_txt, "Failed Tests: %u\n", last_results.total_failed);
+ fprintf(f_txt, "Total Execution Time: %u\n", last_results.total_time);
}
/* export each individual test */
@@ -728,7 +728,7 @@
if (!(last_results.last_passed + last_results.last_failed)) {
ast_cli(a->fd, "--- No Tests Found! ---\n");
}
- ast_cli(a->fd, "\n%d Test(s) Executed %d Passed %d Failed\n",
+ ast_cli(a->fd, "\n%u Test(s) Executed %u Passed %u Failed\n",
(last_results.last_passed + last_results.last_failed),
last_results.last_passed,
last_results.last_failed);
|
[-]
[+]
|
Changed |
asterisk-1.8.30.0.tar.xz/main/udptl.c
^
|
@@ -54,7 +54,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 413586 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 417318 $")
#include <sys/time.h>
#include <signal.h>
@@ -461,6 +461,12 @@
int k;
int which;
int limit = (l + m) & UDPTL_BUF_MASK;
+
+ /* only repair buffers that actually exist! */
+ if (seq_no <= (s->rx[l].fec_span * s->rx[l].fec_entries) - m) {
+ continue;
+ }
+
for (which = -1, k = (limit - s->rx[l].fec_span * s->rx[l].fec_entries) & UDPTL_BUF_MASK; k != limit; k = (k + s->rx[l].fec_entries) & UDPTL_BUF_MASK) {
if (s->rx[k].buf_len <= 0)
which = (which == -1) ? k : -2;
|
[-]
[+]
|
Changed |
asterisk-1.8.30.0.tar.xz/main/utils.c
^
|
@@ -29,7 +29,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 415904 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 420680 $")
#include <ctype.h>
#include <sys/stat.h>
@@ -1384,11 +1384,18 @@
}
}
+ errno = 0;
while (fflush(f)) {
if (errno == EAGAIN || errno == EINTR) {
+ /* fflush() does not appear to reset errno if it flushes
+ * and reaches EOF at the same time. It returns EOF with
+ * the last seen value of errno, causing a possible loop.
+ * Also usleep() to reduce CPU eating if it does loop */
+ errno = 0;
+ usleep(1);
continue;
}
- if (!feof(f)) {
+ if (errno && !feof(f)) {
/* Don't spam the logs if it was just that the connection is closed. */
ast_log(LOG_ERROR, "fflush() returned error: %s\n", strerror(errno));
}
@@ -1906,6 +1913,7 @@
size_t needed;
size_t available;
size_t space = (*pool_head)->size - (*pool_head)->used;
+ int res;
ssize_t grow;
char *target;
@@ -1924,10 +1932,19 @@
* so we don't need to re-align anything here.
*/
target = (*pool_head)->base + (*pool_head)->used + ast_alignof(ast_string_field_allocation);
- available = space - ast_alignof(ast_string_field_allocation);
+ if (space > ast_alignof(ast_string_field_allocation)) {
+ available = space - ast_alignof(ast_string_field_allocation);
+ } else {
+ available = 0;
+ }
}
- needed = vsnprintf(target, available, format, ap1) + 1;
+ res = vsnprintf(target, available, format, ap1);
+ if (res < 0) {
+ /* Are we out of memory? */
+ return;
+ }
+ needed = (size_t)res + 1; /* NUL byte */
if (needed > available) {
/* the allocation could not be satisfied using the field's current allocation
@@ -1946,7 +1963,8 @@
*/
__ast_string_field_release_active(*pool_head, *ptr);
mgr->last_alloc = *ptr = target;
- AST_STRING_FIELD_ALLOCATION(target) = needed;
+ ast_assert(needed < (ast_string_field_allocation)-1);
+ AST_STRING_FIELD_ALLOCATION(target) = (ast_string_field_allocation)needed;
(*pool_head)->used += ast_make_room_for(needed, ast_string_field_allocation);
(*pool_head)->active += needed;
} else if ((grow = (needed - AST_STRING_FIELD_ALLOCATION(*ptr))) > 0) {
|
[-]
[+]
|
Changed |
asterisk-1.8.30.0.tar.xz/pbx/pbx_lua.c
^
|
@@ -31,7 +31,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 405090 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 420146 $")
#include "asterisk/logger.h"
#include "asterisk/channel.h"
@@ -1526,6 +1526,9 @@
res = AST_MODULE_LOAD_DECLINE;
}
+ if (!res) {
+ ast_log(LOG_NOTICE, "Lua PBX Switch loaded.\n");
+ }
lua_close(L);
return res;
}
@@ -1535,6 +1538,7 @@
ast_context_destroy(NULL, registrar);
ast_unregister_switch(&lua_switch);
lua_free_extensions();
+ ast_log(LOG_NOTICE, "Lua PBX Switch unloaded.\n");
return 0;
}
|
[-]
[+]
|
Changed |
asterisk-1.8.30.0.tar.xz/res/res_config_odbc.c
^
|
@@ -35,7 +35,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 413586 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 414693 $")
#include "asterisk/file.h"
#include "asterisk/channel.h"
@@ -48,6 +48,7 @@
#include "asterisk/stringfields.h"
AST_THREADSTORAGE(sql_buf);
+AST_THREADSTORAGE(rowdata_buf);
struct custom_prepare_struct {
const char *sql;
@@ -168,7 +169,7 @@
SQLHSTMT stmt;
char sql[1024];
char coltitle[256];
- char rowdata[2048];
+ struct ast_str *rowdata = ast_str_thread_get(&rowdata_buf, 128);
char *op;
const char *newparam;
char *stringp;
@@ -187,12 +188,7 @@
struct custom_prepare_struct cps = { .sql = sql };
struct ast_flags connected_flag = { RES_ODBC_CONNECTED };
- if (ast_string_field_init(&cps, 256)) {
- return NULL;
- }
-
if (!table) {
- ast_string_field_free_memory(&cps);
return NULL;
}
@@ -200,7 +196,6 @@
if (!obj) {
ast_log(LOG_ERROR, "No database handle available with the name of '%s' (check res_odbc.conf)\n", database);
- ast_string_field_free_memory(&cps);
return NULL;
}
@@ -209,7 +204,6 @@
if (!newparam) {
va_end(aq);
ast_odbc_release_obj(obj);
- ast_string_field_free_memory(&cps);
return NULL;
}
va_arg(aq, const char *);
@@ -224,13 +218,17 @@
}
va_end(aq);
+ if (ast_string_field_init(&cps, 256)) {
+ ast_odbc_release_obj(obj);
+ return NULL;
+ }
va_copy(cps.ap, ap);
stmt = ast_odbc_prepare_and_execute(obj, custom_prepare, &cps);
va_end(cps.ap);
+ ast_string_field_free_memory(&cps);
if (!stmt) {
ast_odbc_release_obj(obj);
- ast_string_field_free_memory(&cps);
return NULL;
}
@@ -239,7 +237,6 @@
ast_log(LOG_WARNING, "SQL Column Count error!\n[%s]\n\n", sql);
SQLFreeHandle (SQL_HANDLE_STMT, stmt);
ast_odbc_release_obj(obj);
- ast_string_field_free_memory(&cps);
return NULL;
}
@@ -247,18 +244,15 @@
if (res == SQL_NO_DATA) {
SQLFreeHandle (SQL_HANDLE_STMT, stmt);
ast_odbc_release_obj(obj);
- ast_string_field_free_memory(&cps);
return NULL;
}
if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
ast_log(LOG_WARNING, "SQL Fetch error!\n[%s]\n\n", sql);
SQLFreeHandle (SQL_HANDLE_STMT, stmt);
ast_odbc_release_obj(obj);
- ast_string_field_free_memory(&cps);
return NULL;
}
for (x = 0; x < colcount; x++) {
- rowdata[0] = '\0';
colsize = 0;
collen = sizeof(coltitle);
res = SQLDescribeCol(stmt, x + 1, (unsigned char *)coltitle, sizeof(coltitle), &collen,
@@ -268,18 +262,28 @@
if (var)
ast_variables_destroy(var);
ast_odbc_release_obj(obj);
- ast_string_field_free_memory(&cps);
return NULL;
}
+ ast_str_reset(rowdata);
indicator = 0;
- res = SQLGetData(stmt, x + 1, SQL_CHAR, rowdata, sizeof(rowdata), &indicator);
- if (indicator == SQL_NULL_DATA)
- rowdata[0] = '\0';
- else if (ast_strlen_zero(rowdata)) {
+
+ res = SQLGetData(stmt, x + 1, SQL_CHAR, ast_str_buffer(rowdata), ast_str_size(rowdata), &indicator);
+ ast_str_update(rowdata);
+ if (indicator == SQL_NULL_DATA) {
+ ast_str_reset(rowdata);
+ } else if (!ast_str_strlen(rowdata)) {
/* Because we encode the empty string for a NULL, we will encode
* actual empty strings as a string containing a single whitespace. */
- ast_copy_string(rowdata, " ", sizeof(rowdata));
+ ast_str_set(&rowdata, -1, "%s", " ");
+ } else if ((res == SQL_SUCCESS) || (res == SQL_SUCCESS_WITH_INFO)) {
+ if (indicator != ast_str_strlen(rowdata)) {
+ /* If the available space was not enough to contain the row data enlarge and read in the rest */
+ ast_str_make_space(&rowdata, indicator + 1);
+ res = SQLGetData(stmt, x + 1, SQL_CHAR, ast_str_buffer(rowdata) + ast_str_strlen(rowdata),
+ ast_str_size(rowdata) - ast_str_strlen(rowdata), &indicator);
+ ast_str_update(rowdata);
+ }
}
if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
@@ -289,7 +293,8 @@
ast_odbc_release_obj(obj);
return NULL;
}
- stringp = rowdata;
+
+ stringp = ast_str_buffer(rowdata);
while (stringp) {
chunk = strsep(&stringp, ";");
if (!ast_strlen_zero(ast_strip(chunk))) {
@@ -308,10 +313,8 @@
}
}
-
SQLFreeHandle(SQL_HANDLE_STMT, stmt);
ast_odbc_release_obj(obj);
- ast_string_field_free_memory(&cps);
return var;
}
@@ -335,7 +338,7 @@
SQLHSTMT stmt;
char sql[1024];
char coltitle[256];
- char rowdata[2048];
+ struct ast_str *rowdata = ast_str_thread_get(&rowdata_buf, 128);
const char *initfield;
char *op;
const char *newparam;
@@ -357,14 +360,12 @@
struct custom_prepare_struct cps = { .sql = sql };
va_list aq;
- if (!table || ast_string_field_init(&cps, 256)) {
+ if (!table) {
return NULL;
}
-
obj = ast_odbc_request_obj2(database, connected_flag);
if (!obj) {
- ast_string_field_free_memory(&cps);
return NULL;
}
@@ -373,7 +374,6 @@
if (!newparam) {
va_end(aq);
ast_odbc_release_obj(obj);
- ast_string_field_free_memory(&cps);
return NULL;
}
@@ -396,13 +396,17 @@
snprintf(sql + strlen(sql), sizeof(sql) - strlen(sql), " ORDER BY %s", initfield);
+ if (ast_string_field_init(&cps, 256)) {
+ ast_odbc_release_obj(obj);
+ return NULL;
+ }
va_copy(cps.ap, ap);
stmt = ast_odbc_prepare_and_execute(obj, custom_prepare, &cps);
va_end(cps.ap);
+ ast_string_field_free_memory(&cps);
if (!stmt) {
ast_odbc_release_obj(obj);
- ast_string_field_free_memory(&cps);
return NULL;
}
@@ -411,7 +415,6 @@
ast_log(LOG_WARNING, "SQL Column Count error!\n[%s]\n\n", sql);
SQLFreeHandle(SQL_HANDLE_STMT, stmt);
ast_odbc_release_obj(obj);
- ast_string_field_free_memory(&cps);
return NULL;
}
@@ -420,7 +423,6 @@
ast_log(LOG_WARNING, "Out of memory!\n");
SQLFreeHandle(SQL_HANDLE_STMT, stmt);
ast_odbc_release_obj(obj);
- ast_string_field_free_memory(&cps);
return NULL;
}
@@ -436,7 +438,6 @@
continue;
}
for (x=0;x<colcount;x++) {
- rowdata[0] = '\0';
colsize = 0;
collen = sizeof(coltitle);
res = SQLDescribeCol(stmt, x + 1, (unsigned char *)coltitle, sizeof(coltitle), &collen,
@@ -447,17 +448,31 @@
goto next_sql_fetch;
}
+ ast_str_reset(rowdata);
indicator = 0;
- res = SQLGetData(stmt, x + 1, SQL_CHAR, rowdata, sizeof(rowdata), &indicator);
- if (indicator == SQL_NULL_DATA)
+
+ res = SQLGetData(stmt, x + 1, SQL_CHAR, ast_str_buffer(rowdata), ast_str_size(rowdata), &indicator);
+ ast_str_update(rowdata);
+ if (indicator == SQL_NULL_DATA) {
continue;
+ }
+
+ if ((res == SQL_SUCCESS) || (res == SQL_SUCCESS_WITH_INFO)) {
+ if (indicator != ast_str_strlen(rowdata)) {
+ /* If the available space was not enough to contain the row data enlarge and read in the rest */
+ ast_str_make_space(&rowdata, indicator + 1);
+ res = SQLGetData(stmt, x + 1, SQL_CHAR, ast_str_buffer(rowdata) + ast_str_strlen(rowdata),
+ ast_str_size(rowdata) - ast_str_strlen(rowdata), &indicator);
+ ast_str_update(rowdata);
+ }
+ }
if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
ast_log(LOG_WARNING, "SQL Get Data error!\n[%s]\n\n", sql);
ast_category_destroy(cat);
goto next_sql_fetch;
}
- stringp = rowdata;
+ stringp = ast_str_buffer(rowdata);
while (stringp) {
chunk = strsep(&stringp, ";");
if (!ast_strlen_zero(ast_strip(chunk))) {
@@ -478,7 +493,6 @@
SQLFreeHandle(SQL_HANDLE_STMT, stmt);
ast_odbc_release_obj(obj);
- ast_string_field_free_memory(&cps);
return cfg;
}
@@ -515,14 +529,9 @@
return -1;
}
- if (ast_string_field_init(&cps, 256)) {
- return -1;
- }
-
tableptr = ast_odbc_find_table(database, table);
if (!(obj = ast_odbc_request_obj2(database, connected_flag))) {
ast_odbc_release_table(tableptr);
- ast_string_field_free_memory(&cps);
return -1;
}
@@ -556,20 +565,23 @@
snprintf(sql + strlen(sql), sizeof(sql) - strlen(sql), " WHERE %s=?", keyfield);
ast_odbc_release_table(tableptr);
+ if (ast_string_field_init(&cps, 256)) {
+ ast_odbc_release_obj(obj);
+ return -1;
+ }
va_copy(cps.ap, ap);
stmt = ast_odbc_prepare_and_execute(obj, custom_prepare, &cps);
va_end(cps.ap);
+ ast_string_field_free_memory(&cps);
if (!stmt) {
ast_odbc_release_obj(obj);
- ast_string_field_free_memory(&cps);
return -1;
}
res = SQLRowCount(stmt, &rowcount);
SQLFreeHandle (SQL_HANDLE_STMT, stmt);
ast_odbc_release_obj(obj);
- ast_string_field_free_memory(&cps);
if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
ast_log(LOG_WARNING, "SQL Row Count error!\n[%s]\n\n", sql);
@@ -757,10 +769,6 @@
return -1;
}
- if (ast_string_field_init(&cps, 256)) {
- return -1;
- }
-
obj = ast_odbc_request_obj2(database, connected_flag);
if (!obj) {
return -1;
@@ -785,10 +793,14 @@
va_end(aq);
snprintf(sql, sizeof(sql), "INSERT INTO %s (%s) VALUES (%s)", table, keys, vals);
-
+ if (ast_string_field_init(&cps, 256)) {
+ ast_odbc_release_obj(obj);
+ return -1;
+ }
va_copy(cps.ap, ap);
stmt = ast_odbc_prepare_and_execute(obj, custom_prepare, &cps);
va_end(cps.ap);
+ ast_string_field_free_memory(&cps);
if (!stmt) {
ast_odbc_release_obj(obj);
@@ -841,10 +853,6 @@
return -1;
}
- if (ast_string_field_init(&cps, 256)) {
- return -1;
- }
-
obj = ast_odbc_request_obj2(database, connected_flag);
if (!obj) {
return -1;
@@ -860,9 +868,14 @@
va_end(aq);
snprintf(sql + strlen(sql), sizeof(sql) - strlen(sql), "%s=?", keyfield);
+ if (ast_string_field_init(&cps, 256)) {
+ ast_odbc_release_obj(obj);
+ return -1;
+ }
va_copy(cps.ap, ap);
stmt = ast_odbc_prepare_and_execute(obj, custom_prepare, &cps);
va_end(cps.ap);
+ ast_string_field_free_memory(&cps);
if (!stmt) {
ast_odbc_release_obj(obj);
@@ -884,16 +897,41 @@
return -1;
}
-
struct config_odbc_obj {
char *sql;
unsigned long cat_metric;
char category[128];
char var_name[128];
- char var_val[1024]; /* changed from 128 to 1024 via bug 8251 */
+ char *var_val;
+ unsigned long var_val_size;
SQLLEN err;
};
+
+static SQLHSTMT length_determination_odbc_prepare(struct odbc_obj *obj, void *data)
+{
+ struct config_odbc_obj *q = data;
+ SQLHSTMT sth;
+ int res;
+
+ res = SQLAllocHandle(SQL_HANDLE_STMT, obj->con, &sth);
+ if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
+ ast_verb(4, "Failure in AllocStatement %d\n", res);
+ return NULL;
+ }
+
+ res = SQLPrepare(sth, (unsigned char *)q->sql, SQL_NTS);
+ if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
+ ast_verb(4, "Error in PREPARE %d\n", res);
+ SQLFreeHandle(SQL_HANDLE_STMT, sth);
+ return NULL;
+ }
+
+ SQLBindCol(sth, 1, SQL_C_ULONG, &q->var_val_size, sizeof(q->var_val_size), &q->err);
+
+ return sth;
+}
+
static SQLHSTMT config_odbc_prepare(struct odbc_obj *obj, void *data)
{
struct config_odbc_obj *q = data;
@@ -916,7 +954,7 @@
SQLBindCol(sth, 1, SQL_C_ULONG, &q->cat_metric, sizeof(q->cat_metric), &q->err);
SQLBindCol(sth, 2, SQL_C_CHAR, q->category, sizeof(q->category), &q->err);
SQLBindCol(sth, 3, SQL_C_CHAR, q->var_name, sizeof(q->var_name), &q->err);
- SQLBindCol(sth, 4, SQL_C_CHAR, q->var_val, sizeof(q->var_val), &q->err);
+ SQLBindCol(sth, 4, SQL_C_CHAR, q->var_val, q->var_val_size, &q->err);
return sth;
}
@@ -947,16 +985,64 @@
if (!obj)
return NULL;
+ q.sql = sqlbuf;
+
+ ast_build_string(&sql, &sqlleft, "SELECT MAX(LENGTH(var_val)) FROM %s WHERE filename='%s'", table, file);
+
+ stmt = ast_odbc_prepare_and_execute(obj, length_determination_odbc_prepare, &q);
+
+ if (!stmt) {
+ ast_log(LOG_WARNING, "SQL select error!\n[%s]\n\n", sql);
+ ast_odbc_release_obj(obj);
+ return NULL;
+ }
+
+ res = SQLNumResultCols(stmt, &rowcount);
+
+ if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
+ ast_log(LOG_WARNING, "SQL NumResultCols error!\n[%s]\n\n", sql);
+ SQLFreeHandle(SQL_HANDLE_STMT, stmt);
+ ast_odbc_release_obj(obj);
+ return NULL;
+ }
+
+ if (!rowcount) {
+ ast_log(LOG_NOTICE, "found nothing\n");
+ ast_odbc_release_obj(obj);
+ return cfg;
+ }
+
+ /* There will be only one result for this, the maximum length of a variable value */
+ if (SQLFetch(stmt) == SQL_NO_DATA) {
+ ast_log(LOG_NOTICE, "Failed to determine maximum length of a configuration value\n");
+ SQLFreeHandle(SQL_HANDLE_STMT, stmt);
+ ast_odbc_release_obj(obj);
+ return NULL;
+ }
+
+ /* Reset stuff to a fresh state for the actual query which will retrieve all configuration */
+ SQLFreeHandle(SQL_HANDLE_STMT, stmt);
+ sql = sqlbuf;
+ sqlleft = sizeof(sqlbuf);
+
ast_build_string(&sql, &sqlleft, "SELECT cat_metric, category, var_name, var_val FROM %s ", table);
ast_build_string(&sql, &sqlleft, "WHERE filename='%s' AND commented=0 ", file);
ast_build_string(&sql, &sqlleft, "ORDER BY cat_metric DESC, var_metric ASC, category, var_name ");
- q.sql = sqlbuf;
+
+ q.var_val_size += 1;
+ q.var_val = ast_malloc(q.var_val_size);
+ if (!q.var_val) {
+ ast_log(LOG_WARNING, "Could not create buffer for reading in configuration values for '%s'\n", file);
+ ast_odbc_release_obj(obj);
+ return NULL;
+ }
stmt = ast_odbc_prepare_and_execute(obj, config_odbc_prepare, &q);
if (!stmt) {
ast_log(LOG_WARNING, "SQL select error!\n[%s]\n\n", sql);
ast_odbc_release_obj(obj);
+ ast_free(q.var_val);
return NULL;
}
@@ -966,12 +1052,14 @@
ast_log(LOG_WARNING, "SQL NumResultCols error!\n[%s]\n\n", sql);
SQLFreeHandle(SQL_HANDLE_STMT, stmt);
ast_odbc_release_obj(obj);
+ ast_free(q.var_val);
return NULL;
}
if (!rowcount) {
ast_log(LOG_NOTICE, "found nothing\n");
ast_odbc_release_obj(obj);
+ ast_free(q.var_val);
return cfg;
}
@@ -982,6 +1070,7 @@
if (!ast_config_internal_load(q.var_val, cfg, loader_flags, "", who_asked)) {
SQLFreeHandle(SQL_HANDLE_STMT, stmt);
ast_odbc_release_obj(obj);
+ ast_free(q.var_val);
return NULL;
}
continue;
@@ -1003,6 +1092,7 @@
SQLFreeHandle(SQL_HANDLE_STMT, stmt);
ast_odbc_release_obj(obj);
+ ast_free(q.var_val);
return cfg;
}
|
[-]
[+]
|
Changed |
asterisk-1.8.30.0.tar.xz/res/res_musiconhold.c
^
|
@@ -32,7 +32,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 413894 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 416439 $")
#include <ctype.h>
#include <signal.h>
@@ -1320,7 +1320,7 @@
struct mohclass *mohclass = NULL;
struct moh_files_state *state = chan->music_state;
struct ast_variable *var = NULL;
- int res;
+ int res = 0;
int realtime_possible = ast_check_realtime("musiconhold");
/* The following is the order of preference for which class to use:
@@ -1518,10 +1518,12 @@
ast_set_flag(chan, AST_FLAG_MOH);
- if (mohclass->total_files) {
- res = ast_activate_generator(chan, &moh_file_stream, mohclass);
- } else {
- res = ast_activate_generator(chan, &mohgen, mohclass);
+ if (!state || !state->class || strcmp(mohclass->name, state->class->name)) {
+ if (mohclass->total_files) {
+ res = ast_activate_generator(chan, &moh_file_stream, mohclass);
+ } else {
+ res = ast_activate_generator(chan, &mohgen, mohclass);
+ }
}
mohclass = mohclass_unref(mohclass, "unreffing local reference to mohclass in local_ast_moh_start");
|
[-]
[+]
|
Changed |
asterisk-1.8.30.0.tar.xz/tests/test_aoc.c
^
|
@@ -32,7 +32,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 332176 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 419129 $")
#include "asterisk/utils.h"
#include "asterisk/module.h"
@@ -411,7 +411,7 @@
if (!(unit = ast_aoc_get_unit_info(decoded, i)) ||
((unit->valid_amount) && (unit->amount != (i+1))) ||
((unit->valid_type) && (unit->type != (i+2)))) {
- ast_test_status_update(test, "TEST 2, invalid unit entry result, got %d,%d, expected %d,%d\n",
+ ast_test_status_update(test, "TEST 2, invalid unit entry result, got %u,%u, expected %d,%d\n",
unit->amount,
unit->type,
i+1,
|
[-]
[+]
|
Changed |
asterisk-1.8.30.0.tar.xz/tests/test_astobj2.c
^
|
@@ -30,7 +30,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 332176 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 419129 $")
#include "asterisk/utils.h"
#include "asterisk/module.h"
@@ -139,7 +139,7 @@
}
}
- ast_test_status_update(test, "Container created: random bucket size %d: number of items: %d\n", bucket_size, lim);
+ ast_test_status_update(test, "Container created: random bucket size %d: number of items: %u\n", bucket_size, lim);
/* Testing ao2_find with no flags */
num = 100;
|
[-]
[+]
|
Changed |
asterisk-1.8.30.0.tar.xz/tests/test_astobj2_thrash.c
^
|
@@ -35,7 +35,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 376306 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 419129 $")
#include <pthread.h>
#include "asterisk/astobj2.h"
#include "asterisk/hashtab.h"
@@ -82,7 +82,7 @@
if (keybuf == NULL) {
return NULL;
}
- needed = snprintf(keybuf, buflen, "key%08x", i);
+ needed = snprintf(keybuf, buflen, "key%08x", (unsigned)i);
ast_atomic_fetchadd_int(&alloc_count, 1);
ast_assert(needed + 1 <= buflen);
return keybuf;
|
[-]
[+]
|
Changed |
asterisk-1.8.30.0.tar.xz/tests/test_event.c
^
|
@@ -49,7 +49,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 357940 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 419129 $")
#include "asterisk/module.h"
#include "asterisk/utils.h"
@@ -66,7 +66,7 @@
/* Check #1: Ensure event type is set properly. */
type = ast_event_get_type(event);
if (ast_event_get_type(event) != type) {
- ast_test_status_update(test, "Expected event type: '%d', got '%d'\n",
+ ast_test_status_update(test, "Expected event type: '%u', got '%u'\n",
expected_type, type);
return -1;
}
@@ -349,7 +349,7 @@
sub_res = ast_event_check_subscriber(AST_EVENT_CUSTOM,
AST_EVENT_IE_END);
if (sub_res != AST_EVENT_SUB_NONE) {
- ast_test_status_update(test, "CUSTOM subscriptions should not exist! (%d)\n",
+ ast_test_status_update(test, "CUSTOM subscriptions should not exist! (%u)\n",
sub_res);
res = AST_TEST_FAIL;
}
@@ -382,7 +382,7 @@
sub_res = ast_event_check_subscriber(AST_EVENT_CUSTOM,
AST_EVENT_IE_END);
if (sub_res != AST_EVENT_SUB_EXISTS) {
- ast_test_status_update(test, "A CUSTOM subscription should exist! (%d)\n",
+ ast_test_status_update(test, "A CUSTOM subscription should exist! (%u)\n",
sub_res);
res = AST_TEST_FAIL;
}
@@ -629,7 +629,7 @@
AST_EVENT_IE_DEVICE, AST_EVENT_IE_PLTYPE_STR, "Money",
AST_EVENT_IE_END);
if (sub_res != AST_EVENT_SUB_NONE) {
- ast_test_status_update(test, "Str Money subscription should not exist! (%d)\n",
+ ast_test_status_update(test, "Str Money subscription should not exist! (%u)\n",
sub_res);
res = AST_TEST_FAIL;
}
@@ -647,7 +647,7 @@
AST_EVENT_IE_MAILBOX, AST_EVENT_IE_PLTYPE_RAW, "FOO/bar", sizeof("FOO/bar") - 1,
AST_EVENT_IE_END);
if (sub_res != AST_EVENT_SUB_NONE) {
- ast_test_status_update(test, "Raw FOO/bar-1 subscription should not exist! (%d)\n",
+ ast_test_status_update(test, "Raw FOO/bar-1 subscription should not exist! (%u)\n",
sub_res);
res = AST_TEST_FAIL;
}
@@ -656,7 +656,7 @@
AST_EVENT_IE_MAILBOX, AST_EVENT_IE_PLTYPE_RAW, "Monkeys", sizeof("Monkeys"),
AST_EVENT_IE_END);
if (sub_res != AST_EVENT_SUB_NONE) {
- ast_test_status_update(test, "Raw Monkeys subscription should not exist! (%d)\n",
+ ast_test_status_update(test, "Raw Monkeys subscription should not exist! (%u)\n",
sub_res);
res = AST_TEST_FAIL;
}
@@ -674,7 +674,7 @@
AST_EVENT_IE_NEWMSGS, AST_EVENT_IE_PLTYPE_UINT, 1,
AST_EVENT_IE_END);
if (sub_res != AST_EVENT_SUB_NONE) {
- ast_test_status_update(test, "UINT=1 subscription should not exist! (%d)\n",
+ ast_test_status_update(test, "UINT=1 subscription should not exist! (%u)\n",
sub_res);
res = AST_TEST_FAIL;
}
@@ -692,7 +692,7 @@
AST_EVENT_IE_NEWMSGS, AST_EVENT_IE_PLTYPE_BITFLAGS, 8,
AST_EVENT_IE_END);
if (sub_res != AST_EVENT_SUB_NONE) {
- ast_test_status_update(test, "BITFLAGS=8 subscription should not exist! (%d)\n",
+ ast_test_status_update(test, "BITFLAGS=8 subscription should not exist! (%u)\n",
sub_res);
res = AST_TEST_FAIL;
}
@@ -711,7 +711,7 @@
AST_EVENT_IE_NEWMSGS, AST_EVENT_IE_PLTYPE_UINT, 4,
AST_EVENT_IE_END);
if (sub_res != AST_EVENT_SUB_NONE) {
- ast_test_status_update(test, "EXISTS subscription should not exist! (%d)\n",
+ ast_test_status_update(test, "EXISTS subscription should not exist! (%u)\n",
sub_res);
res = AST_TEST_FAIL;
}
|
[-]
[+]
|
Changed |
asterisk-1.8.30.0.tar.xz/tests/test_hashtab_thrash.c
^
|
@@ -35,7 +35,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 396656 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 419129 $")
#include <pthread.h>
#include "asterisk/hashtab.h"
#include "asterisk/lock.h"
@@ -73,7 +73,7 @@
if (keybuf == NULL) {
return NULL;
}
- needed = snprintf(keybuf, buflen, "key%08x", i);
+ needed = snprintf(keybuf, buflen, "key%08x", (unsigned)i);
ast_assert(needed + 1 <= buflen);
return keybuf;
}
|
[-]
[+]
|
Changed |
asterisk-1.8.30.0.tar.xz/tests/test_logger.c
^
|
@@ -32,7 +32,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision: 338555 $")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision: 419129 $")
#include "asterisk/file.h"
#include "asterisk/channel.h"
@@ -55,12 +55,12 @@
unsigned int x;
for (x = 0; x < num_tests; x++) {
- ast_cli(fd, "Test %d: %s\n", x + 1, tests[x].name);
- ast_cli(fd, "\tExpected Successes: %d\n", tests[x].x_success);
- ast_cli(fd, "\tExpected Failures: %d\n", tests[x].x_failure);
- ast_cli(fd, "\tUnexpected Successes: %d\n", tests[x].u_success);
- ast_cli(fd, "\tUnexpected Failures: %d\n", tests[x].u_failure);
- ast_cli(fd, "Test %d Result: %s\n", x + 1, (tests[x].u_success + tests[x].u_failure) ? "FAIL" : "PASS");
+ ast_cli(fd, "Test %u: %s\n", x + 1, tests[x].name);
+ ast_cli(fd, "\tExpected Successes: %u\n", tests[x].x_success);
+ ast_cli(fd, "\tExpected Failures: %u\n", tests[x].x_failure);
+ ast_cli(fd, "\tUnexpected Successes: %u\n", tests[x].u_success);
+ ast_cli(fd, "\tUnexpected Failures: %u\n", tests[x].u_failure);
+ ast_cli(fd, "Test %u Result: %s\n", x + 1, (tests[x].u_success + tests[x].u_failure) ? "FAIL" : "PASS");
}
}
@@ -88,11 +88,11 @@
}
for (test = 0; test < ARRAY_LEN(tests); test++) {
- ast_cli(a->fd, "Test %d: %s.\n", test + 1, tests[test].name);
+ ast_cli(a->fd, "Test %u: %s.\n", test + 1, tests[test].name);
switch (test) {
case 0:
if ((level = ast_logger_register_level("test")) != -1) {
- ast_cli(a->fd, "Test: got level %d\n", level);
+ ast_cli(a->fd, "Test: got level %u\n", level);
ast_log_dynamic_level(level, "Logger Dynamic Test: Test 1\n");
ast_logger_unregister_level("test");
tests[test].x_success++;
@@ -106,7 +106,7 @@
char level_name[18][8];
for (x = 0; x < ARRAY_LEN(level_name); x++) {
- sprintf(level_name[x], "level%02d", x);
+ sprintf(level_name[x], "level%02u", x);
if ((level = ast_logger_register_level(level_name[x])) == -1) {
if (x < 16) {
tests[test].u_failure++;
@@ -115,7 +115,7 @@
}
level_name[x][0] = '\0';
} else {
- ast_cli(a->fd, "Test: registered '%s', got level %d\n", level_name[x], level);
+ ast_cli(a->fd, "Test: registered '%s', got level %u\n", level_name[x], level);
if (x < 16) {
tests[test].x_success++;
} else {
@@ -159,7 +159,7 @@
}
for (test = 0; test < ARRAY_LEN(tests); test++) {
- ast_cli(a->fd, "Test %d: %s.\n", test + 1, tests[test].name);
+ ast_cli(a->fd, "Test %u: %s.\n", test + 1, tests[test].name);
switch (test) {
case 0:
if ((level = ast_logger_register_level("perftest")) != -1) {
@@ -167,7 +167,7 @@
struct timeval start, end;
int elapsed;
- ast_cli(a->fd, "Test: got level %d\n", level);
+ ast_cli(a->fd, "Test: got level %u\n", level);
start = ast_tvnow();
for (x = 0; x < 10000; x++) {
ast_log_dynamic_level(level, "Performance test log message\n");
|