From 0056522cc974d2be2005c324f37187b5b3695765 Mon Sep 17 00:00:00 2001 From: Simon Goldschmidt Date: Fri, 5 Mar 2021 13:04:59 +0100 Subject: [PATCH] netdb: improve documentation of LWIP_DNS_API_HOSTENT_STORAGE --- src/api/netdb.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/api/netdb.c b/src/api/netdb.c index ee782978..e07ab049 100644 --- a/src/api/netdb.c +++ b/src/api/netdb.c @@ -61,13 +61,18 @@ struct gethostbyname_r_helper { int h_errno; #endif /* LWIP_DNS_API_DECLARE_H_ERRNO */ -/** define "hostent" variables storage: 0 if we use a static (but unprotected) - * set of variables for lwip_gethostbyname, 1 if we use a local storage */ +/** LWIP_DNS_API_HOSTENT_STORAGE: if set to 0 (default), lwip_gethostbyname() + * returns the same global variabe for all calls (in all threads). + * When set to 1, your port should provide a function + * struct hostent* sys_thread_hostent( struct hostent* h); + * which have to do a copy of "h" and return a pointer ont the "per-thread" + * copy. + */ #ifndef LWIP_DNS_API_HOSTENT_STORAGE #define LWIP_DNS_API_HOSTENT_STORAGE 0 #endif -/** define "hostent" variables storage */ +/* define "hostent" variables storage */ #if LWIP_DNS_API_HOSTENT_STORAGE #define HOSTENT_STORAGE #else