You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2020/03/12 18:46:11 UTC
[GitHub] [incubator-nuttx] hartmannathan commented on a change in pull
request #558: libs/libc/netdb/lib_dnsaddserver.c: Fix wrong fopen() mode.
hartmannathan 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_r391822538
##########
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:
In that case, I think the original author intended "a+" for "append/update." However, there is a bigger problem because as Surya points out, "We have experimented with "a+" "w+" etc but these did not work because of the "resolv.conf" file resides in /etc directory in ROMFS, ROMFS supports only "r" mode." [1](https://lists.apache.org/thread.html/rbbbee93f79dd8f4224969bb03bf093d8c96421380a1d955167a2f661%40%3Cdev.nuttx.apache.org%3E) So a correct fix will likely require a larger design change.
----------------------------------------------------------------
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