mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
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
This commit is contained in:
@@ -31,6 +31,25 @@
|
||||
no provisions for retrying or failover between records.
|
||||
*/
|
||||
|
||||
/*!\brief An opaque type, for lookup usage */
|
||||
struct srv_context;
|
||||
|
||||
/*!\brief Retrieve set of SRV lookups, in order
|
||||
* \param[in] context A pointer in which to hold the result
|
||||
* \param[in] service The service name to look up
|
||||
* \param[out] host Result host
|
||||
* \param[out] port Associated TCP portnum
|
||||
* \retval -1 Query failed
|
||||
* \retval 0 Result exists in host and port
|
||||
* \retval 1 No more results
|
||||
*/
|
||||
extern int ast_srv_lookup(struct srv_context **context, const char *service, const char **host, unsigned short *port);
|
||||
|
||||
/*!\brief Cleanup resources associated with ast_srv_lookup
|
||||
* \param context Pointer passed into ast_srv_lookup
|
||||
*/
|
||||
void ast_srv_cleanup(struct srv_context **context);
|
||||
|
||||
/*! Lookup entry in SRV records Returns 1 if found, 0 if not found, -1 on hangup
|
||||
Only do SRV record lookup if you get a domain without a port. If you get a port #, it's a DNS host name.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user