removed cli single callback arg code

This commit is contained in:
Olof hagsand 2017-04-06 10:26:10 +02:00
parent 1e92304a52
commit 31c45e5c62
15 changed files with 368 additions and 1120 deletions

View file

@ -112,6 +112,8 @@ api_data(clicon_handle h,
retval = api_data_post(h, r, api_path, pcvec, pi, qvec, data);
else if (strcmp(request_method, "PUT")==0)
retval = api_data_put(h, r, api_path, pcvec, pi, qvec, data);
else if (strcmp(request_method, "PATCH")==0)
retval = api_data_patch(h, r, api_path, pcvec, pi, qvec, data);
else if (strcmp(request_method, "DELETE")==0)
retval = api_data_delete(h, r, api_path, pi);
else
@ -180,7 +182,7 @@ request_process(clicon_handle h,
else
retval = notfound(r);
done:
clicon_debug(1, "%s retval:%d K", __FUNCTION__, retval);
clicon_debug(1, "%s retval:%d", __FUNCTION__, retval);
if (pvec)
free(pvec);
if (dvec)

View file

@ -347,14 +347,14 @@ api_data_edit(clicon_handle h,
cbuf *cbx = NULL;
cxobj *x;
clicon_debug(1, "%s api_path:%s json:%s",
clicon_debug(1, "%s api_path:\"%s\" json:\"%s\"",
__FUNCTION__,
api_path, data);
for (i=0; i<pi; i++)
api_path = index(api_path+1, '/');
/* Parse input data as json into xml */
if (json_parse_str(data, &xdata) < 0){
clicon_debug(1, "%s json fail", __FUNCTION__);
clicon_debug(1, "%s json parse fail: %s", __FUNCTION__, data);
goto done;
}
if ((cbx = cbuf_new()) == NULL)