# HG changeset patch # User Markus Bröker # Date 1229179272 -3600 # Node ID 9a32b52423200c849ffeea7de17ed84fd99951e1 # Parent 33245bf7873a6fb78f0daaf2d10c4830b59c5f34 BUG INTRODUCED from a6c36a2b97f6bed5577d66474949c8ec8b32c8e8 the signal handler is essential for this bot the script performs a kill -TERM and the application has enough time to finish the connection. it's essential. committer: Markus Bröker diff --git a/src/main.c b/src/main.c --- a/src/main.c +++ b/src/main.c @@ -94,10 +94,9 @@ while (!feof (message.stream)) { *buf = '\0'; + fgets (buf, 512, message.stream); - if (active) /* SIGPROC */ - fgets (buf, 512, message.stream); - else + if (!active) /* the bot was killed with SIGTERM */ break; if ((command = irc_parsemessage (buf, &message))) { @@ -117,7 +116,6 @@ /* * cleanup */ - if (uc.nick) free (uc.nick); if (uc.pass)