Restore xmldb_get() to original (but removed one parameter

Moved all zero-copy xmldb_get functions to xmldb_get0.
Clarified CHANGELOG for xmldb_get changes
This commit is contained in:
Olof hagsand 2019-06-04 11:14:03 +02:00
parent 2aeb925521
commit 3dba0b5370
11 changed files with 93 additions and 66 deletions

View file

@ -102,12 +102,12 @@ db_merge(clicon_handle h,
cxobj *xt = NULL;
/* Get data as xml from db1 */
if (xmldb_get(h, (char*)db1, NULL, 0, &xt, NULL) < 0)
if (xmldb_get0(h, (char*)db1, NULL, 0, &xt, NULL) < 0)
goto done;
/* Merge xml into db2. Without commit */
retval = xmldb_put(h, (char*)db2, OP_MERGE, xt, clicon_username_get(h), cbret);
done:
xmldb_get_free(h, &xt);
xmldb_get0_free(h, &xt);
return retval;
}
@ -269,7 +269,7 @@ startup_extraxml(clicon_handle h,
ok:
retval = 1;
done:
xmldb_get_free(h, &xt);
xmldb_get0_free(h, &xt);
if (xmldb_delete(h, db) != 0 && errno != ENOENT)
return -1;
return retval;