diff options
| -rw-r--r-- | src/main.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -70,7 +70,13 @@ void txbuf_set_str(const char *str) { } void txbuf_send(void) { + /* don't sent empty buffer */ if(!txbuflen) return; + + /* always terminate with EOL */ + if(tx_buf[txbuflen - 1] != '\n') + tx_buf[txbuflen++] = '\n'; + nwrite(url, tx_buf, txbuflen); txbuf_init(); } |
