flush_text(f);
f->obuf = mp = cmsg_new(paclen+1, f->sort, f);
}
- *mp->inp++ = nl;
+ *mp->inp++ = '\n';
if (!f->buffer_it)
flush_text(f);
}
} else
*mp->inp++ = *p;
}
- }
+ }
*mp->inp++ = '\n';
*mp->inp = 0;
cmsg_send(f->outq, mp, 0);
case EAGAIN:
goto lout;
default:
- if (f->sort == MSG)
- send_Z = 0;
+/* if (f->sort == MSG)
+ send_Z = 0; */
ending++;
return 0;
}
} else if (r == 0) {
- if (f->sort == MSG)
- send_Z = 0;
+/* if (f->sort == MSG)
+ send_Z = 0; */
ending++;
return 0;
}
case EAGAIN:
goto lend;
default:
- if (f->sort == MSG)
- send_Z = 0;
+/* if (f->sort == MSG)
+ send_Z = 0; */
ending++;
return;
}
if (in && in->t_set)
tcsetattr(0, TCSANOW, &in->t);
if (node) {
+ shutdown(node->cnum, 3);
close(node->cnum);
}
exit(i);
void terminate(int i)
{
if (node && send_Z && call) {
- send_msg(node, 'Z', "", 0);
+ send_msg(node, 'Z', "bye", 3);
}
signal(SIGALRM, term_timeout);
}
if (in && in->t_set)
tcsetattr(0, TCSADRAIN, &in->t);
- if (node)
+ if (node) {
+ shutdown(node->cnum, 3);
close(node->cnum);
+ }
exit(i);
}