Commit Graph

33 Commits

Author SHA1 Message Date
Terry Wilson 401b8bea76 Use Mark's new ast_str_case_hash function instead of jumping through hoops to do insensitive case lookups
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@156916 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-14 17:29:05 +00:00
Doug Bailey 7afa3746c3 Add LINEKEYS variable to allow for a user to set the number of keys assigned to a line on a polycom phone
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@155934 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-11 16:46:17 +00:00
Sean Bright 30d1744ffc Add ability to pass arbitrary data to the ao2_callback_fn (called from
ao2_callback and ao2_find).  Currently, passing OBJ_POINTER to either
of these mandates that the passed 'arg' is a hashable object, making
searching for an ao2 object based on outside criteria difficult.

Reviewed by Russell and Mark M. via ReviewBoard:
    http://reviewboard.digium.com/r/36/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@155401 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-07 22:39:30 +00:00
Kevin P. Fleming bd4eb070f3 bring over all the fixes for the warnings found by gcc 4.3.x from the 1.4 branch, and add the ones needed for all the new code here too
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@153616 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-02 18:52:13 +00:00
Terry Wilson c9fbf2eec5 func_strings isn't a dependency of this module anymore
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@150118 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-16 15:41:40 +00:00
Kevin P. Fleming 33c9f5c8c1 inter-module dependencies should be included in the source code, not just in sample config files
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@149920 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-16 08:56:35 +00:00
Kevin P. Fleming 18609210ba correct file name in message
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@149918 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-16 08:31:13 +00:00
Terry Wilson 23aeccbbbb Make phoneprov case-insensitive to remove the func_strings dependency of the default config
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@147854 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-09 17:04:11 +00:00
Doug Bailey 946c796f9e Blanch the 404 error message for those with no sense of humor
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@144314 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-24 22:05:44 +00:00
Tilghman Lesher 08af5bb312 Create a new config file status, CONFIG_STATUS_FILEINVALID for differentiating
when a file is invalid from when a file is missing.  This is most important when
we have two configuration files.  Consider the following example:

Old system:
sip.conf     users.conf     Old result               New result
========     ==========     ==========               ==========
Missing      Missing        SIP doesn't load         SIP doesn't load
Missing      OK             SIP doesn't load         SIP doesn't load
Missing      Invalid        SIP doesn't load         SIP doesn't load
OK           Missing        SIP loads                SIP loads
OK           OK             SIP loads                SIP loads
OK           Invalid        SIP loads incompletely   SIP doesn't load
Invalid      Missing        SIP doesn't load         SIP doesn't load
Invalid      OK             SIP doesn't load         SIP doesn't load
Invalid      Invalid        SIP doesn't load         SIP doesn't load

So in the case when users.conf doesn't load because there's a typo that
disrupts the syntax, we may only partially load users, instead of failing with
an error, which may cause some calls not to get processed.  Worse yet, the old
system would do this with no indication that anything was even wrong.

