summaryrefslogtreecommitdiff
path: root/main/manager.c
AgeCommit message (Collapse)Author
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-16Fixing a problem pointed out by QwellMark Michelson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89332 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-16Added some locks that should have been around astman_send_error,Mark Michelson
at least according to the comments. (closes issue #11258, reported and patched by eliel) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89331 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-15access channel locks through ast_channel_lock/unlock/trylock and notLuigi Rizzo
through ast_mutex primitives. To detect all occurrences, I have renamed the lock field in struct ast_channel so it is clear that it shouldn't be used directly. There are some uses in res/res_features.c (see details of the diff) that are error prone as they try and lock two channels without caring about the order (or without explaining why it is safe). git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89293 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-15Merged revisions 89288 via svnmerge from Mark Michelson
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r89288 | mmichelson | 2007-11-15 08:57:28 -0600 (Thu, 15 Nov 2007) | 3 lines Undoing previous commit since I realize it was wrong ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89289 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-15Merged revisions 89286 via svnmerge from Mark Michelson
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r89286 | mmichelson | 2007-11-15 08:54:10 -0600 (Thu, 15 Nov 2007) | 4 lines Adding a missing mutex unlock. (closes issue 11256, reported and patched by ys) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89287 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-14make the 'name' and 'value' fields in ast_variable const char *Luigi Rizzo
This prevents modifying the strings in the stored variables, and catched a few instances where this was actually done. Given the differences between trunk and 1.4 (and the fact that this is effectively an API change) it is better to fix 1.4 independently. These are chan_sip.c::sip_register() chan_skinny.c:: near line 2847 config.c:: near line 1774 logger.c::make_components() res_adsi.c:: near line 1049 I may have missed some instances for modules that do not build here. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89268 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-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-05Merged revisions 84742 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r84742 | russell | 2007-10-04 20:39:07 -0500 (Thu, 04 Oct 2007) | 3 lines Fix a copy/paste error in the description of UpdateConfig that was pointed out by JerJer on #asterisk-dev ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@84743 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-01Merged revisions 84274 via svnmerge from Dwayne M. Hubbard
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r84274 | dhubbard | 2007-10-01 16:25:37 -0500 (Mon, 01 Oct 2007) | 1 line moved get_base_channel() code from action_redirect to ast_channel_masquerade() for issue 7706 and BE-160 ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@84275 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-27Merged revisions 84018 via svnmerge from Dwayne M. Hubbard
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r84018 | dhubbard | 2007-09-27 18:12:25 -0500 (Thu, 27 Sep 2007) | 1 line if an Agent is redirected, the base channel should actually be redirected. This was causing multiple issues, especially issue 7706 and BE-160 ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@84019 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-22Add the MeetmeList and Reload manager commands, which supplement the need to ↵Tilghman Lesher
have Command privilege. (closes issue #10736) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@83532 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-19Merged revisions 83121 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r83121 | russell | 2007-09-19 10:10:14 -0500 (Wed, 19 Sep 2007) | 4 lines Fix up another potential race condition. Do the loop decrementing use count on events with the eventq protected from being changed. (reported on IRC by Ivan) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@83126 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-19Extend manager show connected with additional information.Joshua Colp
(closes issue #10757) Reported by: outtolunc Patches: manager.c.sessionstart.diff uploaded by outtolunc (license 237) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@83073 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-18(issue #10724)Jason Parker
Reported by: eliel Patches: res_features.c.patch uploaded by eliel (license 64) res_agi.c.patch uploaded by seanbright (license 71) res_musiconhold.c.patch uploaded by seanbright (license 71) pbx.c.patch uploaded by moy (license 222) logger.c.patch uploaded by moy (license 222) frame.c.patch uploaded by moy (license 222) manager.c.patch uploaded by moy (license 222) http.c.patch uploaded by moy (license 222) dnsmgr.c.patch uploaded by moy (license 222) res_realtime.c.patch uploaded by eliel (license 64) res_odbc.c.patch uploaded by seanbright (license 71) res_jabber.c.patch uploaded by eliel (license 64) chan_local.c.patch uploaded by eliel (license 64) chan_agent.c.patch uploaded by eliel (license 64) chan_alsa.c.patch uploaded by eliel (license 64) chan_features.c.patch uploaded by eliel (license 64) chan_sip.c.patch uploaded by eliel (license 64) RollUp.1.patch (includes all of the above patches) uploaded by seanbright (license 71) Convert many CLI commands to the NEW_CLI format. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82930 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-18Merged revisions 82867 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r82867 | russell | 2007-09-18 15:56:43 -0500 (Tue, 18 Sep 2007) | 10 lines Fix a memory leak that can occur on systems under higher load. The issue is that when events are appended to the master event queue, they use the number of active sessions as a use count so it will know when all active sessions at the time the event happened have consumed it. However, the handling of the number of sessions was not properly synchronized, so the use count was not always correct, causing an event to disappear early, or get stuck in the event queue for forever. (closes issue #9238, reported by bweschke, patch from Ivan, modified by me) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82868 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-11(closes issue #10695)Joshua Colp
Reported by: junky Patches: count_showconn.diff uploaded by junky (license 177) Provide a count of connected users to manager. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82232 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-29This code was in team/murf/bug8684-trunk; it should fix bug 8684 in trunk. I ↵Steve Murphy
didn't add it to 1.4 yet, because it's not entirely clear to me if this is a bug fix or an enhancement. A lot of files were affected by small changes like ast_variable_new getting an added arg, for the file name the var was defined in; ast_category_new gets added args of filename and lineno; ast_category and ast_variable structures now record file and lineno for each entry; a list of all #include and #execs in a config file (or any of its inclusions are now kept in the ast_config struct; at save time, each entry is put back into its proper file of origin, in order. #include and #exec directives are folded in properly. Headers indicating that the file was generated, are generated also for each included file. Some changes to main/manager.c to take care of file renaming, via the UpdateConfig command. Multiple inclusions of the same file are handled by exploding these into multiple include files, uniquely named. There's probably more, but I can't remember it right now. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81361 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-07Use the linkedlists.h macros for the manager action list.Joshua Colp
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78521 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-30Remove an XXX comment noting that it would be nice for a declaration to beRussell Bryant
inside of a function. (Yes, it would!) Replace it with a note that explains why it can't be done using the way that the AST_THREADSTORAGE macro is currently defined. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77790 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-26Do a massive conversion for using the ast_verb() macroRussell Bryant
(closes issue #10277, patches by mvanbaak) Basically, this changes ... if (option_verbose > 2) ast_verbose(VERBOSE_PREFIX_3, "Something\n"); to ... ast_verb(3, "Something\n"); git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77299 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-24Move manager users list over to an rwlist.Joshua Colp
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76712 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-23Don't bother calling AST_RWLIST_EMPTY on a list before AST_RWLIST_TRAVERSE, ↵Joshua Colp
it's just a double check. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76710 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-07-09Make sure the idText variable is empty, and put it in the right place for ↵Joshua Colp
the manager ack packet. (issue #10152 reported by srt) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@73932 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-02After some discussion on the asterisk-dev list, we determined that this approachRussell Bryant
for extracting application, function, manager, and agi documentation is the wrong one to take. The most severe problem is that the output depends on which modules are loaded as well as compile time options, which both determine which parts are available. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@72986 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-02Add a CLI command to dump the built-in manager action documentationRussell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@72928 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-02Merged revisions 72926 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r72926 | russell | 2007-07-02 13:18:46 -0500 (Mon, 02 Jul 2007) | 3 lines Remove a bogus comment and add proper locking to the handler function for the CLI command to show information on manager actions. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@72927 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-29Merge changes from team/russell/http_filetxferRussell Bryant
Handle transferring large files from the built-in http server. Previously, the code attempted to malloc a block as large as the file itself. Now it uses the sendfile() system call so that the file isn't copied into userspace at all if it is available. Otherwise, it just uses a read/write of small chunks at a time. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@72701 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-29Merged revisions 72556 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r72556 | tilghman | 2007-06-28 23:47:11 -0500 (Thu, 28 Jun 2007) | 2 lines Issue 10055 - Change memory allocation to use the heap for a command, since the output has the potential to overflow the stack (as it did here) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@72557 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-24Conversions to ast_debug()Russell Bryant
(issue #9984, patches from eliel and dimas) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@71338 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-24Merged revisions 71289 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r71289 | tilghman | 2007-06-24 12:39:34 -0500 (Sun, 24 Jun 2007) | 10 lines Merged revisions 71288 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r71288 | tilghman | 2007-06-24 12:32:21 -0500 (Sun, 24 Jun 2007) | 2 lines Issue 10043 - There is a legitimate need to be able to set variables to the empty string. ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@71290 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-21Add manager events for RTCP statistics.Jason Parker
Also adds a new "reporting" permission for manager, since it can be incredibly spammy. This permission was discussed on the -dev mailing list some months back. Issue 8613, patch by johann8384, with some minor changes by me. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@70961 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-14Couple of manager ssl options weren't loading because of a typo.Brett Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@69261 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-11Change displayconnects option in manager.conf to be per-user.Jason Parker
Issue 9932, patch by eliel git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@68831 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-11Add username completion for manager show user CLI command. (issue #9929 ↵Joshua Colp
reported by eliel) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@68663 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-07Fix a bunch of doxygen errors and document more thingsRussell Bryant
(issue #9842, snuffy) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@68339 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-06Minor formatting change to test closing mantis issues through commit tagsRussell Bryant
(closes issue #9828) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@67843 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-06Minor formatting change to test closing mantis issues through commit tagsRussell Bryant
(closes issue #9828) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@67842 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-05Make sure we default allowmultiplelogin to on/yes, per the default stated in ↵Jason Parker
the config. Issue 9885, patch by eliel. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@67398 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-24Add a new API call for creating detached threads. Then, go replace all of theRussell Bryant
places in the code where the same block of code for creating detached threads was replicated. (patch from bbryant) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@65968 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-24Merged revisions 65902 via svnmerge from Joshua Colp
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r65902 | file | 2007-05-24 11:27:23 -0400 (Thu, 24 May 2007) | 2 lines Add the ability to blacklist certain commands from being executed using the Command AMI action. (issue #9240 reported by junky) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@65905 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-17Add an option that lets you only allow one connection at a time for eachRussell Bryant
manager user. (issue #8664, reported and original patch by ssokol, patch updated by bkruse, and further updated by me) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@64786 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-11Merged revisions 63982 via svnmerge from Jason Parker
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r63982 | qwell | 2007-05-11 15:16:17 -0500 (Fri, 11 May 2007) | 7 lines Hide manager password from "manager show user foo". I realize that there are other ways to get this, but we really don't need to just show it in plain text so easily. Issue 9273, patch by junky ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@63983 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-11Merged revisions 63886 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r63886 | russell | 2007-05-11 11:05:43 -0500 (Fri, 11 May 2007) | 6 lines When MD5 authentication is not possible because there is no challenge present, either because the Challenge action was never issued, or some other reason, give a proper error message and return an error instead of claiming that the user wasn't found. (reported by jsmith on IRC) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@63902 65c4cc65-6c06-0410-ace0-fbb531ad65f3