MEDIUM: cli: handle payload in CLI proxy
The CLI proxy was not handling payload. To do that, we needed to keep a
connection active on a server and to transfer each new line over that
connection until we receive a empty line.
The CLI proxy handles the payload in the same way that the CLI do it.
Examples:
$ echo -e "@1;add map #-1 <<\n$(cat data)\n" | socat /tmp/master-socket -
$ socat /tmp/master-socket readline
prompt
master> @1
25130> add map #-1 <<
+ test test
+ test2 test2
+ test3 test3
+
25130>
diff --git a/src/stream.c b/src/stream.c
index 67b0c8d..24df70a 100644
--- a/src/stream.c
+++ b/src/stream.c
@@ -202,6 +202,7 @@
s->flags |= SF_INITIALIZED;
s->pcli_next_pid = 0;
s->pcli_prompt = 0;
+ s->pcli_flags = 0;
s->unique_id = NULL;
if ((t = task_new(tid_bit)) == NULL)