[asterisk-commits] mjordan: branch 12 r402503 - in /branches/12/include/asterisk: acl.h netsock2.h
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Nov 5 15:06:05 CST 2013
Author: mjordan
Date: Tue Nov 5 15:06:03 2013
New Revision: 402503
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=402503
Log:
netsock2: Define AST_AF_* enum constants to their AF_* equivalents
This patch explicitly defines AST_AF_* enum constants to their sys/socket.h
defined equivalents. It is certainly unclear why these constants actually have
to exist, given that netsock2.h includes sys/socket.h; however, since the code
base is already liberally sprinkled with the usage of AST_AF_* (as well as with
direct calls to AF_*), this will at least keep the semantics consistent between
their usage across systems.
Modified:
branches/12/include/asterisk/acl.h
branches/12/include/asterisk/netsock2.h
Modified: branches/12/include/asterisk/acl.h
URL: http://svnview.digium.com/svn/asterisk/branches/12/include/asterisk/acl.h?view=diff&rev=402503&r1=402502&r2=402503
==============================================================================
--- branches/12/include/asterisk/acl.h (original)
+++ branches/12/include/asterisk/acl.h Tue Nov 5 15:06:03 2013
@@ -208,7 +208,7 @@
*
* \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.
+ * it is AST_AF_UNSPEC, both IPv4 and IPv6 addresses can be returned.
* \param hostname The hostname to look up
*
* \retval 0 Success
Modified: branches/12/include/asterisk/netsock2.h
URL: http://svnview.digium.com/svn/asterisk/branches/12/include/asterisk/netsock2.h?view=diff&rev=402503&r1=402502&r2=402503
==============================================================================
--- branches/12/include/asterisk/netsock2.h (original)
+++ branches/12/include/asterisk/netsock2.h Tue Nov 5 15:06:03 2013
@@ -37,9 +37,9 @@
* ever include socket.h.
*/
enum {
- AST_AF_UNSPEC = 0,
- AST_AF_INET = 2,
- AST_AF_INET6 = 10,
+ AST_AF_UNSPEC = AF_UNSPEC,
+ AST_AF_INET = AF_INET,
+ AST_AF_INET6 = AF_INET6,
};
enum ast_transport {
More information about the asterisk-commits
mailing list