public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
From: Corinna Vinschen <corinna@sourceware.org>
To: cygwin-cvs@sourceware.org
Subject: [newlib-cygwin/main] Cygwin: cygcheck: lower setup.ini expiration time to 3 hours
Date: Sun, 29 Jan 2023 20:32:53 +0000 (GMT)	[thread overview]
Message-ID: <20230129203253.7E0AC3858C20@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=4b157b44cad099c375801453dc245da660f0cb85

commit 4b157b44cad099c375801453dc245da660f0cb85
Author:     Corinna Vinschen <corinna@vinschen.de>
AuthorDate: Sun Jan 29 21:32:25 2023 +0100
Commit:     Corinna Vinschen <corinna@vinschen.de>
CommitDate: Sun Jan 29 21:32:25 2023 +0100

    Cygwin: cygcheck: lower setup.ini expiration time to 3 hours
    
    ...as is default for dnf
    
    Signed-off-by: Corinna Vinschen <corinna@vinschen.de>

Diff:
---
 winsup/utils/mingw/cygcheck.cc | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/winsup/utils/mingw/cygcheck.cc b/winsup/utils/mingw/cygcheck.cc
index 777347371612..7ac19afe5d2f 100644
--- a/winsup/utils/mingw/cygcheck.cc
+++ b/winsup/utils/mingw/cygcheck.cc
@@ -2126,12 +2126,12 @@ struct passwd {
 static FILE *
 maybe_download_setup_ini ()
 {
-  time_t t24h_before;
+  time_t t3h_before;
   char *path;
   struct stat st;
   FILE *fp;
 
-  t24h_before = time (NULL) - 24 * 60 * 60;
+  t3h_before = time (NULL) - 3 * 60 * 60;
   for (int i = 0; i < 2; ++i)
     {
       /* Check for the system-wide setup.ini file first.  If that's too
@@ -2150,10 +2150,10 @@ maybe_download_setup_ini ()
 	  cp = stpcpy (path, localappdata);
 	  stpcpy (cp, "\\.setup.ini");
 	}
-      /* If file exists, and has been downloaded less than 24h ago,
+      /* If file exists, and has been downloaded less than 3h ago,
          and if we can open it for reading, just use it. */
       if (stat (path, &st) == 0
-	  && st.st_mtime > t24h_before
+	  && st.st_mtime > t3h_before
 	  && (fp = fopen (path, "rt")) != NULL)
 	return fp;
       /* Otherwise, try to open it for writing and fetch from cygwin.com. */

                 reply	other threads:[~2023-01-29 20:32 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230129203253.7E0AC3858C20@sourceware.org \
    --to=corinna@sourceware.org \
    --cc=cygwin-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).