summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2011-11-23 23:03:32 +0000
committerRichard Mudgett <rmudgett@digium.com>2011-11-23 23:03:32 +0000
commit7d9ba4875baa4b50522627c38e271e5574deb0ac (patch)
tree2158e70a49eae0974541a790dba3690c4dd1a8d8 /include
parent2ee874178ef8a1a109ee31fe23e10707387f255b (diff)
Fix calls to ast_get_ip() not initializing the address family.
........ Merged revisions 346239 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 346240 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@346241 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/acl.h25
1 files changed, 14 insertions, 11 deletions
diff --git a/include/asterisk/acl.h b/include/asterisk/acl.h
index 973a3d0c2..1576aef11 100644
--- a/include/asterisk/acl.h
+++ b/include/asterisk/acl.h
@@ -123,36 +123,39 @@ int ast_apply_ha(const struct ast_ha *ha, const struct ast_sockaddr *addr);
* \details
* Similar in nature to ast_gethostbyname, except that instead
* of getting an entire hostent structure, you instead are given
- * only the IP address inserted into a sockaddr_in structure.
+ * only the IP address inserted into a ast_sockaddr structure.
+ *
+ * \param addr The IP address found. The address family is used
+ * as an input parameter to filter the returned addresses. If
+ * it is 0, both IPv4 and IPv6 addresses can be returned.
+ * \param hostname The hostname to look up
*
- * \param[out] addr The IP address is written into sin->sin_addr
- * \param value The hostname to look up
* \retval 0 Success
* \retval -1 Failure
*/
-int ast_get_ip(struct ast_sockaddr *addr, const char *value);
+int ast_get_ip(struct ast_sockaddr *addr, const char *hostname);
/*!
* \brief Get the IP address given a hostname and optional service
*
* \details
* If the service parameter is non-NULL, then an SRV lookup will be made by
- * prepending the service to the value parameter, separated by a '.'
- * For example, if value is "example.com" and service is "_sip._udp" then
+ * prepending the service to the hostname parameter, separated by a '.'
+ * For example, if hostname is "example.com" and service is "_sip._udp" then
* an SRV lookup will be done for "_sip._udp.example.com". If service is NULL,
* then this function acts exactly like a call to ast_get_ip.
*
- * \param addr The IP address found. The address family is used as an input parameter to
- * filter the returned addresses. if it is 0, both IPv4 and IPv6 addresses
- * can be returned.
+ * \param addr The IP address found. The address family is used
+ * as an input parameter to filter the returned addresses. If
+ * it is 0, both IPv4 and IPv6 addresses can be returned.
*
- * \param value The hostname to look up
+ * \param hostname The hostname to look up
* \param service A specific service provided by the host. A NULL service results
* in an A-record lookup instead of an SRV lookup
* \retval 0 Success
* \retval -1 Failure
*/
-int ast_get_ip_or_srv(struct ast_sockaddr *addr, const char *value, const char *service);
+int ast_get_ip_or_srv(struct ast_sockaddr *addr, const char *hostname, const char *service);
/*!
* \brief Get our local IP address when contacting a remote host