nuttx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #558: libs/libc/netdb/lib_dnsaddserver.c: Fix wrong fopen() mode.
Date Thu, 12 Mar 2020 19:36:48 GMT
xiaoxiang781216 commented on a change in pull request #558: libs/libc/netdb/lib_dnsaddserver.c:
Fix wrong fopen() mode.
URL: https://github.com/apache/incubator-nuttx/pull/558#discussion_r391844034
 
 

 ##########
 File path: libs/libc/netdb/lib_dnsaddserver.c
 ##########
 @@ -87,7 +87,7 @@ int dns_add_nameserver(FAR const struct sockaddr *addr, socklen_t addrlen)
   int status;
   int ret;
 
-  stream = fopen(CONFIG_NETDB_RESOLVCONF_PATH, "at");
+  stream = fopen(CONFIG_NETDB_RESOLVCONF_PATH, "r");
 
 Review comment:
   If user enable CONFIG_NETDB_RESOLVCONF, he/she should put resolv.conf in the writable filesystem
by CONFIG_NETDB_RESOLVCONF_PATH.
   Surya report two problems:
   1.Call open with "at": this is a typo bug we need fix DNS(change to "a+").
   2. Fail to open with "a+"/"w+" due to read-only ROMFS: this is invalid usage, Surya should
modify his config.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message