[svn-commits] rmudgett: branch 1.8 r321044 - /branches/1.8/include/asterisk/netsock2.h
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Thu May 26 13:10:21 CDT 2011
Author: rmudgett
Date: Thu May 26 13:10:17 2011
New Revision: 321044
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=321044
Log:
Update ast_sockaddr comment with an important note.
Modified:
branches/1.8/include/asterisk/netsock2.h
Modified: branches/1.8/include/asterisk/netsock2.h
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/include/asterisk/netsock2.h?view=diff&rev=321044&r1=321043&r2=321044
==============================================================================
--- branches/1.8/include/asterisk/netsock2.h (original)
+++ branches/1.8/include/asterisk/netsock2.h Thu May 26 13:10:17 2011
@@ -43,12 +43,22 @@
};
/*!
- * Socket address structure. The first member is big enough to contain addresses
- * of any family. The second member contains the length (in bytes) used in the
- * first member.
- *
- * Some BSDs have the length embedded in sockaddr structs. We ignore them.
- * (This is the right thing to do.)
+ * \brief Socket address structure.
+ *
+ * \details
+ * The first member is big enough to contain addresses of any
+ * family. The second member contains the length (in bytes) used
+ * in the first member.
+ *
+ * \note
+ * Some BSDs have the length embedded in sockaddr structs. We
+ * ignore them. (This is the right thing to do.)
+ *
+ * \note
+ * It is important to always initialize ast_sockaddr before use
+ * -- even if they are passed to ast_sockaddr_copy() as the
+ * underlying storage could be bigger than what ends up being
+ * copied -- leaving part of the data unitialized.
*/
struct ast_sockaddr {
struct sockaddr_storage ss;
More information about the svn-commits
mailing list