Commit Graph

305 Commits

Author SHA1 Message Date
Kevin P. Fleming 166b4e2b30 Multiple revisions 369001-369002
........
  r369001 | kpfleming | 2012-06-15 10:56:08 -0500 (Fri, 15 Jun 2012) | 11 lines
  
  Add support-level indications to many more source files.
  
  Since we now have tools that scan through the source tree looking for files
  with specific support levels, we need to ensure that every file that is
  a component of a 'core' or 'extended' module (or the main Asterisk binary)
  is explicitly marked with its support level. This patch adds support-level
  indications to many more source files in tree, but avoids adding them to
  third-party libraries that are included in the tree and to source files
  that don't end up involved in Asterisk itself.
........
  r369002 | kpfleming | 2012-06-15 10:57:14 -0500 (Fri, 15 Jun 2012) | 3 lines
  
  Add a script to enable finding source files without support-levels defined.
........

Merged revisions 369001-369002 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 369005 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369013 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-15 16:20:16 +00:00
Matthew Jordan f78290068a Fix a variety of potential buffer overflows
* chan_mobile: Fixed an overrun where the cind_state buffer (an integer array
  of size 16) would be overrun due to improper bounds checking. At worst, the
  buffer can be overrun by a total of 48 bytes (assuming 4-byte integers),
  which would still leave it within the allocated memory of struct hfp.  This
  would corrupt other elements in that struct but not necessarily cause any
  further issues.

* app_sms: The array imsg is of size 250, while the array (ud) that the data
  is copied into is of size 160.  If the size of the inbound message is 
  greater then 160, up to 90 bytes could be overrun in ud.  This would corrupt
  the user data header (array udh) adjacent to ud.

* chan_unistim: A number of invalid memmoves are corrected.  These would move
  data (which may or may not be valid) into the ends of these buffers.

* asterisk: ast_console_toggle_loglevel does not check that the console log
  level being set is less then or equal to the allowed log levels of 32.

* format_pref: In ast_codec_pref_prepend, if any occurrence of the specified
  codec is not found, the value used to index into the array pref->order
  would be one greater then the maximum size of the array.

* jitterbuf: If the element being placed into the jitter buffer lands in the
  last available slot in the jitter history buffer, the insertion sort attempts
  to move the last entry in the buffer into one slot past the maximum length
  of the buffer.  Note that this occurred for both the min and max jitter
  history buffers.

* tdd: If a read from fsk_serial returns a character that is greater then 32,
  an attempt to read past one of the statically defined arrays containing the
  values that character maps to would occur.

* localtime: struct ast_time and tm are not the same size - ast_time is larger,
  although it contains the elements of tm within it in the same layout.  Hence,
  when using memcpy to copy the contents of tm into ast_time, the size of tm
  should be used, as opposed to the size of ast_time.

* extconf: this treats ast_timing's minmask array as if it had a length of 48,
  when it has defined the size of the array as 24.  pbx.h defines minmask as
  having a size of 48.

(issue ASTERISK-19668)
Reported by: Matt Jordan
........

Merged revisions 362485 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 362496 from http://svn.asterisk.org/svn/asterisk/branches/10



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@362497 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-19 02:40:55 +00:00
Russell Bryant c1d9194482 Fix incorrect sizeof() in astman.
........

Merged revisions 359116 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 359117 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@359118 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-14 00:45:02 +00:00
Tilghman Lesher 9af5c769c3 Enable macros in 1.8 to find the next highest "h" extension in a context, like in 1.4.
This change restores functionality that was present in 1.4, when AEL macros
were implemented with the Macro dialplan application.  Macros are fraught with
functionality issues, because they consume a large portion of the underlying
application stack.  This limits the ability of AEL users to call many layers
of subroutines, an issue which Gosub does not have (originally tested to
100,000 levels deep).  Therefore, starting in 1.6.0, AEL macros were
implemented with Gosub.

