1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-09-29 03:17:53 -04:00

Revert "bug 991: Added the bit field cgi to the structs connection and type_query."

This reverts commit 7ceba1e461,
which is causing an assertion to fail if I open the same PDF
twice in a row, even if I cancel the dialog box when ELinks
first asks which program to run:

INTERNAL ERROR at /home/Kalle/src/elinks-0.12/src/session/download.c:980: assertion download && download->conn failed!

Forcing core dump! Man the Lifeboats! Women and children first!

But please DO NOT report this as a segfault!!! It is an internal error, not a
normal segfault, there is a huge difference in these for us the developers.
Also, noting the EXACT error you got above is crucial for hunting the problem
down. Thanks, and please get in touch with us.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1216698688 (LWP 17877)]
0xb7a02d76 in raise () from /lib/libc.so.6
(gdb) backtrace 6
    at /home/Kalle/src/elinks-0.12/src/util/error.c:179
    fmt=0x816984c "assertion download && download->conn failed!")
    at /home/Kalle/src/elinks-0.12/src/util/error.c:122
    cached=0x8253ca8) at /home/Kalle/src/elinks-0.12/src/session/download.c:980
    cached=0x8253ca8, frame=0)
    at /home/Kalle/src/elinks-0.12/src/session/download.c:1339
    at /home/Kalle/src/elinks-0.12/src/session/task.c:493
(More stack frames follow...)

There is a fix available but I don't trust it yet.
This commit is contained in:
Kalle Olavi Niemitalo 2008-03-11 10:41:45 +02:00 committed by Kalle Olavi Niemitalo
parent 7ceba1e461
commit cd4a9d77b9
4 changed files with 0 additions and 31 deletions

View File

@ -58,7 +58,6 @@ struct connection {
unsigned int unrestartable:1;
unsigned int detached:1;
unsigned int popen:1;
unsigned int cgi:1;
/* Each document is downloaded with some priority. When downloading a
* document, the existing connections are checked to see if a

View File

@ -393,7 +393,6 @@ execute_cgi(struct connection *conn)
/* Use data socket for passing the pipe. It will be cleaned up in
* close_pipe_and_read(). */
conn->data_socket->fd = pipe_write[1];
conn->cgi = 1;
set_nonblocking_fd(conn->socket->fd);
set_nonblocking_fd(conn->data_socket->fd);

View File

@ -977,9 +977,6 @@ init_type_query(struct session *ses, struct download *download,
{
struct type_query *type_query;
assert(download && download->conn);
if_assert_failed return NULL;
/* There can be only one ... */
foreach (type_query, ses->type_queries)
if (compare_uri(type_query->uri, ses->loading_uri, 0))
@ -993,7 +990,6 @@ init_type_query(struct session *ses, struct download *download,
type_query->target_frame = null_or_stracpy(ses->task.target.frame);
type_query->cached = cached;
type_query->cgi = download->conn->cgi;
object_lock(type_query->cached);
move_download(download, &type_query->download, PRI_MAIN);
@ -1092,30 +1088,6 @@ tp_open(struct type_query *type_query)
return;
}
if (type_query->uri->protocol == PROTOCOL_FILE && !type_query->cgi) {
unsigned char *file = get_uri_string(type_query->uri, URI_PATH);
unsigned char *handler = NULL;
if (file) {
decode_uri(file);
handler = subst_file(type_query->external_handler, file);
mem_free(file);
}
if (handler) {
if (type_query->copiousoutput)
read_from_popen(type_query->ses, handler, NULL);
else
exec_on_terminal(type_query->ses->tab->term,
handler, "",
type_query->block ? TERM_EXEC_FG : TERM_EXEC_BG);
mem_free(handler);
}
done_type_query(type_query);
return;
}
continue_download(type_query, "");
}

View File

@ -49,7 +49,6 @@ struct type_query {
unsigned char *external_handler;
int block;
unsigned int copiousoutput:1;
unsigned int cgi:1;
/* int frame; */
};