[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lynx-dev [patch] 2.8.3dev.16 - cookie_save_file
From: |
brian j pardy |
Subject: |
Re: lynx-dev [patch] 2.8.3dev.16 - cookie_save_file |
Date: |
Wed, 15 Dec 1999 19:30:51 -0500 |
On Wed, Dec 15, 1999, Klaus Weide wrote:
> I note that still nothing has been done for -source. So non-interactive
> in general still isn't covered. Apologies if I missed such a change, but
> I don't think so.
What do you think of this?
Change HTFWriter_free() so that it is allowed to return instead of
calling exit_immediately(). This will (somehow -- I traced it from
the back, not the front) lead to getfile() returning NULLFILE. The
LYMainLoop.c change there is for when we get a NULLFILE back from
getfile() -- if we're in dump mode, go ahead and return a 0 from
mainloop(). Since we're calling this from dump mode, all that happens
afterward is to print the references list (if necessary), then to do
LYMain.c's already existing LYStoreCookies (if persistent &&
EXP_PERSISTENT_COOKIES), then call cleanup_files() and
exit_immediately(status) (0).
Since calling cleanup_files() seems to be safe for -dump, at the
least, I just assumed it would be safe for a -source as well. I don't
know what it might be free'ing that isn't allocated in -source mode,
so I wouldn't be surprised if someone else got a segfault on this. I
haven't had any. I don't understand enough (read: anything) to know
if various newdoc etc pointers will have been populated and improperly
free'd.
FWIW, it seems to work for me. YMMV.
diff -ru 2.8.3dev.17/src/HTFWriter.c 2.8.3dev.17.bri/src/HTFWriter.c
--- 2.8.3dev.17/src/HTFWriter.c Wed Dec 15 18:22:16 1999
+++ 2.8.3dev.17.bri/src/HTFWriter.c Wed Dec 15 19:15:32 1999
@@ -419,8 +419,14 @@
if (dump_output_immediately) {
if (me->anchor->FileCache)
remove(me->anchor->FileCache);
- FREE(me);
- exit_immediately(0);
+ /*
+ * Let's not exit immediately -- go ahead and return as though
+ * this was interactive mode, let getfile() return NULLFILE and
+ * check for dump_output_immediately mode in mainloop(), and
+ * clean up there. - BJP
+ */
+ /* FREE(me); */
+ /* exit_immediately(0); */
}
FREE(me);
diff -ru 2.8.3dev.17/src/LYMainLoop.c 2.8.3dev.17.bri/src/LYMainLoop.c
--- 2.8.3dev.17/src/LYMainLoop.c Wed Dec 15 18:22:16 1999
+++ 2.8.3dev.17.bri/src/LYMainLoop.c Wed Dec 15 19:22:44 1999
@@ -5540,6 +5540,9 @@
newdoc.internal_link = FALSE;
goto try_again;
} else {
+ if (dump_output_immediately)
+ return(0);
+
exit_immediately_with_error_message(NULLFILE,
first_file);
return(-1);
}
--
Do infants have as much fun in infancy as adults do in adultery?
- Re: lynx-dev libreadline, (continued)
- Re: lynx-dev libreadline, brian j pardy, 1999/12/11
- Re: lynx-dev libreadline, Klaus Weide, 1999/12/12
- Re: lynx-dev libreadline, brian j pardy, 1999/12/12
- Re: lynx-dev libreadline, Vlad Harchev, 1999/12/12
- lynx-dev storing cookies for -dump/-source (was: libreadline), Klaus Weide, 1999/12/12
- Re: lynx-dev libreadline, Klaus Weide, 1999/12/12
- Re: lynx-dev libreadline, brian j pardy, 1999/12/12
- lynx-dev [patch] 2.8.3dev.16 - cookie_save_file, brian j pardy, 1999/12/12
- Re: lynx-dev [patch] 2.8.3dev.16 - cookie_save_file, Klaus Weide, 1999/12/15
- Re: lynx-dev [patch] 2.8.3dev.16 - cookie_save_file, brian j pardy, 1999/12/15
- Re: lynx-dev [patch] 2.8.3dev.16 - cookie_save_file,
brian j pardy <=
- Re: lynx-dev [patch] 2.8.3dev.16 - cookie_save_file, Klaus Weide, 1999/12/15
- Re: lynx-dev [patch] 2.8.3dev.16 - cookie_save_file, brian j pardy, 1999/12/18
- Re: lynx-dev [patch] 2.8.3dev.16 - cookie_save_file [2nd patch], brian j pardy, 1999/12/19
- Re: lynx-dev [patch] 2.8.3dev.16 - cookie_save_file [2nd patch], Klaus Weide, 1999/12/19
- Re: lynx-dev libreadline, Vlad Harchev, 1999/12/12
Re: lynx-dev libreadline, T.E.Dickey, 1999/12/09