(closes issue #10690)
 Reported by: dtyoo
 Patches: 
       20080716__bug10690.diff.txt uploaded by Corydon76 (license 14)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@142992 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-12 23:30:03 +00:00
Mark Michelson 5dfefa5ee6 Merged revisions 140488 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r140488 | mmichelson | 2008-08-29 12:34:17 -0500 (Fri, 29 Aug 2008) | 22 lines

After working on the ao2_containers branch, I noticed
something a bit strange. In all cases where we provide
a callback function to ao2_container_alloc, the callback
function would only return 0 or CMP_MATCH. After inspecting
the ao2_callback() code carefully, I found that if you're
only looking for one specific item, then you should return
CMP_MATCH | CMP_STOP. Otherwise, astobj2 will continue
traversing the current bucket until the end searching for
more matches.

In cases like chan_iax2 where in 1.4, all the peers are
shoved into a single bucket, this makes for potentially
terrible performance since the entire bucket will be
traversed even if the peer is one of the first ones come
across in the bucket.

All the changes I have made were for cases where the 
callback function defined was passed to ao2_container_alloc
so that calls to ao2_find could find a unique instance
of whatever object was being stored in the container.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@140489 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-29 17:47:17 +00:00
Sean Bright 357bf3e90b All of the res/ stuff (other than res_jabber) from the RSW branch.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@137028 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-10 00:47:56 +00:00
Terry Wilson 91de4e9cea Need a new buffer for each loop
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114127 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-14 19:58:52 +00:00
Terry Wilson 6d34b5fafe Don't unref user twice on failure. Also, when adding sorted list of users, it is best to check the entry already in the list for a "next" entry instead of the newly created entry...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114124 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-14 19:12:27 +00:00
Terry Wilson ef8007f630 Make sure that ${LINE} is set even if linenumber is not set in users.conf
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114080 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-11 22:23:34 +00:00
Terry Wilson e276ccea11 Fix the fact that global_variables 1) weren't being updated on reload (thanks for the report, Doug), and 2) weren't actually being appended to the list of profile variables because build_profile was called before the list was populated. Also needed to free the contents returned by load_file().
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114067 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-11 21:04:46 +00:00
Terry Wilson c36e37aa6f atoi(NULL) is bad
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@113170 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-07 18:57:21 +00:00
Terry Wilson 75c6945d92 Clean up some memory leak/ref counting issues
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@112939 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-05 07:58:42 +00:00
Terry Wilson 2abff11905 Multi-line support for phoneprov
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@112906 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-05 04:59:25 +00:00
Terry Wilson 1eb31edde2 Re-add HTTP post support by moving to res_http_post.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@112426 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-02 15:25:48 +00:00
Kevin P. Fleming 521b193eff ensure that res_phoneprov's HTTP handler tells the dispatcher what method it can handle
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109926 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-19 16:21:36 +00:00
Kevin P. Fleming e191b51a08 start the process of changing HTTP request dispatching to do it based on *both* URI and method, so that POST support can move into a module; move http.c's private function prototypes into _private.h
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109762 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-18 22:32:26 +00:00
Terry Wilson b02bc230af Go through and fix a bunch of places where character strings were being interpreted as format strings. Most of these changes are solely to make compiling with -Wsecurity and -Wformat=2 happy, and were not
actual problems, per se.  I also added format attributes to any printf wrapper functions I found that didn't have them.  -Wsecurity and -Wmissing-format-attribute added to --enable-dev-mode.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109447 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-18 15:43:34 +00:00
Russell Bryant 8bbef5f996 Rename ast_tcptls_server_instance to session_instance, since this pertains to
server and client usage.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108295 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-12 22:13:18 +00:00
Russell Bryant efb1e30a38 Rename public object server_instance to ast_tcptls_server_instance
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@105773 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-04 22:15:18 +00:00
Terry Wilson 7bf9f46774 Set username to default to the category name if it isn't overridden by a usernmae= setting in users.conf
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@105733 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-04 20:32:55 +00:00
Russell Bryant 910b9f8a2c fix this module, too
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@104260 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-26 20:30:50 +00:00
Jason Parker 72bc8a7c7d Fix up some doxygen issues.
(closes issue #11996)
Patches:
      bug_11996_doxygen.diff uploaded by snuffy (license 35)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103723 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-15 17:29:08 +00:00
Jason Parker e88241c45b Merged revisions 100138 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r100138 | qwell | 2008-01-24 10:41:29 -0600 (Thu, 24 Jan 2008) | 6 lines

Fix compilation on Solaris.

(closes issue #11832)
Patches:
      bug-11832.diff uploaded by snuffy (license 35)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@100139 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-24 16:47:10 +00:00
Terry Wilson 417c6dcb1d Update res_phoneprov to default to setting the SERVER variable to the IP
the HTTP request for the config came in on and the SERVER_PORT to the
bindport setting in sip.conf.  I've left in the ability to override these
options, because I can't always guess how someone might decide to do something
weird with what is available to them--although needing to is pretty unlikely.

Documentation was updated to reflect preference for not setting serveraddr,
serveriface, or serverport.  Tested on Linux and OS X.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98988 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-17 03:09:32 +00:00
Terry Wilson 3e9ed0d40b Make users list static
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98962 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-16 16:06:06 +00:00
Terry Wilson 84e25e15cf Attempt at making lookup_iface work under FreeBSD. Not yet tested, but it compiles under OS X. And still works under linux.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@97653 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-10 00:22:50 +00:00
Terry Wilson 3570ad103d Added a new module, res_phoneprov, which allows auto-provisioning of phones
based on configuration templates that use Asterisk dialplan function and
variable substitution.  It should be possible to create phone profiles and
templates that work for the majority of phones provisioned over http. It
is currently only intended to provision a single user account per phone.
An example profile and set of templates for Polycom phones is provided.
NOTE: Polycom firmware is not included, but should be placed in
AST_DATA_DIR/phoneprov/configs to match up with the included templates.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@97634 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-09 21:37:26 +00:00