aboutsummaryrefslogtreecommitdiffstats
path: root/main/manager.c
AgeCommit message (Collapse)AuthorFilesLines
2007-07-02Remove a bogus comment and add proper locking to the handler function for therussell1-1/+2
CLI command to show information on manager actions. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@72926 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-29Issue 10055 - Change memory allocation to use the heap for a command, since ↵tilghman1-8/+17
the output has the potential to overflow the stack (as it did here) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@72556 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-24Merged revisions 71288 via svnmerge from tilghman1-6/+1
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: http://svn.digium.com/svn/asterisk/branches/1.4@71289 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-24Add the ability to blacklist certain commands from being executed using the ↵file1-1/+13
Command AMI action. (issue #9240 reported by junky) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@65902 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-11Hide manager password from "manager show user foo".qwell1-1/+1
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: http://svn.digium.com/svn/asterisk/branches/1.4@63982 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-11When MD5 authentication is not possible because there is no challenge present,russell1-0/+5
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: http://svn.digium.com/svn/asterisk/branches/1.4@63886 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-10Strip terminal escape sequences from CLI command output that is going to berussell1-3/+7
sent out over the manager interface. (issue #9659, reported by pari, fixed by me) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@63804 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-02Backport the change that only went in to trunk that fixes the command managerrussell1-1/+14
action over http. (reported internally by pari and bkruse) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@62739 f38db490-d61c-443f-a65b-d21fe96a405b
2007-04-27Issue #9608 - fix some annoying DEBUG messages not controlled by ↵oej1-1/+2
option_debug (DEA). Thanks! git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@62095 f38db490-d61c-443f-a65b-d21fe96a405b
2007-04-24Merged revisions 61786 via svnmerge from russell1-1/+2
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r61786 | russell | 2007-04-24 16:33:59 -0500 (Tue, 24 Apr 2007) | 4 lines Don't crash if a manager connection provides a username that exists in manager.conf but does not have a password, and also requests MD5 authentication. (ASA-2007-012) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@61787 f38db490-d61c-443f-a65b-d21fe96a405b
2007-04-20Fix the UpdateConfig manager action to properly treat "variables" and "objects"russell1-2/+8
differently (a=b versus a=>b). (issue #9568, reported by pari, patch by me) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@61690 f38db490-d61c-443f-a65b-d21fe96a405b
2007-04-19Bug 9557 - simple reason why reading a function always returned NULLtilghman1-1/+2
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@61683 f38db490-d61c-443f-a65b-d21fe96a405b
2007-04-06To be able to achieve the things that we would like to achieve with therussell1-0/+37
Asterisk GUI project, we need a fully functional HTTP interface with access to the Asterisk manager interface. One of the things that was intended to be a part of this system, but was never actually implemented, was the ability for the GUI to be able to upload files to Asterisk. So, this commit adds this in the most minimally invasive way that we could come up with. A lot of work on minimime was done by Steve Murphy. He fixed a lot of bugs in the parser, and updated it to be thread-safe. The ability to check permissions of active manager sessions was added by Dwayne Hubbard. Then, hacking this all together and do doing the modifications necessary to the HTTP interface was done by me. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@60603 f38db490-d61c-443f-a65b-d21fe96a405b
2007-04-04Merged revisions 60134 via svnmerge from russell1-2/+2
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r60134 | russell | 2007-04-04 12:38:47 -0500 (Wed, 04 Apr 2007) | 6 lines It is valid to redirect channels via the manager interface that are not in the UP state. Instead of checking for that to prevent to ensure a dead channel doesn't get redirected, just use the ast_check_hangup() API call. (issue #9457, reported by Callmewind, patch by me) (related to issue #8977) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@60137 f38db490-d61c-443f-a65b-d21fe96a405b
2007-03-07Merged revisions 58164 via svnmerge from russell1-0/+11
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r58164 | russell | 2007-03-06 18:20:13 -0600 (Tue, 06 Mar 2007) | 4 lines If the channels acquired using the manager Redirect action are not up, then don't attempt to do anything with them. It could lead to weird behavior, including crashes. (issue #8977) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@58165 f38db490-d61c-443f-a65b-d21fe96a405b
2007-02-06Merged revisions 53245 via svnmerge from tilghman1-1/+1
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r53245 | tilghman | 2007-02-06 00:58:28 -0600 (Tue, 06 Feb 2007) | 2 lines Issue 8987 - Status could return two responses (mnicholson) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@53246 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-31Merged revisions 53045 via svnmerge from russell1-0/+1
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r53045 | russell | 2007-01-31 15:25:11 -0600 (Wed, 31 Jan 2007) | 3 lines Fix a bunch of places where pthread_attr_init() was called, but pthread_attr_destroy() was not. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@53046 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-29Remove a recursive lock of the manager session. This was pointed out by russell1-2/+0
zandbelt in issue #8711. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@52688 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-29The session lock can not be held while calling action callbacks. If so, thenrussell1-40/+33
when the WaitEvent callback gets called, then no event can happen because the session can't be locked by another thread. Also, the session needs to be locked in the HTTP callback when it reads out the output string. This fixes the deadlock reported in both 8711 and 8934. Regarding issue 8711, there still may be an issue. If there is a second action requested before the processing of the first action is finished, there could still be some corruption of the output string buffer used to build the result. (issue #8711, #8934) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@52611 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-27Have the manager interface send back an "Already logged in" message instead ↵file1-13/+20
of "Invalid/Unknown Command" when the client authenticates for a second time. (issue #8509 reported by pari) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@52373 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-23Fix some bugs in process_message(). The manager session lock needs to be heldrussell1-0/+12
when sending some sort of response, or calling one of the manager action callbacks. This resolves an issue where people using the GUI would get random crashes when they start clicking around a lot. (issue #8711, reported and debugged by zandbelt) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@51781 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-23When traversing the list of manager actions, the iterator needs to berussell1-21/+22
initialized to the list head *after* locking the list. Also, lock the actions list in one place it is being accessed where it was not being done. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@51750 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-18Make the "hasmanager" option in users.conf actually have an effect.russell1-0/+34
(issue #8740, LnxPrgr3) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@51233 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-15Move event processing into do_message so that it gets executed again when ↵file1-7/+6
events are tripped. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@50895 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-12We need to check for res being 0 in do_message itself, otherwise our headers ↵file1-4/+4
will get lost. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@50602 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-05ast_func_read() needs a writable copy of the function name to be passedkpfleming1-1/+3
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@49710 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-05don't 'consume' the params list before we try to use it againkpfleming1-3/+3
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@49680 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-05reduce stack consumption for AMI and AMI/HTTP requests by nearly 20K in most ↵kpfleming1-139/+149
cases git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@49676 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-27since these variables all have static duration, none of them need ↵kpfleming1-5/+5
initializers (they default to zero anyway) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@49006 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-07Here lies the fixes that killed bug 8423 -- OriginateSuccess and ↵murf1-6/+9
OriginateError incomplete channel name. May it rest in peace. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@48349 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-27Remove a couple of unused variables (issue #8380, casper)russell1-12/+0
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@48046 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-02Reverse change of "show" to "list" and make several other commands more ↵tilghman1-8/+8
consistent with "category verb arguments" git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@47051 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-26Fix config comment code preservation code (thanks murf!)markster1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@46287 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-12fix a silly typo in a comment that I saw while reading the commit listrussell1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@44945 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-12append_event must be called while holding the session locknadi1-2/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@44921 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-06make sure sockets are blocking when they should be blocking.rizzo1-0/+3
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@44567 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-04update thread creation code a bitkpfleming1-2/+2
reduce standard thread stack size slightly to allow the pthreads library to allocate the stack+data and not overflow a power-of-2 allocation in the kernel and waste memory/address space add a new stack size for 'background' threads (those that don't handle PBX calls) when LOW_MEMORY is defined git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@44378 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-20Constify the result of a config retrieval function, to avoid mutilation ↵tilghman1-4/+5
(issue 7983). git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43364 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-19Commit the changes from issue #5240.qwell1-2/+195
Original patch by junky, modified by anthonyl, modified again by jcolp (with minor modifications by me) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43300 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-19After discussing this with other people, we decided we'd like to try to do ↵qwell1-327/+153
this a little differently. Stay tuned. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43290 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-195240 updateanthonyl1-153/+327
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43289 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-18merge qwell's CLI verbification workkpfleming1-23/+42
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43212 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-16merge markster's usersconf branch with some slight changeskpfleming1-0/+7
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43052 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-21- simplify and improve astmm by using thread storage instead of a dynamicrussell1-152/+119
allocation and free on every call of the function for preparing the string that will be appended. Then, use the ast_dynamic_str() code instead of the open coded version that is appended to when waiting for it to be delivered. - use for loops for list traversals - convert the manager sessions list to use list macros - use atomic operations for num_sessions and usecounts - convert some defines to the equivalent enum git-svn-id: http://svn.digium.com/svn/asterisk/trunk@40783 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-21merge new_loader_completion branch, including (at least):kpfleming1-0/+2630
- restructured build tree and makefiles to eliminate recursion problems - support for embedded modules - support for static builds - simpler cross-compilation support - simpler module/loader interface (no exported symbols) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@40722 f38db490-d61c-443f-a65b-d21fe96a405b