]> git.ipfire.org Git - thirdparty/asterisk.git/commit
assigned-uniqueids: Miscellaneous cleanup and fixes.
authorRichard Mudgett <rmudgett@digium.com>
Thu, 20 Mar 2014 16:27:49 +0000 (16:27 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Thu, 20 Mar 2014 16:27:49 +0000 (16:27 +0000)
commitce6048c07f8e91d5dc6c1cef9c779994956be0e1
tree28939e1782b2f79e096f10b2bb01d1f1f6f6dee9
parentc2dd050e1a5908b4bac78c58ce93024388418322
assigned-uniqueids: Miscellaneous cleanup and fixes.

* Fix memory leak in ast_unreal_new_channels().  Made it generate the ;2
uniqueid on a stack variable instead of mallocing it.

* Made send error response to ARI and AMI requests instead of just logging
excessive uniqueid length and allowing truncation.  action_originate() and
ari_channels_handle_originate_with_id().

* Fixed minor truncating uniqueid hole when generating the ;2 uniqueid
string length.  Created public and internal lengths of uniqueid.  The
internal length can handle a max public uniqueid plus an appended ;2.

* free() and ast_free() are NULL tolerant so they don't need a NULL test
before calling.

* Made use better struct initialization format instead of the position
dependent initialization format.  Also anything not explicitly initialized
in the struct is initialized to zero by the compiler.

* Made ast_channel_internal_set_fake_ids() use the safer
ast_copy_string() instead of strncpy().

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410949 65c4cc65-6c06-0410-ace0-fbb531ad65f3
include/asterisk/channel.h
include/asterisk/rtp_engine.h
main/channel_internal_api.c
main/core_unreal.c
main/dial.c
main/manager.c
res/ari/resource_channels.c
res/res_stasis_snoop.c