aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKevin Lange <kevin.lange@dakko.us>2013-03-07 19:43:48 -0800
committerKevin Lange <kevin.lange@dakko.us>2013-03-07 19:43:48 -0800
commit634c7d3e97c5bda9635815a55eb7294c3eb0ac62 (patch)
tree1704b6f4039028a017ee5cbe5909cea488d18687 /src
parent4a907ca8eee73fb25fed599447292a45d1daa256 (diff)
downloadnyancat-634c7d3e97c5bda9635815a55eb7294c3eb0ac62.tar.gz
Set alarm for extended options.
Instead of clearing the alarm, set it to two seconds; Previously, this could, potentially, not finish at all on some telnet clients, which is definitely bad. This is a reasonable workaround.
Diffstat (limited to 'src')
-rw-r--r--src/nyancat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nyancat.c b/src/nyancat.c
index e7d3f38..2137849 100644
--- a/src/nyancat.c
+++ b/src/nyancat.c
@@ -443,14 +443,14 @@ int main(int argc, char ** argv) {
if (sb[0] == TTYPE) {
/* This was a response to the TTYPE command, meaning
* that this should be a terminal type */
- alarm(0);
+ alarm(2);
strcpy(term, &sb[2]);
done++;
}
else if (sb[0] == NAWS) {
/* This was a response to the NAWS command, meaning
* that this should be a window size */
- alarm(0);
+ alarm(2);
terminal_width = sb[2];
done++;
}
db&follow=1'>Imported Upstream version 0+git20140512.1246b27upstream/0+git20140512.1246b27Jonathan McCrohan391-301/+3983 2014-04-05Release 0+git20140326.cfc2975-1debian/0+git20140326.cfc2975-1Jonathan McCrohan1-2/+2 2014-04-05d/control: update Homepage (upstream has moved from Gitweb to cgit)Jonathan McCrohan2-1/+2 2014-04-05New Upstream Snapshot (commit cfc2975)Jonathan McCrohan1-0/+6 2014-04-05Imported Upstream version 0+git20140326.cfc2975upstream/0+git20140326.cfc2975Jonathan McCrohan118-656/+877 2014-01-16Release 0+git20140107.1850cf8-1debian/0+git20140107.1850cf8-1Jonathan McCrohan1-2/+2 2014-01-16Update Standards Version to 3.9.5Jonathan McCrohan2-1/+9