Commit Graph

11 Commits

Author SHA1 Message Date
Mike Bradeen 99a1a427a9 various: Fix GCC 11 compilation issues.
test_voicemail_api: Use empty char* for empty_msg_ids.
chan_skinny: Fix size of calledParty to be maximum extension.
menuselect: Change Makefile to stop deprecated warnings. Added comments
test_linkedlist: 'bogus' variable was manually allocated from a macro
and the test fails if this happens but the compiler couldn't 'see' this
and returns a warning. memset to all 0's after allocation.
chan_ooh323: Fixed various indentation issues that triggered misleading
 indentation warnings.

ASTERISK-29682
Reported by: George Joseph

Change-Id: If4fe42222c8444dc16828a42731ee53b4ce5cbbe
2021-10-21 13:18:41 -05:00
Corey Farrell a6e5bae3ef Remove ASTERISK_REGISTER_FILE.
ASTERISK_REGISTER_FILE no longer has any purpose so this commit removes
all traces of it.

Previously exported symbols removed:
* __ast_register_file
* __ast_unregister_file
* ast_complete_source_filename

This also removes the mtx_prof static variable that was declared when
MTX_PROFILE was enabled.  This variable was only used in lock.c so it
is now initialized in that file only.

ASTERISK-26480 #close

Change-Id: I1074af07d71f9e159c48ef36631aa432c86f9966
2016-10-27 09:53:55 -04:00
Matt Jordan 4a58261694 git migration: Refactor the ASTERISK_FILE_VERSION macro
Git does not support the ability to replace a token with a version
string during check-in. While it does have support for replacing a
token on clone, this is somewhat sub-optimal: the token is replaced
with the object hash, which is not particularly easy for human
consumption. What's more, in practice, the source file version was often
not terribly useful. Generally, when triaging bugs, the overall version
of Asterisk is far more useful than an individual SVN version of a file. As a
result, this patch removes Asterisk's support for showing source file
versions.

Specifically, it does the following:

* Rename ASTERISK_FILE_VERSION macro to ASTERISK_REGISTER_FILE, and
  remove passing the version in with the macro. Other facilities
  than 'core show file version' make use of the file names, such as
  setting a debug level only on a specific file. As such, the act of
  registering source files with the Asterisk core still has use. The
  macro rename now reflects the new macro purpose.

* main/asterisk:
  - Refactor the file_version structure to reflect that it no longer
    tracks a version field.
  - Remove the "core show file version" CLI command. Without the file
    version, it is no longer useful.
  - Remove the ast_file_version_find function. The file version is no
    longer tracked.
  - Rename ast_register_file_version/ast_unregister_file_version to
    ast_register_file/ast_unregister_file, respectively.

* main/manager: Remove value from the Version key of the ModuleCheck
  Action. The actual key itself has not been removed, as doing so would
  absolutely constitute a backwards incompatible change. However, since
  the file version is no longer tracked, there is no need to attempt to
  include it in the Version key.

* UPGRADE: Add notes for:
  - Modification to the ModuleCheck AMI Action
  - Removal of the "core show file version" CLI command

Change-Id: I6cf0ff280e1668bf4957dc21f32a5ff43444a40e
2015-04-13 03:48:57 -04:00
Jonathan Rose 1d0a6d2b2c test_linkedlists: Fix memory leak
(issue ASTERISK-22467)
Reported by: Corey Farrell
Patches:
    test_linkedlists-1.8.patch uploaded by coreyfarrell (license 5909)
    test_linkedlists-11up.patch uploaded by coreyfarrell (license 5909)
........

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@401793 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-24 19:57:04 +00:00
Kinsey Moore 9b16c8b0f6 Clean up and ensure proper usage of alloca()
This replaces all calls to alloca() with ast_alloca() which calls gcc's
__builtin_alloca() to avoid BSD semantics and removes all NULL checks
on memory allocated via ast_alloca() and ast_strdupa().

(closes issue ASTERISK-20125)
Review: https://reviewboard.asterisk.org/r/2032/
Patch-by: Walter Doekes (wdoekes)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370655 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-31 20:21:43 +00:00
Michael L. Young a011ae78dc Add leading and trailing backslashes
A couple of unit tests did not have have leading or trailing backslashes when
setting their test category resulting in a warning message being displayed.
Added the backslash where needed.
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@362682 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-19 21:14:35 +00:00
Richard Mudgett ca41b4aba0 Doubly linked lists unit test and update to implementation.
Update the doubly linked list implementation.  Now safe traversing can
insert before and after the current node when traversing in either
direction.

Updated the linked lists unit test test_linkedlist to also test doubly
linked lists.  The old test_dlinkedlist requires a manual check of results
and probably should be removed.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@347110 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-06 19:09:56 +00:00
Richard Mudgett f7ce570c35 Fix AST_LIST_INSERT_BEFORE_CURRENT() updating the wrong variable.
AST_LIST_INSERT_BEFORE_CURRENT() could not be used twice in an iteration
or before AST_LIST_REMOVE_CURRENT() without corrupting the list.
AST_LIST_INSERT_BEFORE_CURRENT() could also corrupt the list if
AST_LIST_INSERT_BEFORE_CURRENT() or AST_LIST_REMOVE_CURRENT() is used on
the next iteration.

* Fixed cut and paste error using the wrong variable in
AST_LIST_INSERT_BEFORE_CURRENT().

* Added linked list unit tests for AST_LIST_INSERT_BEFORE_CURRENT(),
AST_LIST_APPEND_LIST(), and AST_LIST_INSERT_LIST_AFTER().
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@342663 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-29 04:31:51 +00:00
Paul Belanger dbb8332ff7 Merged revisions 338556 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r338556 | pabelanger | 2011-09-29 17:14:34 -0400 (Thu, 29 Sep 2011) | 9 lines
  
  Merged revisions 338555 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r338555 | pabelanger | 2011-09-29 17:12:21 -0400 (Thu, 29 Sep 2011) | 2 lines
    
    Test modules should depend on the TEST_FRAMEWORK flag
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@338557 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-29 21:16:07 +00:00
Paul Belanger 606ca8ee8c Merged revisions 332177 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r332177 | pabelanger | 2011-08-16 16:11:49 -0400 (Tue, 16 Aug 2011) | 11 lines
  
  Merged revisions 332176 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r332176 | pabelanger | 2011-08-16 16:10:13 -0400 (Tue, 16 Aug 2011) | 4 lines
    
    Flag test modules as 'core'
    
    Review: https://reviewboard.asterisk.org/r/1369/
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@332178 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-16 20:15:23 +00:00
Terry Wilson c26bb50cc3 Merged revisions 328717 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.10

................
  r328717 | twilson | 2011-07-18 20:55:32 -0500 (Mon, 18 Jul 2011) | 14 lines
  
  Merged revisions 328716 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r328716 | twilson | 2011-07-18 20:35:53 -0500 (Mon, 18 Jul 2011) | 7 lines
    
    Make AST_LIST_REMOVE safer
    
    AST_LIST_REMOVE shouldn't modify the element passed in if it isn't found. This
    commit also adds linked list unit tests.
    
    Review: https://reviewboard.asterisk.org/r/1321/
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@328718 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-19 02:00:56 +00:00