summaryrefslogtreecommitdiff
path: root/main/dns.c
AgeCommit message (Collapse)Author
2017-12-22Remove as much trailing whitespace as possible.Sean Bright
Change-Id: I873c1c6d00f447269bd841494459efccdd2c19c0
2014-08-21Clean up files that do not end with newlinesMatthew Jordan
Trivial patch to add new lines to several files missing them. This fixes warnings when compiling with gcc 4.1.2 on CentOS 5. ASTERISK-24245 #close Reported by: Shaun Ruffell patches: 0002-Trivial-addition-of-newlines-at-end-of-three-files.patch uploaded by Shaun Ruffell (License 5417) ........ Merged revisions 421677 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@421678 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-17res_pjsip: Enable PJSIP DNS client support.Joshua Colp
This change enables DNS client support within PJSIP. System nameservers are automatically discovered using res_init or res_ninit. If this fails then PJSIP will resort to using gethostbyname for resolution. By enabling this support we gain SRV support, failover, and weight support. (closes issue ASTERISK-23435) Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/3343/ ........ Merged revisions 410795 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410796 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-14Remove redundant code in dns.cMatthew Jordan
Peter J Philipp pointed out that there are two checks that ensure that len is not less than 0. If len is less than 0, the function returns. Having both of them is clearly redundant. This removes the second and attempts to clarify (slightly) the error condition. (closes issue ASTERISK-21772) Reported by: Peter J Philipp git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394305 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-15Multiple revisions 369001-369002Kevin P. Fleming
........ r369001 | kpfleming | 2012-06-15 10:56:08 -0500 (Fri, 15 Jun 2012) | 11 lines Add support-level indications to many more source files. Since we now have tools that scan through the source tree looking for files with specific support levels, we need to ensure that every file that is a component of a 'core' or 'extended' module (or the main Asterisk binary) is explicitly marked with its support level. This patch adds support-level indications to many more source files in tree, but avoids adding them to third-party libraries that are included in the tree and to source files that don't end up involved in Asterisk itself. ........ r369002 | kpfleming | 2012-06-15 10:57:14 -0500 (Fri, 15 Jun 2012) | 3 lines Add a script to enable finding source files without support-levels defined. ........ Merged revisions 369001-369002 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 369005 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369013 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-22Kill off red blobs in most of main/*Kinsey Moore
Everything still compiled after making these changes, so I assume these whitespace-only changes didn't break anything (and shouldn't have). git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@360190 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-08Fix a few compilation problems found when building Asterisk against uClibc.Sean Bright
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@205214 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-29incorporates r159808 from branches/1.4:Kevin P. Fleming
------------------------------------------------------------------------ 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-07-08Fix a bug in SRV lookups where dnsmgr would discard everything but the Brett Bryant
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-04-01Merged revisions 112138 via svnmerge from Mark Michelson
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r112138 | mmichelson | 2008-04-01 12:21:21 -0500 (Tue, 01 Apr 2008) | 10 lines Initialize the __res_state structure used for dns purposes to all 0's prior to using it. This is due to valgrind's complaints on issue #12284 as well as an excerpt found in "Description" portion of the online man page found here: http://www.iti.cs.tu-bs.de/cgi-bin/UNIXhelp/man-cgi?res_nquery+3RESOLV (pertains to issue #12284 but does not necessarily close it) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@112148 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-04Whitespace changes onlyTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@105840 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-21remove a bunch of useless #include "options.h"Luigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89511 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-19another bunch of include removals (errno.h and asterisk/logger.h)Luigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89425 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-17fix breakage induced by previous mistakeLuigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89382 65c4cc65-6c06-0410-ace0-fbb531ad65f3
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-09-04Merged revisions 81435 via svnmerge from Joshua Colp
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r81435 | file | 2007-09-04 10:10:56 -0300 (Tue, 04 Sep 2007) | 7 lines (closes issue #10610) Reported by: john Patches: dns.c.patch uploaded by john (license 218) Tested by: mvanbaak Don't return a match if no SRV record actually exists. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81436 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-16Merged revisions 75306 via svnmerge from Kevin P. Fleming
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r75306 | kpfleming | 2007-07-16 15:53:24 -0500 (Mon, 16 Jul 2007) | 11 lines Merged revisions 75304 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r75304 | kpfleming | 2007-07-16 15:46:58 -0500 (Mon, 16 Jul 2007) | 3 lines provide proper copyright/license attribution for this structure that was copied from a BSD-licensed header file long, long ago... ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75307 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-10Merged revisions 74388 via svnmerge from Jason Parker
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r74388 | qwell | 2007-07-10 14:10:36 -0500 (Tue, 10 Jul 2007) | 4 lines Don't use #if to check if something is defined - use #ifdef instead. Pointed out by kpfleming ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@74390 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-10Merged revisions 74374 via svnmerge from Jason Parker
https://origsvn.digium.com/svn/asterisk/branches/1.4 (closes issue #10133) ................ r74374 | qwell | 2007-07-10 13:39:30 -0500 (Tue, 10 Jul 2007) | 13 lines Merged revisions 74373 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r74373 | qwell | 2007-07-10 13:37:23 -0500 (Tue, 10 Jul 2007) | 5 lines Use res_ndestroy on systems that have it. Otherwise, use res_nclose. This prevents a memleak on NetBSD - and possibly others. Issue 10133, patch by me, reported and tested by scw ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@74375 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-14Add a massive set of changes for converting to use the ast_debug() macro.Russell Bryant
(issue #9957, patches from mvanbaak, caio1982, critch, and dimas) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@69327 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-21Return trunk to a state where it compiles under Darwin. The byte order stuff ↵Joshua Colp
is ugly, if anyone wants to clean it up... by all means do so. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@55763 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-03bug #8076 check option_debug before printing to debug channel.Matt O'Gorman
patch provided in bugnote, with minor changes. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44253 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-21merge new_loader_completion branch, including (at least):Kevin P. Fleming
- 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