[asterisk-commits] mjordan: trunk r402504 - in /trunk: ./ include/asterisk/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Nov 5 15:06:26 CST 2013


Author: mjordan
Date: Tue Nov  5 15:06:25 2013
New Revision: 402504

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=402504
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.
........

Merged revisions 402503 from http://svn.asterisk.org/svn/asterisk/branches/12

Modified:
    trunk/   (props changed)
    trunk/include/asterisk/acl.h
    trunk/include/asterisk/netsock2.h

Propchange: trunk/
------------------------------------------------------------------------------
--- branch-12-merged (original)
+++ branch-12-merged Tue Nov  5 15:06:25 2013
@@ -1,1 +1,1 @@
-/branches/12:1-398558,398560-398577,398579-399305,399307-401390,401392-402367,402387,402398,402416,402427,402429,402438,402452,402501
+/branches/12:1-398558,398560-398577,398579-399305,399307-401390,401392-402367,402387,402398,402416,402427,402429,402438,402452,402501,402503

Modified: trunk/include/asterisk/acl.h
URL: http://svnview.digium.com/svn/asterisk/trunk/include/asterisk/acl.h?view=diff&rev=402504&r1=402503&r2=402504
==============================================================================
--- trunk/include/asterisk/acl.h (original)
+++ trunk/include/asterisk/acl.h Tue Nov  5 15:06:25 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: trunk/include/asterisk/netsock2.h
URL: http://svnview.digium.com/svn/asterisk/trunk/include/asterisk/netsock2.h?view=diff&rev=402504&r1=402503&r2=402504
==============================================================================
--- trunk/include/asterisk/netsock2.h (original)
+++ trunk/include/asterisk/netsock2.h Tue Nov  5 15:06:25 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