summaryrefslogtreecommitdiff
path: root/main/asterisk.c
AgeCommit message (Collapse)Author
2007-12-14Convert ast_verbose to ast_verb.Tilghman Lesher
Reported by: snuffy Patch by: snuffy (Closes issue #11547) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@92913 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-12Correctly handle possible memory allocation failureTilghman Lesher
Reported by: eliel Patch by: eliel (Closes issue #11512) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@92507 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-27A few more "moremanager" fixesOlle Johansson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89772 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-27More "moremanager" fixes. Manager commands to check module status.Olle Johansson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89771 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-21remove a bunch of useless #include "options.h"Luigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89511 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-20move internal function declarations to include/asterisk/_private.hLuigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89465 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-19another bunch of include removals (errno.h and asterisk/logger.h)Luigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89425 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-17start using asterisk/network.h for network related headers.Luigi Rizzo
Also remove some unnecessary includes. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89380 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-16remove a bunch of duplicate includesLuigi Rizzo
Reproduce with grep -r #include . | grep -v .svn | grep -v Binary | sort | uniq -c | sort -nr git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89348 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-16remove duplicate headers.Luigi Rizzo
Properly check for netdb.h (there is actually tens of places to fix) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89335 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-16Start untangling header inclusion in a way that does not affectLuigi Rizzo
build times - tested, there is no measureable difference before and after this commit. In this change: use asterisk/compat.h to include a small set of system headers: inttypes.h, unistd.h, stddef.h, stddint.h, sys/types.h, stdarg.h, stdlib.h, alloca.h, stdio.h Where available, the inclusion is conditional on HAVE_FOO_H as determined by autoconf. Normally, source files should not include any of the above system headers, and instead use either "asterisk.h" or "asterisk/compat.h" which does it better. For the time being I have left alone second-level directories (main/db1-ast, etc.). git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89333 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-08improve linked-list macros in two ways:Kevin P. Fleming
- the *_CURRENT macros no longer need the list head pointer argument - add AST_LIST_MOVE_CURRENT to encapsulate the remove/add operation when moving entries between lists git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89106 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-22Switch from AST_CLI (formerly NEW_CLI) to AST_CLI_DEFINE, since the former ↵Jason Parker
didn't make much sense git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@86820 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-21Merged revisions 85532 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r85532 | russell | 2007-10-13 00:24:33 -0500 (Sat, 13 Oct 2007) | 8 lines Properly handle the case where read() may return the text for more than one CLI command at once for a remote console. (closes issue #10888) Reported by: jamesgolovich Patches: asterisk-climultiple.diff.txt uploaded by jamesgolovich (license 176) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@86585 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-19Convert NEW_CLI to AST_CLI.Jason Parker
Closes issue #11039, as suggested by seanbright. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@86536 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-17Merged revisions 86066 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r86066 | tilghman | 2007-10-17 10:23:51 -0500 (Wed, 17 Oct 2007) | 3 lines When runuser/rungroup is specified, a remote console could only be attained by root (Closes issue #9999) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@86079 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-15Merged revisions 85545 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r85545 | russell | 2007-10-15 08:05:45 -0500 (Mon, 15 Oct 2007) | 7 lines Make sure remote consoles unmute themselves again after reconnecting. (closes issue #10847) Reported by: atis Patches: console_unmute_on_reconnect.patch uploaded by atis (license 242) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@85546 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-13Merged revisions 85533 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r85533 | russell | 2007-10-13 01:48:10 -0400 (Sat, 13 Oct 2007) | 12 lines Fix an issue with console verbosity when running asterisk -rx to execute a command and retrieve its output. The issue was that there was no way for the main Asterisk process to know that the remote console was connecting in the -rx mode. The way that James has fixed this is to have all remote consoles muted by default. Then, regular remote consoles automatically execute a CLI command to unmute themselves when they first start up. (closes issue #10847) Reported by: atis Patches: asterisk-consolemute.diff.txt uploaded by jamesgolovich (license 176) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@85534 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-11Merge a ton of NEW_CLI conversions. Thanks to everyone that helped out! :)Russell Bryant
(closes issue #10724) Reported by: eliel Patches: chan_skinny.c.patch uploaded by eliel (license 64) chan_oss.c.patch uploaded by eliel (license 64) chan_mgcp.c.patch2 uploaded by eliel (license 64) pbx_config.c.patch uploaded by seanbright (license 71) iax2-provision.c.patch uploaded by eliel (license 64) chan_gtalk.c.patch uploaded by eliel (license 64) pbx_ael.c.patch uploaded by seanbright (license 71) file.c.patch uploaded by seanbright (license 71) image.c.patch uploaded by seanbright (license 71) cli.c.patch uploaded by moy (license 222) astobj2.c.patch uploaded by moy (license 222) asterisk.c.patch uploaded by moy (license 222) res_limit.c.patch uploaded by seanbright (license 71) res_convert.c.patch uploaded by seanbright (license 71) res_crypto.c.patch uploaded by seanbright (license 71) app_osplookup.c.patch uploaded by seanbright (license 71) app_rpt.c.patch uploaded by seanbright (license 71) app_mixmonitor.c.patch uploaded by seanbright (license 71) channel.c.patch uploaded by seanbright (license 71) translate.c.patch uploaded by seanbright (license 71) udptl.c.patch uploaded by seanbright (license 71) threadstorage.c.patch uploaded by seanbright (license 71) db.c.patch uploaded by seanbright (license 71) cdr.c.patch uploaded by moy (license 222) pbd_dundi.c.patch uploaded by moy (license 222) app_osplookup-rev83558.patch uploaded by moy (license 222) res_clioriginate.c.patch uploaded by moy (license 222) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@85460 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-01Corydon posted this janitor project to the bug tracker and mvanbaak providedRussell Bryant
a patch for it. It replaces a bunch of simple calls to snprintf with ast_copy_string (closes issue #10843) Reported by: Corydon76 Patches: 2007092900_10843.diff uploaded by mvanbaak (license 7) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@84173 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-24Permit custom locations for astdb and the keys directory (though default to ↵Tilghman Lesher
the current locations) (Closes issue #10267) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@83726 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-20Merged revisions 83348 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r83348 | russell | 2007-09-20 16:16:48 -0500 (Thu, 20 Sep 2007) | 4 lines When daemonizing, don't change working directory to "/". It makes it not be able to do a core dump when not running as uid=root. (closes issue #10766, xrg) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@83349 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-20trivial formatting changeRussell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@83297 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-20trivial formatting changeRussell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@83293 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-20Don't start the event processing thread until after forking.Russell Bryant
(reported by Simon on the -dev list, thanks!) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@83233 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-13Merged revisions 82337 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r82337 | russell | 2007-09-13 13:45:59 -0500 (Thu, 13 Sep 2007) | 4 lines Only compile in tracking astobj2 statistics if dev-mode is enabled. Also, when dev mode is enabled, register the CLI command that can be used to run the astobj2 test and print out statistics. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82338 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-12Fixes Solaris build warningsMark Michelson
(closes issue #10698, reported and patched by snuffy) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82283 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-12Merged revisions 82280 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r82280 | russell | 2007-09-12 10:16:49 -0500 (Wed, 12 Sep 2007) | 4 lines Clean up the output of "asterisk -h". This tweaks the wording and wraps lines at 80 characters. (closes issue #10699, seanbright) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82281 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-08Merged revisions 81997 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r81997 | russell | 2007-09-08 13:41:32 -0500 (Sat, 08 Sep 2007) | 2 lines Fix a small memory leak. ast_unregister_atexit() did not free the entry it removed. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81998 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-28(closes issue #7852)Russell Bryant
Reported by: nic_bellamy Patches: 2006-10-03_svn_44249_voicemail_lockmode_v3.patch uploaded by nic_bellamy (license 213) Add support for configurable file locking methods. The default is "lockfile", which is the old behavior. There is an additional option, "flock", which is intended for use in situations where the lockfile method will not work, such as with SMB/CIFS mounts. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81233 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-16Don't reload a configuration file if nothing has changed.Tilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79747 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-01Instead of adding the SOLARIS check to each HAVE_SYSINFO check let's just ↵Joshua Colp
make the sysinfo autoconf logic a bit pickier about what it considers a usable sysinfo. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77878 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-01Solaris does not have a sysinfo like we know of on Linux.Joshua Colp
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77876 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-23(closes issue #10271)Russell Bryant
Reported by: snuffy Patches: doxygen-updates.diff uploaded by snuffy (license 35) Another big batch of doxygen documentation updates git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76559 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-23(closes issue #10192)Russell Bryant
Reported by: bbryant Patches: 20070720__core_debug_by_file.patch uploaded by bbryant (license 36) (with some modifications by me) Tested by: russell, bbryant This set of changes introduces the ability to set the core debug or verbose levels on a per-file basis. Interestingly enough, in 1.4, you have the ability to set core debug for a single file, but that functionality was accidentally lost in the conversion of the CLI commands to the new format. This patch improves upon what was in 1.4 by letting you set it for more than 1 file, and by also supporting verbose. *** Janitor Project *** This patch also introduces a new macro, ast_verb(), which is similar to ast_debug(). Setting the per file verbose value only works for messages that use this macro. Converting existing uses of ast_verbose() can be done like: if (option_debug > 2) ast_verbose(VERBOSE_PREFIX_3 "Something useful\n"); ... ast_verb(3, "Something useful\n"); git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76555 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-18Merge in ast_strftime branch, which changes timestamps to be accurate to the ↵Tilghman Lesher
microsecond, instead of only to the second git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75706 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-27Merged revisions 72383 via svnmerge from Brett Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r72383 | bbryant | 2007-06-27 18:29:14 -0500 (Wed, 27 Jun 2007) | 11 lines Merged revisions 72373 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r72373 | bbryant | 2007-06-27 18:22:13 -0500 (Wed, 27 Jun 2007) | 3 lines Reinstating patch. This actually fixes the problem, however I was running a development branch without it and mistakenly thought it wasn't fixed. Fixes issue #10010, and #9654: 100% CPU usage caused by an asterisk console losing it's controlling terminal. ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@72384 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-27Merged revisions 72335 via svnmerge from Brett Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r72335 | bbryant | 2007-06-27 18:03:01 -0500 (Wed, 27 Jun 2007) | 10 lines Merged revisions 72333 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r72333 | bbryant | 2007-06-27 17:58:53 -0500 (Wed, 27 Jun 2007) | 2 lines Reverted changes for earlier revisions 72259 to 72261. Issue #9654, #10010 ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@72337 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-27Merged revisions 72260 via svnmerge from Brett Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r72260 | bbryant | 2007-06-27 15:46:12 -0500 (Wed, 27 Jun 2007) | 12 lines Merged revisions 72259 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r72259 | bbryant | 2007-06-27 15:43:53 -0500 (Wed, 27 Jun 2007) | 4 lines Fixes 100% load when controlling terminal disappears. Issue #9654, #10010 ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@72261 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-24Merged revisions 71362 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r71362 | russell | 2007-06-24 15:06:31 -0500 (Sun, 24 Jun 2007) | 10 lines Merged revisions 71358 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r71358 | russell | 2007-06-24 15:04:21 -0500 (Sun, 24 Jun 2007) | 2 lines Revert the patch from issue 9654 due to an unexpected side effect ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@71365 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-22Merged revisions 71066 via svnmerge from Brett Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r71066 | bbryant | 2007-06-22 09:53:08 -0500 (Fri, 22 Jun 2007) | 18 lines Merged revisions 71064 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r71064 | bbryant | 2007-06-22 09:39:34 -0500 (Fri, 22 Jun 2007) | 10 lines Fixed infinite loop when controlling terminal was lost and return value of input function wasn't checked for errors. This would cause 100% cpu to be taken up. (closes issue #9654, issue #10010) Reported by: mnicholson, and eserra Idea for the patch from mnicholson, patched by me ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@71067 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-22Nothing to see here.Jason Parker
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@71024 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-18Few more rwlist conversions... why not.Joshua Colp
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@69705 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-14Convert uses of strdup() to ast_strdup()Russell Bryant
(issue #9983, eliel) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@69436 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-14Merged revisions 69392 via svnmerge from Kevin P. Fleming
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r69392 | kpfleming | 2007-06-14 16:50:40 -0500 (Thu, 14 Jun 2007) | 2 lines use ast_localtime() in every place localtime_r() was being used ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@69405 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-14Add a massive set of changes for converting to use the ast_debug() macro.Russell Bryant
(issue #9957, patches from mvanbaak, caio1982, critch, and dimas) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@69327 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-08Minor formatting change to test changes to mantis auto-closing issuesRussell Bryant
(closes issue #6000) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@68448 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-06Issue 9869 - replace malloc and memset with ast_calloc, and other coding ↵Tilghman Lesher
guidelines changes git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@67864 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-05Merged revisions 67308 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r67308 | russell | 2007-06-05 10:51:53 -0500 (Tue, 05 Jun 2007) | 5 lines When shutting down "gracefully", go through and run the unload() callbacks for all of the modules. "stop now" is considered a non-graceful shutdown and will not go through this process. (issue #9804, reported by chrisost, patch by me) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@67310 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-01Merge major changes to the way device state is passed around Asterisk. The twoRussell Bryant
places that cared about device states were app_queue and the hint code in pbx.c. The changes include converting it to use the Asterisk event system, as well as other efficiency improvements. * app_queue: This module used to register a callback into devicestate.c to monitor device state changes. Now, it is just a subscriber to Asterisk events with the type, device state. * pbx.c hints: Previously, the device state processing thread in devicestate.c would call ast_hint_state_changed() each time the state of a device changed. Then, that code would go looking for all the hints that monitor that device, and call their callbacks. All of this blocked the device state processing thread. Now, the hint code is a subscriber of Asterisk events with the type, device state. Furthermore, when this code receives a device state change event, it queues it up to be processed by another thread so that it doesn't block one of the event processing threads. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@66958 65c4cc65-6c06-0410-ace0-fbb531ad65f3