src/nexus.c
changeset 13 ca16f3a8f3b7
parent 12 4147fae232d9
child 14 3a70e5901f17
--- a/src/nexus.c	Sat Feb 28 18:48:10 2009 +0200
+++ b/src/nexus.c	Sat Feb 28 19:08:51 2009 +0200
@@ -13,7 +13,7 @@
 #include "line_proto.h"
 
 #define CONNECT_HOST "localhost"
-#define CONNECT_SERV "5001"
+#define CONNECT_SERV "5002"
 #define LINE_LENGTH 512
 
 void on_line (const char *line, void *arg) {
@@ -38,8 +38,8 @@
     if (sock_tcp_connect(&sock, CONNECT_HOST, CONNECT_SERV, &_err))
         errx(1, "sock_gnutls_connect: %s", error_msg(&_err));
 
-    // line protocol
-    if (line_proto_create(&lp, sock, LINE_LENGTH, on_line, NULL, &_err))
+    // line protocol, with safety margin for buffer
+    if (line_proto_create(&lp, sock, LINE_LENGTH * 2, on_line, NULL, &_err))
         errx(1, "line_proto_create: %s", error_msg(&_err));
 
     // run event loop