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: http://svn.digium.com/svn/asterisk/trunk@72701 f38db490-d61c-443f-a65b-d21fe96a405b
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: http://svn.digium.com/svn/asterisk/trunk@70961 f38db490-d61c-443f-a65b-d21fe96a405b
places in the code where the same block of code for creating detached threads
was replicated. (patch from bbryant)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@65968 f38db490-d61c-443f-a65b-d21fe96a405b
manager user. (issue #8664, reported and original patch by ssokol, patch
updated by bkruse, and further updated by me)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@64786 f38db490-d61c-443f-a65b-d21fe96a405b
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: http://svn.digium.com/svn/asterisk/trunk@63983 f38db490-d61c-443f-a65b-d21fe96a405b
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: http://svn.digium.com/svn/asterisk/trunk@63902 f38db490-d61c-443f-a65b-d21fe96a405b
- Add missing option to options.h
- Add missing variables to asterisk.h
- Move manager version to manager.h include file
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@63030 f38db490-d61c-443f-a65b-d21fe96a405b
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r61787 | russell | 2007-04-24 16:34:53 -0500 (Tue, 24 Apr 2007) | 12 lines
Merged revisions 61786 via svnmerge from
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/trunk@61788 f38db490-d61c-443f-a65b-d21fe96a405b
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r60603 | russell | 2007-04-06 15:58:43 -0500 (Fri, 06 Apr 2007) | 13 lines
To be able to achieve the things that we would like to achieve with the
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/trunk@60604 f38db490-d61c-443f-a65b-d21fe96a405b
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r60137 | russell | 2007-04-04 12:40:10 -0500 (Wed, 04 Apr 2007) | 14 lines
Merged revisions 60134 via svnmerge from
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/trunk@60141 f38db490-d61c-443f-a65b-d21fe96a405b
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r58165 | russell | 2007-03-06 18:25:19 -0600 (Tue, 06 Mar 2007) | 12 lines
Merged revisions 58164 via svnmerge from
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/trunk@58166 f38db490-d61c-443f-a65b-d21fe96a405b
performance of the GUI. This encodes the configuration into the JSON format
in a manager header, "JSON: ". The encoded information can be directly used
as a javascript object, so no parsing is needed. For large configuration
files, this can greatly improve loading times in the GUI. Furthermore, the
encoding takes up a lot less space when being transmitted than the other
alternatives. (Inspired by discussion with Pari)
Here is an example of what you get:
http://localhost:8088/asterisk/rawman?action=getconfigjson&filename=users.conf
Response: Success
JSON: {"general":["hasvoicemail=yes"],"6000":["fullname=russell","secret=1234"]}
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@56323 f38db490-d61c-443f-a65b-d21fe96a405b
- changing the actionlock to a rwlock
- not locking the session before doing the action callback
The crash issue in 8711 should not be an issue here.
Merged revisions 52611 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r52611 | russell | 2007-01-29 14:39:20 -0600 (Mon, 29 Jan 2007) | 10 lines
The session lock can not be held while calling action callbacks. If so, then
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/trunk@52613 f38db490-d61c-443f-a65b-d21fe96a405b
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r51781 | russell | 2007-01-23 16:04:01 -0600 (Tue, 23 Jan 2007) | 6 lines
Fix some bugs in process_message(). The manager session lock needs to be held
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/trunk@51787 f38db490-d61c-443f-a65b-d21fe96a405b
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r51750 | russell | 2007-01-23 15:33:15 -0600 (Tue, 23 Jan 2007) | 4 lines
When traversing the list of manager actions, the iterator needs to be
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/trunk@51751 f38db490-d61c-443f-a65b-d21fe96a405b
has been found so that 'cat' is non-NULL. This way, users.conf is only checked
when necessary. (issue #8852, akohlsmith, committed patch a bit different)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@51296 f38db490-d61c-443f-a65b-d21fe96a405b
attention to the "hasmanager" option.
(Thanks to Anthony L. for pointing out that this was broken!)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@51247 f38db490-d61c-443f-a65b-d21fe96a405b