diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-12-02 03:50:58 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-12-02 03:50:58 +0000 |
commit | eef3755e11518c7e7db722168eded36e103b6092 (patch) | |
tree | 3ccc29e01f79d09e14126aa2658e10e680b972f0 /include | |
parent | 9662ae384617743126ac9a6d75a02fc94bcabd72 (diff) |
Backport the comment containing the warning regarding the limitations on the
usage of this function. It is thread safe, but not technically reentrant.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@48195 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rw-r--r-- | include/asterisk/utils.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/asterisk/utils.h b/include/asterisk/utils.h index 30e9523e2..3fb817980 100644 --- a/include/asterisk/utils.h +++ b/include/asterisk/utils.h @@ -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 |