Commit Graph

26 Commits

Author SHA1 Message Date
Corey Farrell 5d34bce635 main/editline: Add .gitignore.
This patch adds a .gitignore for main/editline to ignore all build results.

Change-Id: I68c7bf375ea46282689e5a706534b69fca233b5d
2015-04-12 07:12:45 -04:00
Matthew Jordan d2776d4d45 clang compiler warnings: Fix a variety of "unused" warnings
This patch fixes the -Wunused-value -Wunused-variable -Wunused-const-variable
errors caught by clang. Specifically:

* apps/app_queue.c: removed unused qpm_cmd_usage[], qum_cmd_usage[],
                    qsmp_cmd_usage[]
* cel/cel_sqlite3_custom.c: removed unused name[] = "cel_sqlite3_custom"
* channels/chan_pjsip.c: removed unused desc[] = "PJSIP Channel"
* codecs/gsm/src/gsm_create.c: removed unused ident[] = "$Header$"
* funcs/func_env.c:729: Fixed ast_str_append_substr.
* main/editline/np/strlcat.c: removed unused rcsid variable
* main/editline/np/strlcpy.c: removed unused rcsid variable
* main/security_events.c: removed unused TIMESTAMP_STR_LEN
* utils/conf2ael.c: removed unused cfextension_states
* utils/extconf.c: removed unused cfextension_states

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

ASTERISK-24917
Reported by: dkdegroot
patches:
  rb4526.patch submitted by dkdegroot (License 6600)
........

Merged revisions 433693 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 433694 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@433695 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-03-28 12:56:43 +00:00
Walter Doekes 63a4da4a0d cli.c: Fix tab completion "module load" when MALLOC_DEBUG is enabled.
r421600 conflicted with r155763.

ASTERISK-24348 #close
........

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

Merged revisions 423658 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 423659 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 423660 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@423661 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-22 17:42:26 +00:00
Jonathan Rose beb5cdbef5 memory leaks: Memory leak cleanup patch by Corey Farrell (first set)
(issue ASTERSIK-22467)
Reported by: Corey Farrell
Patches:
    chan_sip-parse_contact_header_test-free-contacts.patch uploaded by coreyfarrell (license 5909)
    cli-filename-completion-leak.patch uploaded by coreyfarrell (license 5909)
    func_math.patch uploaded by corefarrell (license 5909)
    main-test-cleanup.patch uploaded by coreyfarrell (license 5909)
    test_dlinklists.patch uploaded by coreyfarrell (license 5909)
........

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

Merged revisions 401661 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 401662 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@401663 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-23 20:10:30 +00:00
Kevin Harwell d6b401e5d3 Segfault in LIBEDIT_INTERNAL after tgetstr(), when libncurses5-dev
isn't installed

Include the appropriate declarations when not using termcap, but term+curses
and [n]curses do not exist.

(closes issue ASTERISK-22351)
Reported by: A. Iglesias
Patches:
    issueA22351_libedit_internal_without_ncurses_dev.patch uploaded by wdoekes (license 5674)
........

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

Merged revisions 401326 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 401327 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@401328 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-21 19:50:28 +00:00
Kevin P. Fleming 7d4ccea736 Enable usage of system-provided NetBSD editline library if available.
This patch changes the Asterisk configure script and build system to detect
the presence of the NetBSD editline library (libedit) on the system. If it is
found, it will be used in preference to the version included in the Asterisk
source tree.

