From 99503ac7fbbd9afef7517d68599aca744794f428 Mon Sep 17 00:00:00 2001 From: Olof hagsand Date: Fri, 23 Aug 2024 09:54:42 +0200 Subject: [PATCH] Minor perf improve of NETCONF input read --- lib/src/clixon_netconf_input.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/clixon_netconf_input.c b/lib/src/clixon_netconf_input.c index 46152f22..672e1a0e 100644 --- a/lib/src/clixon_netconf_input.c +++ b/lib/src/clixon_netconf_input.c @@ -210,7 +210,7 @@ netconf_input_msg2(unsigned char **bufp, goto done; switch (ret){ case 1: /* chunk-data */ - cprintf(cbmsg, "%c", ch); + cbuf_append(cbmsg, ch); break; case 2: /* end-of-data */ /* Somewhat complex error-handling: @@ -223,7 +223,7 @@ netconf_input_msg2(unsigned char **bufp, } } else{ - cprintf(cbmsg, "%c", ch); + cbuf_append(cbmsg, ch); if (detect_endtag("]]>]]>", ch, frame_state)){ *frame_state = 0; /* OK, we have an xml string from a client */