summaryrefslogtreecommitdiff
path: root/main/astfd.c
AgeCommit message (Collapse)Author
2016-06-08astfd: Not maximum size of a single file but maximum file descriptors.Alexander Traud
With menuselect "DEBUG_FD_LEAKS" and CLI "core show fd", the maximum size of a single file was shown. Now, the maximum number of possible file descriptors is shown. ASTERISK-26097 Change-Id: Icf98d145774b38cac144ca76d19eaef42ce659a3
2015-07-02astfd: Fix buffer overflow in DEBUG_FD_LEAKS.Walter Doekes
If DEBUG_FD_LEAKS was used and more file descriptors than the default of 1024 were available, some DEBUG_FD_LEAKS-patched functions would overwrite memory past the fixed-size (1024) fdleaks buffer. This change: - adds bounds checks to __ast_fdleak_fopen and __ast_fdleak_pipe - consistently uses ARRAY_LEN() instead of sizeof() or 1023 or 1024 - stores pointers to constants instead of copying the contents - reorders the fdleaks struct for possibly tighter packing - adds a tiny bit of documentation ASTERISK-25212 #close Change-Id: Iacb69e7701c0f0a113786bd946cea5b6335a85e5
2015-03-26Replace most uses of ast_register_atexit with ast_register_cleanup.Corey Farrell
Since 'core stop now' and 'core restart now' do not stop modules, it is unsafe for most of the core to run cleanups. Originally all cleanups used ast_register_atexit, and were only changed when it was shown to be unsafe. ast_register_atexit is now used only when absolutely required to prevent corruption and close child processes. Exceptions that need to use ast_register_atexit: * CDR: Flush records. * res_musiconhold: Kill external applications. * AstDB: Close the DB. * canary_exit: Kill canary process. ASTERISK-24142 #close Reported by: David Brillert ASTERISK-24683 #close Reported by: Peter Katzmann ASTERISK-24805 #close Reported by: Badalian Vyacheslav ASTERISK-24881 #close Reported by: Corey Farrell Review: https://reviewboard.asterisk.org/r/4500/ Review: https://reviewboard.asterisk.org/r/4501/ ........ Merged revisions 433495 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433497 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-20Unregister CLI commands on exitKinsey Moore
This patch ensures that CLI commands enabled by DEBUG_FD_LEAKS and DEBUG_THREADLOCALS are cleaned up properly on exit. (closes issue ASTERISK-22238) Reported by: Corey Farrell Tested by: Corey Farrell Patches: debug_cli_unregister.patch uploaded by Corey Farrell ........ Merged revisions 397106 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 397107 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397110 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-22Doxygen Updates Janitor WorkAndrew Latham
* Whitespace, doc-blocks, spelling, case, missing and incorrect tags. * Add cleanup to Makefile for the Doxygen configuration update * Start updating Doxygen configuration for cleaner output * Enable inclusion of configuration files into documentation * remove mantisworkflow... * update documentation README * Add markup to Tilghman's email and talk with him about updating his email, he knows... * no code changes on this commit other than the mentioned Makefile change (issue ASTERISK-20259) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@373384 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-15Multiple revisions 369001-369002Kevin P. Fleming
........ r369001 | kpfleming | 2012-06-15 10:56:08 -0500 (Fri, 15 Jun 2012) | 11 lines Add support-level indications to many more source files. Since we now have tools that scan through the source tree looking for files with specific support levels, we need to ensure that every file that is a component of a 'core' or 'extended' module (or the main Asterisk binary) is explicitly marked with its support level. This patch adds support-level indications to many more source files in tree, but avoids adding them to third-party libraries that are included in the tree and to source files that don't end up involved in Asterisk itself. ........ r369002 | kpfleming | 2012-06-15 10:57:14 -0500 (Fri, 15 Jun 2012) | 3 lines Add a script to enable finding source files without support-levels defined. ........ Merged revisions 369001-369002 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 369005 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369013 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-23On some platforms, O_RDONLY is not a flag to be checked, but merely the ↵Tilghman Lesher
absence of O_RDWR and O_WRONLY. The POSIX specification does not mandate how these 3 flags must be specified, only that one of the three must be specified in every call. ........ Merged revisions 363209 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 363212 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@363215 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-06Merged revisions 228338 via svnmerge from David Vossel
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r228338 | dvossel | 2009-11-06 09:41:41 -0600 (Fri, 06 Nov 2009) | 5 lines fixes crash in astfd.c (closes issue #15981) Reported by: slavon ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@228339 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-09Merged revisions 211274 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r211274 | tilghman | 2009-08-09 10:41:01 -0500 (Sun, 09 Aug 2009) | 2 lines Small oops. Clear the flags which have been checked. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@211275 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-09Merged revisions 187300-187301 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r187300 | tilghman | 2009-04-08 23:31:38 -0500 (Wed, 08 Apr 2009) | 3 lines Add debugging mode for diagnosing file descriptor leaks. (Related to issue #14625) ........ r187301 | tilghman | 2009-04-08 23:32:40 -0500 (Wed, 08 Apr 2009) | 2 lines Oops, missed this file in the last commit. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@187302 65c4cc65-6c06-0410-ace0-fbb531ad65f3