However, there were some implicit behaviors of Macro, which were not replicated
at the same time as with the transition to Gosub, one of which is documented in
the related issue.  In particular, the "h" extension is designed to execute not
in the Macro context, but in the topmost calling context.  Due to legacy issues
with a misapplied bugfix many years ago, when a macro exited in 1.4, it looks
in all calling contexts, bubbling up from the deepest level until it finds an
"h" extension.

Since AEL hides the complexity of the underlying dialplan logic from the AEL
programmer, it's reasonable to assume that this behavior should not change in
the transition from Asterisk 1.4 LTS to Asterisk 1.8 LTS, lest we break
working AEL configurations in the transition to Asterisk 1.8 LTS.  This fix
is the result, which implements a search for the "h" extension in all calling
Gosub contexts.

Fixes ASTERISK-19336

Patch: 20120308__ael_bugfix_for_trunk__2.diff (License #5003) by Tilghman Lesher
	(with slight modifications for 1.8)

Tested by: Johan Wilfer

Review: https://reviewboard.asterisk.org/r/1776/
........

Merged revisions 358810 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 358811 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@358812 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-13 08:06:20 +00:00
Tilghman Lesher a78b0af5ea Re-commit the verbose branch.
This change permits each verbose destination (consoles, logger) to have its
own concept of what the verbosity level is.  The big feature here is that
the logger will now be able to capture a particular verbosity level without
condemning each console to need to suffer that level of verbosity.
Additionally, a stray 'core set verbose' will no longer change what will go
to the log.

Review:  https://reviewboard.asterisk.org/r/1599/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@355413 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-14 20:27:16 +00:00
Walter Doekes db24fc2523 Avoid cppcheck warnings; removing unused vars and a bit of cleanup.
Patch by: Clod Patry
Review: https://reviewboard.asterisk.org/r/1651


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@354429 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-08 20:49:48 +00:00
Walter Doekes b84c0aabd4 Fix -Werror=unused-but-set-variable compile error in utils/extconf.c.
Note that I'm not confirming legitimacy of having that file in tree at
all. Is anyone using aelparse/conf2ael?

(issue ASTERISK-15350)
........

Merged revisions 350885 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 350886 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350887 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-15 19:57:54 +00:00
Matthew Jordan 9057aa20b6 Backed out core changes from r346391
During testing, it was discovered that there were a number of side effects
introduced by r346391 and subsequent check-ins related to it (r346429,
r346617, and r346655).  This included the /main/stdtime/ test 'hanging',
as well as the remote console option failing to receive the appropriate output
after a period of time.

I only backed out the changes to main/ and utils/, as this was adequate
to reverse the behavior experienced.

(issue ASTERISK-18974)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@347997 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-12 19:35:08 +00:00
Tilghman Lesher b63c61953b Fix compilation of utilities (caught by Bamboo).
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@346429 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-29 20:32:53 +00:00
Jonathan Rose e77f1a6ae1 Some additional module documentation changes for 10 for the menuselect change.
(issue ASTERISK-18268)
........

Merged revisions 340931 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@340932 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-14 18:38:08 +00:00
Terry Wilson 6708ee76a0 Merged revisions 340219-340220 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

........
  r340219 | twilson | 2011-10-10 15:38:06 -0700 (Mon, 10 Oct 2011) | 8 lines
  
  Add astdb conversion utility for Berkeley to SQLite 3
  
  If someone wants to backtrack from Asterisk 1.8 to 10 they can use the
  astdb2bdb utility to convert the database back to the Berkeley format
  that Asterisk 1.8 uses.
  
  Review: https://reviewboard.asterisk.org/r/1502/
........
  r340220 | twilson | 2011-10-10 15:39:41 -0700 (Mon, 10 Oct 2011) | 2 lines
  
  Add a missing file for the astdb2bdb conversion utility
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@340221 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-10 22:54:03 +00:00
Jason Parker a6c29b931e Merged revisions 338228 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r338228 | qwell | 2011-09-28 15:54:35 -0500 (Wed, 28 Sep 2011) | 9 lines
  
  Merged revisions 338227 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r338227 | qwell | 2011-09-28 15:52:47 -0500 (Wed, 28 Sep 2011) | 1 line
    
    Add support levels to non-module sections of menuselect (cflags, utils, etc).
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@338229 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-28 20:55:42 +00:00
Tilghman Lesher 318f0f5514 Merged revisions 332369 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r332369 | tilghman | 2011-08-17 14:24:59 -0500 (Wed, 17 Aug 2011) | 17 lines
  
  Merged revisions 332355 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r332355 | tilghman | 2011-08-17 14:21:36 -0500 (Wed, 17 Aug 2011) | 10 lines
    
    Re-add support for spaces in pathnames, including now spaces in DESTDIR.
    
    This was initially added to 1.8 prior to release, primarily to support the
    standard paths on Mac OS X, but was partially reverted recently in Subversion,
    due to the lack of support for spaces in DESTDIR.  This commit restores support
    for the standard paths on Mac OS X, and also includes support for spaces in
    DESTDIR.

    (closes issue ASTERISK-18290)
    Reported by: pabelanger
    
    Review: https://reviewboard.asterisk.org/r/1326/
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@332388 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-17 19:30:50 +00:00
Leif Madsen a525edea59 Merged revisions 328247 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.10

................
  r328247 | lmadsen | 2011-07-14 16:25:31 -0400 (Thu, 14 Jul 2011) | 14 lines
  
  Merged revisions 328209 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r328209 | lmadsen | 2011-07-14 16:13:06 -0400 (Thu, 14 Jul 2011) | 6 lines
    
    Introduce <support_level> tags in MODULEINFO.
    This change introduces MODULEINFO into many modules in Asterisk in order to show
    the community support level for those modules. This is used by changes committed
    to menuselect by Russell Bryant recently (r917 in menuselect). More information about
    the support level types and what they mean is available on the wiki at
    https://wiki.asterisk.org/wiki/display/AST/Asterisk+Module+Support+States
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@328259 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-14 20:28:54 +00:00
Terry Wilson f0c8b18c18 Use older functions out of deference to older distros
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@326750 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-07 16:50:54 +00:00
Terry Wilson efd040cd11 Replace Berkeley DB with SQLite 3
There were some bugs in the very ancient version of Berkeley DB that Asterisk
used. Instead of spending the time tracking down the bugs in the Berkeley code
we move to the much better documented SQLite 3.

Conversion of the old astdb happens at runtime by running the included
astdb2sqlite3 utility. The ast_db API with SQLite 3 backend should behave
identically to the old Berkeley backend, but in the future we could offer a
much more robust interface.

We do not include the SQLite 3 library in the source tree, but instead rely
upon the distribution-provided libraries. SQLite is so ubiquitous that this
should not place undue burden on administrators.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@326589 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-06 20:58:12 +00:00
Paul Belanger ed3a4856aa Revert changes to extconf.c
It seems extconf.c already defines some local ast_debug() functions.  Theses
should be removed and replaced with logger.h.  A patch will be added to
reviewboard shortly.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@306292 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-04 18:16:16 +00:00
Paul Belanger 3556e4c2d4 Replace ast_log(LOG_DEBUG, ...) with ast_debug()
(closes issue #18556)
Reported by: kkm

Review: https://reviewboard.asterisk.org/r/1071/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@306258 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-04 16:55:39 +00:00
Tilghman Lesher b98e47d119 Merged revisions 298960 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r298960 | tilghman | 2010-12-17 17:52:04 -0600 (Fri, 17 Dec 2010) | 20 lines
  
  Merged revisions 298957 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r298957 | tilghman | 2010-12-17 17:30:55 -0600 (Fri, 17 Dec 2010) | 13 lines
    
    Merged revisions 298905 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r298905 | tilghman | 2010-12-17 15:40:56 -0600 (Fri, 17 Dec 2010) | 6 lines
      
      Let Asterisk find better backtrace information with libbfd.
      
      The menuselect option BETTER_BACKTRACES, if enabled, will use libbfd to search
      for better symbol information within both the Asterisk binary, as well as
      loaded modules, to assist when using inline backtraces to track down problems.

      Review: https://reviewboard.asterisk.org/r/1055/
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@298961 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-18 00:08:13 +00:00
Tilghman Lesher 5656e5020f Merged revisions 297821 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r297821 | tilghman | 2010-12-07 16:51:05 -0600 (Tue, 07 Dec 2010) | 18 lines
  
  Merged revisions 297819 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r297819 | tilghman | 2010-12-07 16:40:45 -0600 (Tue, 07 Dec 2010) | 11 lines
    
    Merged revisions 297818 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r297818 | tilghman | 2010-12-07 16:35:50 -0600 (Tue, 07 Dec 2010) | 4 lines
      
      Use non-deprecated APIs for CoreAudio
      
      Review: https://reviewboard.asterisk.org/r/1040/
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@297822 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-07 22:54:00 +00:00
Tzafrir Cohen 4a8fdd6aa1 Support for GNU/kFreeBSD
kFreeBSD is GNU (with glibc) on to of a FreeBSD kernel. See
http://glibc-bsd.alioth.debian.org/porting/PORTING

This patch gets Asterisk close to building on Debian kFreeBSD i386,
mainly by adding an extra test for __GLIBC__ in one or two (or more)
places.

OSARCH is set to 'kfreebsd-gnu'

DAHDI support (and support for chan_vpb) was not tested.

Review: https://reviewboard.asterisk.org/r/858/



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@282397 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-08-15 13:08:45 +00:00
Tilghman Lesher 5d313f51b9 Merged revisions 269635 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r269635 | tilghman | 2010-06-10 02:52:34 -0500 (Thu, 10 Jun 2010) | 9 lines
  
  Ensure restartable system calls can restart (BSD signal semantics).
  
  This eliminates the annoying <beep> on the console.
  
  (closes issue #17477)
   Reported by: jvandal
   Patches: 
         20100610__issue17477.diff.txt uploaded by tilghman (license 14)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@269636 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-10 08:15:45 +00:00
Tilghman Lesher 8872926df7 Fix trunk build on Mac OS X.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@268896 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-08 06:16:43 +00:00
Russell Bryant 84e150f1bb Fix a build error on mac.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@267305 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-02 21:44:06 +00:00
Tilghman Lesher fb80119b87 Merged revisions 266142 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r266142 | tilghman | 2010-05-26 16:11:44 -0500 (Wed, 26 May 2010) | 14 lines
  
  Use sigaction for signals which should persist past the initial trigger, not signal.
  
  If you call signal() in a Solaris signal handler, instead of just resetting
  the signal handler, it causes the signal to refire, because the signal is not
  marked as handled prior to the signal handler being called.  This effectively
  causes Solaris to immediately exceed the threadstack in recursive signal
  handlers and crash.
  
  (closes issue #17000)
   Reported by: rmcgilvr
   Patches: 
         20100526__issue17000.diff.txt uploaded by tilghman (license 14)
   Tested by: rmcgilvr
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@266146 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-26 21:17:46 +00:00
Jason Parker b65e2b6f98 Add another random function that does nothing to make the utils/ dir happy.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@258685 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-04-22 22:19:34 +00:00
Jason Parker 81ec31afbb Make utils/ stuff *actually* compile this time.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@258674 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-04-22 22:10:17 +00:00
Jason Parker 6915f50dd3 Let utils/ dir compile when DEBUG_THREADS is not enabled.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@258673 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-04-22 22:02:22 +00:00
Jason Parker 6c693bc2b1 Merged revisions 254800 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r254800 | qwell | 2010-03-25 15:41:15 -0500 (Thu, 25 Mar 2010) | 1 line
  
  Don't remove local copies of utils in uninstall.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@254802 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-25 20:41:49 +00:00
Russell Bryant 4acc1689c1 Merged revisions 252766 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r252766 | russell | 2010-03-16 14:00:43 -0500 (Tue, 16 Mar 2010) | 6 lines
  
  Don't treat warnings as errors for muted.
  
  muted supports OS X, but uses functions marked as deprecated in 10.6.  However,
  the functions are still supported, so just ignore the warnings for now and
  allow the build to proceed.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@252767 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-16 19:01:04 +00:00
Tilghman Lesher 94fd355eff Instead of just automatically filtering out in the Makefile, give an indication of dependencies in menuselect.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246667 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-15 21:37:58 +00:00
Tilghman Lesher 304750c212 Oops, missed an include
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@240500 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-15 21:42:36 +00:00
Tilghman Lesher 8037982fa6 The previous attempt at using a pipe to guarantee astcanary shutdown did not work.
We're revisiting the previous patch, albeit with a method that overcomes the
prior criticism that it was not POSIX-compliant.
(closes issue #16602)
 Reported by: frawd
 Patches: 
       20100114__issue16602.diff.txt uploaded by tilghman (license 14)
 Tested by: frawd


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@240499 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-15 21:40:14 +00:00
Jeff Peeler 7283d2b59b One more LOW_MEMORY compile fix.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@236902 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-12-30 21:09:28 +00:00
Sean Bright 117d3fd910 Add the programs in utils/ to menuselect.
Nothing in utils/ is now built by default except for astcanary.

Review: https://reviewboard.asterisk.org/r/353/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@225440 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-22 19:33:32 +00:00
Tilghman Lesher 642bec4d6f AST-2009-005
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@211539 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-10 19:20:57 +00:00
Kevin P. Fleming ed2a3cedd1 Merged revisions 209759 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r209759 | kpfleming | 2009-07-31 19:52:00 -0500 (Fri, 31 Jul 2009) | 7 lines
  
  Minor changes inspired by testing with latest GCC.
  
  The latest GCC (what will become 4.5.x) has a few new warnings, that in these
  cases found some either downright buggy code, or at least seriously poorly
  designed code that could be improved.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@209760 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-01 01:03:07 +00:00
Kevin P. Fleming 96e4e31eeb Merged revisions 207647 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r207647 | kpfleming | 2009-07-21 08:04:44 -0500 (Tue, 21 Jul 2009) | 12 lines
  
  Ensure that user-provided CFLAGS and LDFLAGS are honored.
  
  This commit changes the build system so that user-provided flags (in ASTCFLAGS
  and ASTLDFLAGS) are supplied to the compiler/linker *after* all flags provided
  by the build system itself, so that the user can effectively override the
  build system's flags if desired. In addition, ASTCFLAGS and ASTLDFLAGS can now
  be provided *either* in the environment before running 'make', or as variable
  assignments on the 'make' command line. As a result, the use of COPTS and LDOPTS
  is no longer necessary, so they are no longer documented, but are still supported
  so as not to break existing build systems that supply them when building Asterisk.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@207680 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-21 13:28:04 +00:00
Sean Bright e75ae63ac2 Fix a few compilation problems found when building Asterisk against uClibc.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@205214 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-08 16:43:12 +00:00
David Vossel dcfe69ec64 fixes some memory leaks and redundant conditions
(closes issue #15269)
Reported by: contactmayankjain
Patches:
      patch.txt uploaded by contactmayankjain (license 740)
      memory_leak_stuff.trunk.diff uploaded by dvossel (license 671)
Tested by: contactmayankjain, dvossel




git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@201678 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-18 16:37:42 +00:00
Kevin P. Fleming e6b2e9a750 Const-ify the world (or at least a good part of it)
This patch adds 'const' tags to a number of Asterisk APIs where they are appropriate (where the API already demanded that the function argument not be modified, but the compiler was not informed of that fact). The list includes:

- CLI command handlers
- CLI command handler arguments
- AGI command handlers
- AGI command handler arguments
- Dialplan application handler arguments
- Speech engine API function arguments

In addition, various file-scope and function-scope constant arrays got 'const' and/or 'static' qualifiers where they were missing.

Review: https://reviewboard.asterisk.org/r/251/



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196072 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-21 21:13:09 +00:00
Doug Bailey cf95f3a118 Merged revisions 189664 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r189664 | dbailey | 2009-04-21 10:52:13 -0500 (Tue, 21 Apr 2009) | 2 lines
  
  Remove daemon call on systems that do not support forking.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@189665 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-21 15:54:16 +00:00
Tilghman Lesher c5719a495c Application delimiter is ',', not '|'.
(closes issue #14881)
 Reported by: stegro
 Patches: 
       smsq.patch uploaded by stegro (license 752)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@188206 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-14 05:27:53 +00:00
Tilghman Lesher 8f28bfc63e Merged revisions 187300-187301 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r187300 | tilghman | 2009-04-08 23:31:38 -0500 (Wed, 08 Apr 2009) | 3 lines
  
  Add debugging mode for diagnosing file descriptor leaks.
  (Related to issue #14625)
........
  r187301 | tilghman | 2009-04-08 23:32:40 -0500 (Wed, 08 Apr 2009) | 2 lines
  
  Oops, missed this file in the last commit.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@187302 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-09 04:59:05 +00:00
Russell Bryant 08f561f196 Fix build issues on Mac OSX.
(closes issue #14714)
Reported by: ygor


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@184147 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-25 01:42:10 +00:00
Jeff Peeler 58cf8b69da Fix malloc debug macros to work properly with h323.
The main problem here was that cstdlib was undefining free thereby causing the
proper debug macros to not be used. ast_h323.cxx has been changed to call
ast_free instead to avoid the issue. 

A few other issues were addressed:
- There were a few instances of functions improperly passing ast_free instead
of ast_free_ptr.
- Some clean up was done to avoid the debug macros intentionally being redefined.
(copied below from Kevin's commit, appreciate the help)
- disable astmm.h from doing anything when STANDALONE is defined, which is used
by the tools in the utils/ directory that use parts of Asterisk header files in
hackish ways; also ensure that utils/extconf.c and utils/conf2ael.c are
compiled with STANDALONE defined.

(closes issue #13593)
Reported by: pj



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@181135 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-11 04:06:44 +00:00
Steve Murphy ceea9b1dce My bad! left check_expr2 in the ALL_UTILS list by mistake. Already done to 1.6.x
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@180079 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-03 23:35:26 +00:00
Steve Murphy f47b03877b Merged revisions 179807 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

I had some work to do to port these changes to trunk; the 
check_expr stuff hasn't been updated here for quite some
time, it appears. I added some more tests to the check_expr2
suite. I had to play around with the makefile a bit, etc.

I added STANDALONE2 #ifdefs to ast_expr2.y so as not to
conflict structure with aelparse.

........
  r179807 | murf | 2009-03-03 11:11:34 -0700 (Tue, 03 Mar 2009) | 19 lines
  
  These changes allow AEL to better check ${} constructs within $[...], that are concatenated with text.
  
  I modified and added rules in ast_expr2.fl to better handle
  the concatenations.
  
  I added some default routines to ast_expr2.y so the standalone would
  compile. It also looks like I haven't run this thru bison since 2.1, so
  it's good to get this updated.
  
  The Makefile has comments added now for check_expr2 and check_expr to
  explain what they are for, and how to run them. 
  
  The testexpr2s stuff has been removed, in favor of check_expr2.
  
  expr2.testinput has been updated to include the two expressions
  that inspired these changes (from mcnobody on #asterisk this morning)
  The regression has been run and all looks well.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@179973 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-03 22:12:02 +00:00
Tilghman Lesher 97830cc9cb Use a SIGPIPE to kill the process, instead of depending upon the astcanary process being inherited by init.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@178342 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-24 20:06:48 +00:00
Tilghman Lesher bb2b9b1ff4 Cause astcanary to exit if Asterisk exits abnormally and doesn't kill astcanary.
Also, add some documentation supporting the use of astcanary.
(closes issue #14538)
 Reported by: KNK
 Patches: 
       asterisk-1.6.x-astcanary.diff uploaded by KNK (license 545)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@178303 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-24 17:51:36 +00:00