moved detect_endtag to clixon_proto

This commit is contained in:
Olof hagsand 2017-04-07 12:34:07 +02:00
parent 7880b5d498
commit 05edace630
5 changed files with 67 additions and 43 deletions

View file

@ -175,20 +175,18 @@ static int
netconf_input_cb(int s,
void *arg)
{
int retval = -1;
clicon_handle h = arg;
unsigned char buf[BUFSIZ];
int i;
int len;
// static cbuf *cb; /* XXX: should use ce state? */
cbuf *cb=NULL; /* XXX: should use ce state? */
cbuf *cb=NULL;
int xml_state = 0;
int retval = -1;
if (cb == NULL)
if ((cb = cbuf_new()) == NULL){
clicon_err(OE_XML, errno, "%s: cbuf_new", __FUNCTION__);
return retval;
}
if ((cb = cbuf_new()) == NULL){
clicon_err(OE_XML, errno, "%s: cbuf_new", __FUNCTION__);
return retval;
}
memset(buf, 0, sizeof(buf));
if ((len = read(s, buf, sizeof(buf))) < 0){
if (errno == ECONNRESET)