]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Backport the comment containing the warning regarding the limitations on the
authorRussell Bryant <russell@russellbryant.com>
Sat, 2 Dec 2006 03:50:58 +0000 (03:50 +0000)
committerRussell Bryant <russell@russellbryant.com>
Sat, 2 Dec 2006 03:50:58 +0000 (03:50 +0000)
usage of this function.  It is thread safe, but not technically reentrant.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@48195 65c4cc65-6c06-0410-ace0-fbb531ad65f3

include/asterisk/utils.h

index 30e9523e29778af95f07b6bdc7b523d38de3dcee..3fb817980a6a127f9e1659db392d407fe8849857 100644 (file)
@@ -218,6 +218,16 @@ static force_inline void ast_slinear_saturated_divide(short *input, short *value
 
 int test_for_thread_safety(void);
 
+/*!
+ * \brief thread-safe replacement for inet_ntoa().
+ *
+ * \note It is very important to note that even though this is a thread-safe
+ *       replacement for inet_ntoa(), it is *not* reentrant.  In a single
+ *       thread, the result from a previous call to this function is no longer
+ *       valid once it is called again.  If the result from multiple calls to
+ *       this function need to be kept or used at once, then the result must be
+ *       copied to a local buffer before calling this function again.
+ */
 const char *ast_inet_ntoa(struct in_addr ia);
 
 #ifdef inet_ntoa