Fix a number of problems with ast_sched_report().
authorRussell Bryant <russell@russellbryant.com>
Sun, 15 Feb 2009 20:56:27 +0000 (20:56 +0000)
committerRussell Bryant <russell@russellbryant.com>
Sun, 15 Feb 2009 20:56:27 +0000 (20:56 +0000)
commitca9d3b8ac9ca191ff1ceb04cacb17ca527cf7bea
tree13dfce7ac8e12b611f57a934e3721d255bb109e8
parentcbe45a6e0682c11a6ee0e193f6ba86f9c7909a35
Fix a number of problems with ast_sched_report().

1) It had numerous coding guidelines violations with regards to formatting.

2) It allocated memory using ast_calloc() that was never freed.

3) It didn't check for failure from the allocation.

4) It used sprintf() and strcat() to build the result, doing zero checking to
   prevent writing past the end of the provided buffer.

The function also lacks API documentation, but that has not been addressed in
this commit.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@175829 65c4cc65-6c06-0410-ace0-fbb531ad65f3
channels/chan_sip.c
include/asterisk/sched.h
main/sched.c