mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
Patch: fix for bug 938
This patch prevents handle_itrm_stdin() and clear_handlers(itrm->in.std) to be called when -remote is set and in.std < 0. It adds two assertions for in.std >= 0 in handle_itrm_stdin() and unhandle_itrm_stdin(). May be a bad fix, please test and review. [Added a NEWS entry. --KON]
This commit is contained in:
parent
df07b7839c
commit
9ba7079735
1
NEWS
1
NEWS
@ -319,6 +319,7 @@ To be released as 0.11.4.
|
||||
hostname
|
||||
* bug 712: GnuTLS works on https://www-s.uiuc.edu/[]
|
||||
* fix active and passive FTP over IPv6
|
||||
* bug 938: elinks -remote no longer needs a controlling tty
|
||||
* bug 978: Python's webbrowser.open_new_tab(URL) works since now
|
||||
* minor bug 951 in user SMJS: garbage-collect SMJS objects on 'File ->
|
||||
Flush all caches' to work around their holding cache entries busy
|
||||
|
@ -336,10 +336,12 @@ handle_trm(int std_in, int std_out, int sock_in, int sock_out, int ctl_in,
|
||||
#ifdef CONFIG_MOUSE
|
||||
enable_mouse();
|
||||
#endif
|
||||
handle_itrm_stdin(itrm);
|
||||
} else {
|
||||
/* elinks -remote may not have a valid stdin if not run from a tty (bug 938) */
|
||||
if (std_in >= 0) handle_itrm_stdin(itrm);
|
||||
}
|
||||
|
||||
handle_itrm_stdin(itrm);
|
||||
|
||||
if (sock_in != std_out)
|
||||
set_handlers(sock_in, (select_handler_T) in_sock,
|
||||
NULL, (select_handler_T) free_itrm, itrm);
|
||||
@ -437,7 +439,8 @@ free_itrm(struct itrm *itrm)
|
||||
|
||||
mem_free_set(&itrm->orig_title, NULL);
|
||||
|
||||
clear_handlers(itrm->in.std);
|
||||
/* elinks -remote may not have a valid stdin if not run from a tty (bug 938) */
|
||||
if (!itrm->remote || itrm->in.std >= 0) clear_handlers(itrm->in.std);
|
||||
clear_handlers(itrm->in.sock);
|
||||
clear_handlers(itrm->out.std);
|
||||
clear_handlers(itrm->out.sock);
|
||||
@ -1194,6 +1197,9 @@ in_kbd(struct itrm *itrm)
|
||||
static void
|
||||
handle_itrm_stdin(struct itrm *itrm)
|
||||
{
|
||||
assert(itrm->in.std >= 0);
|
||||
if_assert_failed return;
|
||||
|
||||
set_handlers(itrm->in.std, (select_handler_T) in_kbd, NULL,
|
||||
(select_handler_T) free_itrm, itrm);
|
||||
}
|
||||
@ -1204,6 +1210,9 @@ handle_itrm_stdin(struct itrm *itrm)
|
||||
static void
|
||||
unhandle_itrm_stdin(struct itrm *itrm)
|
||||
{
|
||||
assert(itrm->in.std >= 0);
|
||||
if_assert_failed return;
|
||||
|
||||
set_handlers(itrm->in.std, (select_handler_T) NULL, NULL,
|
||||
(select_handler_T) free_itrm, itrm);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user