[Freeciv-Dev] Seg fault on EOF in server console (PR#912)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Full_Name: Michael Zinn
Version: 1.12.1-20010824
Distribution: Debian binary
Client: Both (or N/A)
OS: Debian Woody up-to-date as of 2001-08-24
Submission from: (NULL) (129.94.6.28)
EOF in the server console causes a seg fault:
michaelz@baradduhr 14:15:42 ~ $ civserver
This is the server for Freeciv version 1.12.1-devel
You can learn a lot about Freeciv at http://www.freeciv.org/
2: Now accepting new client connections.
For introductory help, type 'help'.
>
2: Server cannot read standard input. Ignoring input.
Segmentation fault
The place to fix it would be server/sernet.c:handle_readline_input_callback
unless I'm very much mistaken:
static void handle_readline_input_callback(char *line)
{
if (no_input)
return;
if (!line) {
handle_stdin_close(); /* maybe print an 'are you sure?' message? */
}
if (*line) /***** <--- this happends regardless of wheter or not line ==
NULL... *****/
add_history(line);
con_prompt_enter(); /* just got an 'Enter' hit */
handle_stdin_input((struct connection*)NULL, line);
readline_handled_input = 1;
}
There are a million and one (well, maybe i exagerate... but not much) ways this
could be trivially fixed... I'll leave it to you to work out which is least
inelegant :-)
-- Michael 'Wumpus' Zinn, evading thesis work (again)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] Seg fault on EOF in server console (PR#912),
michael . z <=
|
|