From d9574910b3494726c2b3a4a79568c6545a77cfc9 Mon Sep 17 00:00:00 2001 From: John Marino Date: Wed, 4 Nov 2015 18:54:12 +0100 Subject: [PATCH] contrib/tnftp: Add back what's left of local modifications Most of the big modification to fetch.c added by dillon is already present in the source. The only thing that remained was pre-processing out the use of popen in all cases. The other two small patches have been carried for years. --- contrib/tnftp/src/fetch.c | 2 ++ contrib/tnftp/src/ssl.c | 2 +- contrib/tnftp/src/util.c | 3 +-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/contrib/tnftp/src/fetch.c b/contrib/tnftp/src/fetch.c index d0f40d3f99..b14b1f5adb 100644 --- a/contrib/tnftp/src/fetch.c +++ b/contrib/tnftp/src/fetch.c @@ -1169,6 +1169,7 @@ fetch_url(const char *url, const char *proxyenv, char *proxyauth, char *wwwauth) if (strcmp(savefile, "-") == 0) { fout = stdout; } else if (*savefile == '|') { +#if 0 oldpipe = xsignal(SIGPIPE, SIG_IGN); fout = popen(savefile + 1, "w"); if (fout == NULL) { @@ -1176,6 +1177,7 @@ fetch_url(const char *url, const char *proxyenv, char *proxyauth, char *wwwauth) goto cleanup_fetch_url; } closefunc = pclose; +#endif } } if (fout == NULL) { diff --git a/contrib/tnftp/src/ssl.c b/contrib/tnftp/src/ssl.c index 8587526b9d..7f4d21e471 100644 --- a/contrib/tnftp/src/ssl.c +++ b/contrib/tnftp/src/ssl.c @@ -163,7 +163,7 @@ fetch_write(struct fetch_connect *conn, const char *str, size_t len) { struct iovec iov[1]; - iov[0].iov_base = (char *)__UNCONST(str); + iov[0].iov_base = __DECONST(char *, str); iov[0].iov_len = len; return fetch_writev(conn, iov, 1); } diff --git a/contrib/tnftp/src/util.c b/contrib/tnftp/src/util.c index 531712c3de..b80ea38d34 100644 --- a/contrib/tnftp/src/util.c +++ b/contrib/tnftp/src/util.c @@ -1591,8 +1591,7 @@ void ftp_sl_add(StringList *sl, char *i) { - if (sl_add(sl, i) == -1) - err(1, "Unable to add `%s' to stringlist", i); + sl_add(sl, i); } /* -- 2.41.0