Commit Graph

18 Commits

Author SHA1 Message Date
Richard Mudgett 9d8943868c Merged revisions 321392 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r321392 | rmudgett | 2011-05-27 18:45:41 -0500 (Fri, 27 May 2011) | 12 lines

  Crash when using hagi and no servers are available.

  When none of the servers returned by the SRV querey respond, asterisk
  crashes.  The problem is that if the loop over all the SRV entries
  finishes then the srv_context has already been cleaned up.

  * Make ast_srv_cleanup() check to see if the context is already cleaned
  up.

  (closes issue #19256)
  Reported by: byronclark
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@321393 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-27 23:46:07 +00:00
Olle Johansson 5a1ed1f070 Formatting changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@277102 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-16 13:32:22 +00:00
Mark Michelson 6cad0f1602 func_srv and explicit specification of a remote IP for SIP.
From Review Board:
There are two interrelated changes here.

First, there is the introduction of func_srv. This adds two new read-only
dialplan functions, SRVQUERY and SRVRESULT. They work very similarly to the
ENUMQUERY and ENUMRESULT functions, except that this allows one to query SRV
records instead. In order to facilitate this work, I added a couple of new API
calls to srv.h. ast_srv_get_record_count tells the number of records returned
by an SRV lookup. This number is calculated at the time of the SRV lookup.
ast_srv_get_nth_record allows one to get a numbered SRV record.

Second, there is the modification to chan_sip that allows one to specify a
hostname or IP address (along with a port) to send an outgoing INVITE to when
dialing a SIP peer. This goes hand-in-hand with func_srv. You can query SRV
records and then use the host and port from the results to dial via a specific
host instead of what is configured in sip.conf.

Review: https://reviewboard.asterisk.org/r/608
SWP-1200



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@256485 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-04-09 14:37:50 +00:00
Tilghman Lesher 49bf540c71 Create iterative method for querying SRV results, and use that for finding AGI servers.
(closes issue #14775)
 Reported by: _brent_
 Patches: 
       20091215__issue14775.diff.txt uploaded by tilghman (license 14)
       hagi-5.patch uploaded by brent (license 388)
 Tested by: _brent_
 Reviewboard: https://reviewboard.asterisk.org/r/378/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@241188 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-19 00:28:49 +00:00
Mark Michelson 1aa7233f0c bump the verbosity of a message in srv.c up by one. It used to be
at this level prior to a large patch merge which converted ast_verbose
calls to ast_verb

(closes issue #14221)
Reported by: jcovert
Patches:
      srv.c.patch uploaded by jcovert (license 551)




git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@168523 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-12 23:12:30 +00:00
Kevin P. Fleming 887e28d7aa incorporates r159808 from branches/1.4:
------------------------------------------------------------------------
r159808 | kpfleming | 2008-11-29 10:58:29 -0600 (Sat, 29 Nov 2008) | 7 lines

update dev-mode compiler flags to match the ones used by default on Ubuntu Intrepid, so all developers will see the same warnings and errors

since this branch already had some printf format attributes, enable checking for them and tag functions that didn't have them

format attributes in a consistent way


------------------------------------------------------------------------

in addition:

move some format attributes from main/utils.c to the header files they belong in, and fix up references to the relevant functions based on new compiler warnings



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@159818 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-29 17:57:39 +00:00
Brett Bryant 52e8897977 Fix a bug in SRV lookups where dnsmgr would discard everything but the
first SRV result from DNS before processing weights and priorities and 
dns_parse_answer wouldn't report that there were no records in DNS 
unless a failure occured. Also fixed a bug where dnsmgr_refresh would 
report that a entry was being changed when ast_gethostbyname had failed.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@129156 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-08 21:00:01 +00:00
Tilghman Lesher d5b454bf8d Convert ast_verbose to ast_verb.
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-14 14:48:38 +00:00
Luigi Rizzo e0ff5fef5c remove a bunch of useless #include "options.h"
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89511 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-21 23:09:02 +00:00
Luigi Rizzo 9335ace850 another bunch of include removals (errno.h and asterisk/logger.h)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89425 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-19 19:09:03 +00:00
Luigi Rizzo fdb7f7ba3d Start untangling header inclusion in a way that does not affect
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-16 20:04:58 +00:00
Joshua Colp 7d561b994c Merged revisions 89260 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89260 | file | 2007-11-13 21:15:12 -0400 (Tue, 13 Nov 2007) | 4 lines

Return the proper value when the srv_callback function executes properly.
(closes issue #11240)
Reported by: jtodd

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89262 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-14 01:16:50 +00:00
Kevin P. Fleming c18691dec0 Merged revisions 89105 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89105 | kpfleming | 2007-11-08 00:26:47 -0500 (Thu, 08 Nov 2007) | 2 lines

fix a glaring bug in the new SRV record handling that would cause incorrect weight sorting

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89107 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-08 05:36:28 +00:00
Kevin P. Fleming edc78d6023 improve linked-list macros in two ways:
- 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-11-08 05:28:47 +00:00
Russell Bryant aecb21e822 Merged revisions 88719 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r88719 | russell | 2007-11-05 14:40:01 -0600 (Mon, 05 Nov 2007) | 7 lines

Merge changes from asterisk/team/kpfleming/SRV-priority-handling

Previously, the SRV record support in Asterisk was broken.  There was no
guarantee on what record Asterisk would choose to actually use.  This set of
changes improves the situation by ensuring that Asterisk will choose the
highest priority record.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@88740 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-05 20:44:05 +00:00
Russell Bryant f8483a0d04 Do a massive conversion for using the ast_verb() macro
(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-26 15:49:18 +00:00
Kevin P. Fleming 74f31a51bc add -Wundef to the --enable-dev-mode flags, so that mistyped macro names in #if expressions will be caught
convert various #if expressions to #ifdef for macros that may not be defined (and where the value is not important)
Note: two of these changes are in bison generated files which is going to be inconvenient when they are regenerated


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@55329 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-18 15:03:42 +00:00
Kevin P. Fleming 0a27d8bfe5 merge new_loader_completion branch, including (at least):
- 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: https://origsvn.digium.com/svn/asterisk/trunk@40722 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-21 02:11:39 +00:00