This is the mail archive of the cygwin-apps mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch] Setup: Warn about dropped mirrors.

On Mon, Mar 06, 2006 at 05:00:45AM +0100, Bas van Gompel wrote:
>Op Wed, 16 Nov 2005 23:29:50 +0100 (MET) schreef Bas van Gompel
>in <n2m-g.dlgdit.3vsvtmt.1<at>buzzy-box.bavag>:
>[Warn about dropped mirrors]
>One more iteration. This is what I've been testing/using for months
>now. Before I start changing/optimizing this, I'd like to get it in.
>[Oh and a big PING on those other setup-patches from me (and Igor[*]).]
>Now using std::string, not String. Also, break write_cache_list out
>of save_cache_file.
>Improved ChangeLog-entry: (please fix the <at>.)
>2006-03-06  Bas van Gompel  <<at>>
>	* res.rc (IDD_DROPPED): New dialog.
>	* resource.h (IDD_DROPPED): New dialog-id.
>	* Add enum for response on dropped mirrors.
>	(cache_is_usable, cache_needs_writing): New bools.
>	(cache_warn_urls): New string.
>	(cached_site-list, dropped_site_list): New SiteLists.
>	(site_list_type::init, site_list_type::site_list_type):
>	Change to four parameter form.
>	(site_list_type::site_list_type, site_list_type::operator=) Copy
>	servername, area and location.
>	(load_site_list): New function, broken out of get_site_list.
>	Support four-parameter site_list_type.
>	(get_site_list): Break out load_site_list. Move reading cache
>	earlier. Don't write new cache. Set flags to record cache state.
>	Load both all_site_list and cached_site_list.
>	(SiteSetting::registerSavedSite): Use four-parameter site_list_type.
>	(drop_proc, check_dropped_mirrors, write_cache_list,
>	save_cache_file): New functions.
>	(SitePage::OnNext): Check for dropped mirrors and save cache as
>	appropriate.
>	(SitePage::OnMessageCmd): Use four-parameter site_list_type.
>	* site.h (site_list_type::init, site_list_type::site_list_type):
>	Change to four parameter form.
>	(site_list_type): Add servername, area and location members.

I've checked this in but I noticed some odd behavior with it at one
point.  It got a SEGV:

  warning: LOG: 1 Cached mirror list unavailable
  warning: LOG: 1 get_url_to_membuf
  warning: LOG: 1 getUrlToStream

  Program received signal SIGSEGV, Segmentation fault.
  [Switching to thread 3500.0x158]
  0x77c470d0 in msvcrt!memcpy ()
  (gdb) bt
  #0  0x77c470d0 in msvcrt!memcpy ()
  #1  0x0045683a in new_cstr_char_array (s=@0x1f8fb7c) at /cygnus/src/cygwin-apps/setup/
  #2  0x0045293c in do_download_site_info_thread (p=0x4dbd40) at /cygnus/src/cygwin-apps/setup/
  #3  0x7c80b50b in KERNEL32!GetModuleFileNameA ()
  #4  0x004dbd40 in std::__ioinit ()
  #5  0x00000401 in ?? ()
  #6  0x00000002 in ?? ()
  #7  0x004dbd40 in std::__ioinit ()
  #8  0x7ffdc000 in ?? ()
  #9  0x86fbe600 in ?? ()
  #10 0x01f8ffc0 in ?? ()
  #11 0x86eb9578 in ?? ()
  #12 0xffffffff in ?? ()
  #13 0x7c8399f3 in KERNEL32!FindAtomW ()
  #14 0x7c80b518 in KERNEL32!GetModuleFileNameA ()
  #15 0x00000000 in ?? ()
  (gdb) f 2
  #2  0x0045293c in do_download_site_info_thread (p=0x4dbd40) at /cygnus/src/cygwin-apps/setup/
  330         theCachedString = new_cstr_char_array (cached_mirrors);

This happened a couple of times and then I could no longer duplicate it.

Can anyone else?

Thanks for the patch.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]