From: Guus Sliepen Date: Tue, 22 Oct 2013 19:28:44 +0000 (+0200) Subject: Fix sending bulk data starting with a newline. X-Git-Tag: release-1.1pre10~43 X-Git-Url: https://git.tinc-vpn.org/git/browse?a=commitdiff_plain;h=29b42aa17ede17bc67963292e86b186cc09039b1;p=tinc Fix sending bulk data starting with a newline. --- diff --git a/src/sptps_test.c b/src/sptps_test.c index 1815fb72..44cdeb73 100644 --- a/src/sptps_test.c +++ b/src/sptps_test.c @@ -283,7 +283,7 @@ int main(int argc, char *argv[]) { if(len > 1) sptps_send_record(&s, 0, buf, len); } else - if(!sptps_send_record(&s, buf[0] == '!' ? 1 : 0, buf, buf[0] == '\n' ? 0 : buf[0] == '*' ? sizeof buf : len)) + if(!sptps_send_record(&s, buf[0] == '!' ? 1 : 0, buf, (len == 1 && buf[0] == '\n') ? 0 : buf[0] == '*' ? sizeof buf : len)) return 1; }