(closes issue ASTERISK-18725)
Reported by: Jeffrey C. Ollie
Review: https://reviewboard.asterisk.org/r/1528/
Patches:
  0001-Allow-linking-building-against-an-external-editline.patch uploaded by jcollie (license #5373) (heavily modified by kpfleming)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370481 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-25 12:21:54 +00:00
Matthew Jordan 7b51320642 Fix a variety of memory leaks
This patch addresses a number of memory leaks in a variety of modules that were
found by a static analysis tool.  A brief summary of the changes:

* app_minivm:       free ast_str objects on off nominal paths
* app_page:         free the ast_dial object if the requested channel technology
                    cannot be appended to the dialing structure
* app_queue:        if a penalty rule failed to match any existing rule list
                    names, the created rule would not be inserted and its memory
                    would be leaked
* app_read:         dispose of the created silence detector in the presence of
                    off nominal circumstances
* app_voicemail:    dispose of an allocated unique ID field for MWI event
                    un-subscribe requests in off nominal paths; dispose of
                    configuration objects when using the secret.conf option
* chan_dahdi:       dispose of the allocated frame produced by ast_dsp_process
* chan_iax2:        properly unref peer in CLI command "iax2 unregister"
* chan_sip:         dispose of the allocated frame produced by sip_rtp_read's
                    call of ast_dsp_process; free memory in parse unit tests
* func_dialgroup:   properly deref ao2 object grhead in nominal path of
                    dialgroup_read
* func_odbc:        free resultset in off nominal paths of odbc_read
* cli:              free match_list in off nominal paths of CLI match completion
* config:           free comment_buffer/list_buffer when configuration file load
                    is unchanged; free the same buffers any time they were
                    created and config files were processed
* data:             free XML nodes in various places
* enum:             free context buffer in off nominal paths
* features:         free ast_call_feature in off nominal paths of applicationmap
                    config processing
* netsock2:         users of ast_sockaddr_resolve pass in an ast_sockaddr struct
                    that is allocated by the method.  Failures in
                    ast_sockaddr_resolve could result in the users of the method
                    not knowing whether or not the buffer was allocated.  The
                    method will now not allocate the ast_sockaddr struct if it
                    will return failure.
* pbx:              cleanup hash table traversals in off nominal paths; free
                    ignore pattern buffer if it already exists for the specified
                    context
* xmldoc:           cleanup various nodes when we no longer need them
* main/editline:    various cleanup of pointers not being freed before being
                    assigned to other memory, cleanup along off nominal paths
* menuselect/mxml:  cleanup of value buffer for an attribute when that attribute
                    did not specify a value
* res_calendar*:    responses are allocated via the various *_request method
                    returns and should not be allocated in the various
                    write_event methods; ensure attendee buffer is freed if no
                    data exists in the parsed node; ensure that calendar objects
                    are de-ref'd appropriately
* res_jabber:       free buffer in off nominal path
* res_musiconhold:  close the DIR* object in off nominal paths
* res_rtp_asterisk: if we run out of ports, close the rtp socket object and free
                    the rtp object
* res_srtp:         if we fail to create the session in libsrtp, destroy the
                    temporary ast_srtp object

(issue ASTERISK-19665)
Reported by: Matt Jordan

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@366917 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-18 14:43:44 +00:00
Jason Parker 7108038175 Add gar to the check for AR for those silly OSes (Solaris) that don't have ar.
autoconf2.13 couldn't handle AC_PROG_GREP, so I removed it.  This is fine,
since we don't need to use anything that the configure script doesn't.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@259439 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-04-27 21:13:01 +00:00
Tilghman Lesher de7dcfd5d3 One more fix to editline
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@250346 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-03 16:43:10 +00:00
Tilghman Lesher 6a90983ce6 Eliminate remaining libedit warnings (shown in bamboo)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@250303 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-03 15:54:28 +00:00
Jason Parker 9bb9c64521 Merged revisions 179395 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r179395 | qwell | 2009-03-02 14:14:57 -0600 (Mon, 02 Mar 2009) | 1 line
  
  Remove several silly warnings in editline.  One about a broken preprocessor directive, and another about strlcpy/strlcat.

  (closes issue #14264)
  Reported by: dimas
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@179396 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-02 20:16:51 +00:00
Tilghman Lesher 5e034d9f0b Merged revisions 163761 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r163761 | tilghman | 2008-12-12 16:03:10 -0600 (Fri, 12 Dec 2008) | 7 lines
  
  Simple fix for Ctrl-C not immediately exiting Asterisk, but also add a
  pointer inside editline to look back to asterisk.c, so others don't spend
  as much time as I did looking (in the wrong place) for the appropriate
  function.
  Reported by: ZX81, via the #asterisk-users channel
  Fixed by: me (license 14)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@163762 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-12 22:04:26 +00:00
Tilghman Lesher a974729765 Fix memory leak when MALLOC_DEBUG is enabled.
(closes issue #13864)
 Reported by: eliel
 Patches: 
       readline.c.patch uploaded by eliel (license 64)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@155763 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-10 18:04:30 +00:00
Sean Bright b2ced9216c Merged revisions 129343 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r129343 | seanbright | 2008-07-09 09:41:21 -0400 (Wed, 09 Jul 2008) | 4 lines

Look for the system installed awk instead of assuming it's at /usr/bin/awk.

Pointed out by jmls via #asterisk-dev.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@129344 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-09 13:44:43 +00:00
Kevin P. Fleming 6b06e9a8eb Merged revisions 127892,127895 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r127892 | kpfleming | 2008-07-03 17:18:38 -0500 (Thu, 03 Jul 2008) | 6 lines

a couple of small Solaris-related fixes

(closes issue #11885)
Reported by: snuffy, asgaroth


........
r127895 | kpfleming | 2008-07-03 17:20:16 -0500 (Thu, 03 Jul 2008) | 3 lines

remove this, it has been moved to the main Makefile


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@127903 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-03 22:23:04 +00:00
Kevin P. Fleming 79c3038ee5 Merged revisions 107352 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r107352 | kpfleming | 2008-03-11 06:04:29 -0500 (Tue, 11 Mar 2008) | 11 lines

fix up various compiler warnings found with gcc-4.3:

- the output of flex includes a static function called 'input' that is not used, so for the moment we'll stop having the compiler tell us about unused variables in the flex source files (a better fix would be to improve our flex post-processing to remove the unused function)

- main/stdtime/localtime.c makes assumptions about signed integer overflow, and gcc-4.3's improved optimizer tries to take advantage of handling potential overflow conditions at compile time; for now, suppress these optimizations until we can fiure out if the code needs improvement

- main/udptl.c has some references to uninitialized variables; in one case there was no bug, but in the other it was certainly possibly for unexpected behavior to occur

- main/editline/readline.c had an unused variable


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107373 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-11 11:36:51 +00:00
Jason Parker 8aa30ccf0b Merged revisions 106842 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r106842 | qwell | 2008-03-07 16:14:45 -0600 (Fri, 07 Mar 2008) | 5 lines

Fix hardcoded grep in editline, were GNU grep is required.

(closes issue #12124)
Reported by: dmartin

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@106843 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-07 22:15:20 +00:00
Tilghman Lesher 43a172de57 Merged revisions 97350 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r97350 | tilghman | 2008-01-08 18:44:14 -0600 (Tue, 08 Jan 2008) | 5 lines

Allow filename completion on zero-length modules, remove a memory leak, remove
a file descriptor leak, and make filename completion thread-safe.
Patched and tested by tilghman.
(Closes issue #11681)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@97364 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-09 00:51:59 +00:00
Tilghman Lesher 236132cb92 If malloc.h is included in a Solaris build, the compilation breaks.
Reported by: snuffy
Patch by: snuffy
(Closes issue #11313)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@92939 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-14 15:49:14 +00:00
Jason Parker efe87112fb Merged revisions 87567 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

(closes issue #11113)
........
r87567 | qwell | 2007-10-30 10:45:35 -0500 (Tue, 30 Oct 2007) | 4 lines

Fix build of editline on Solaris.

Issue 11113, patch by snuffy.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@87568 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-30 15:47:19 +00:00
Kevin P. Fleming a4b8ca220d clean up assembler and preprocessor files if they are here too
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@87467 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-29 22:24:44 +00:00
Joshua Colp 1df4047b4a Finish up commit from revision 81452 by removing last remnants of strlcat/strlcpy checks.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81459 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-05 00:53:14 +00:00
Russell Bryant 664d1d879b Don't check for and include strlcpy and strlcat in editline. We also include
them directly in Asterisk.  For platforms that need them (like my mac), you
will get a linker error due to the functions being included twice.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81452 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-04 19:51:37 +00:00
Kevin P. Fleming 74f31a51bc add -Wundef to the --enable-dev-mode flags, so that mistyped macro names in #if expressions will be caught
convert various #if expressions to #ifdef for macros that may not be defined (and where the value is not important)
Note: two of these changes are in bison generated files which is going to be inconvenient when they are regenerated


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@55329 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-18 15:03:42 +00:00
Jason Parker 0264c362b6 a couple Solaris tweaks, to help build properly.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40832 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-22 05:24:50 +00:00
Kevin P. Fleming 0a27d8bfe5 merge new_loader_completion branch, including (at least):
- restructured build tree and makefiles to eliminate recursion problems
  - support for embedded modules
  - support for static builds
  - simpler cross-compilation support
  - simpler module/loader interface (no exported symbols)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40722 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-21 02:11:39 +00:00