]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Update ast_sockaddr comment with an important note.
authorRichard Mudgett <rmudgett@digium.com>
Thu, 26 May 2011 18:10:17 +0000 (18:10 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Thu, 26 May 2011 18:10:17 +0000 (18:10 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@321044 65c4cc65-6c06-0410-ace0-fbb531ad65f3

include/asterisk/netsock2.h

index 73c57c5d26d530c473d862602a5af47eb19d749b..be816a1c4d7ae90bd85623a2d20fc0dbfab7d74b 100644 (file)
@@ -43,12 +43,22 @@ enum {
 };
 
 /*!
- * 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.
+ * \brief Socket address structure.
  *
- * Some BSDs have the length embedded in sockaddr structs. We ignore them.
- * (This is the right thing to do.)
+ * \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;