]> git.ipfire.org Git - thirdparty/asterisk.git/commit
core: Cleanup ast_get_hint() usage.
authorRichard Mudgett <rmudgett@digium.com>
Fri, 3 Mar 2017 03:27:00 +0000 (21:27 -0600)
committerRichard Mudgett <rmudgett@digium.com>
Fri, 3 Mar 2017 03:46:40 +0000 (21:46 -0600)
commit99cd7b784459eade2c2c2143d696bd9692c9f456
tree3747939b39ba966123f5934fdc298c86e4c0ebbf
parenta233e99a7771a9efdcb7ecb8a73a35ce9f2362fb
core: Cleanup ast_get_hint() usage.

* manager.c:manager_state_cb() Fix potential use of uninitialized hint[]
if a hint does not exist for the requested extension.  Ran into this when
developing a testsuite test.  The AMI event ExtensionStatus came out with
the hint header value containing garbage.  The AMI event PresenceStatus
also had the same issue.

* manager.c:action_extensionstate() no need to completely initialize the
hint[].  Only initialize the first element.

* pbx.c:ast_add_hint() Remove unnecessary assignment.

* chan_sip.c: Eliminate an unneeded hint[] local variable.  We only care
about the return value of ast_get_hint() there.

Change-Id: Ia9a8786f01f93f1f917200f0a50bead0319af97b
channels/chan_sip.c
main/manager.c
main/pbx.c