* in the middle of a data transfer from the server, in which case
* sending a NOOP would throw the client protocol out of sync.
*/
- if (FD_ISSET(0, &rfds)) {
+ if ((retval > 0) && FD_ISSET(0, &rfds)) {
set_keepalives(KA_NO);
the_character = inkey();
set_keepalives(KA_YES);
static time_t idlet = 0;
static void really_do_keepalive(void) {
- int r; /* IPC response code */
time(&idlet);
* wait for a response.
*/
if (keepalives_enabled == KA_YES) {
- r = CtdlIPCNoop(ipc_for_signal_handlers);
+ CtdlIPCNoop(ipc_for_signal_handlers);
if (instant_msgs > 0) {
if (ok_to_interrupt == 1) {
scr_printf("\r%64s\r", "");
if (!strncasecmp(buf, "expcmd=", 7))
strcpy(rc_exp_cmd, &buf[7]);
- if (!strncasecmp(buf, "local_screen_dimensions=", 24))
- have_xterm = (char) atoi(&buf[24]);
-
if (!strncasecmp(buf, "use_floors=", 11)) {
if (!strcasecmp(&buf[11], "yes"))
rc_floor_mode = RC_YES;
scr_printf("\n%s", room_name);
color(DIM_WHITE);
scr_printf("%c ", room_prompt(room_flags));
- scr_flush();
while (1) {
ch = inkey();
(colornum & 7),
rc_color_use_bg);
- scr_flush();
}
}
if (enable_color) {
printf("\033[4%dm\033[2J\033[H\033[0m",
colornum ? colornum : rc_color_use_bg);
- scr_flush();
}
}
if (FD_ISSET(0, &rfds)) {
abuf[strlen(abuf) + 1] = 0;
rv = read(0, &abuf[strlen(abuf)], 1);
+ if (rv < 0) {
+ scr_printf("failed to read after select: %s",
+ strerror(errno));
+ break;
+ }
}
} while (FD_ISSET(0, &rfds));