]> git.pond.sub.org Git - empserver/commit - src/lib/subs/wu.c
subs: Oops when a telegram doesn't end with a newline
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 11 Jan 2015 12:24:08 +0000 (13:24 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Mon, 2 Mar 2015 07:20:50 +0000 (08:20 +0100)
commit61fc526b5dfbd6f5865a84b7e8d20beec4a8f595
tree4b2f52dbdbb2b87db03db76e0b4a953da444647d
parent4401cca0afa774ae575b7a5caaf77781117d4ef1
subs: Oops when a telegram doesn't end with a newline

Telegrams should always end with a newline.  The common cause for a
missing newline is misuse of wu() to print partial lines.  Almost
always works, as the read command merges telegrams arriving in quick
succession.  But if the telegrams are more than five seconds apart
(clock jumped somehow), we get a telegram header in the middle of a
line.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
src/lib/subs/wu.c