Permalink
Browse files

Don't send \r\n as an extra tcp packet. Fixes #689

Found by: michaelortmann
Patch by: michaelortmann
Fixes: #689
  • Loading branch information...
michaelortmann authored and vanosg committed Oct 12, 2018
1 parent 89a3fd0 commit 2edf7064462beec3515cc8184f0ed7d09578769a
Showing with 10 additions and 5 deletions.
  1. +10 −0 src/mod/server.mod/server.c
  2. +0 −5 src/mod/server.mod/server.h
@@ -134,6 +134,16 @@ static int burst;
#include "tclserv.c"
static void write_to_server(char *s, unsigned int len) {
char *s2 = nmalloc(len + 2);
memcpy(s2, s, len);
s2[len] = '\r';
s2[len + 1] = '\n';
tputs(serv, s2, len + 2);
nfree(s2);
}
/*
* Bot server queues
*/
@@ -86,11 +86,6 @@
ptr = NULL; \
} while (0)
#define write_to_server(x,y) do { \
tputs(serv, (x), (y)); \
tputs(serv, "\r\n", 2); \
} while (0)
#endif /* MAKING_SERVER */
struct server_list {

0 comments on commit 2edf706

Please sign in to comment.