* New state callback signature (ca_statedata2)
* The new callback contains parameters for paging * Goal is to replace ca_statedata callback * New plugin callback when lock/unlock occurs * Add `ca_lockdb` tro plugin init to use it. * Fixed: Typing 'q' in CLI more paging did not properly quit output * Output continued but was not shown, for a very large file this could cause considerable delay * Fixed: Lock was broken in first get get access * if the first netconf operation to a backend was lock;get;unlock, the lock was broken in the first get access.
This commit is contained in:
parent
aaf9a89183
commit
caabfd464e
15 changed files with 487 additions and 233 deletions
|
|
@ -302,26 +302,29 @@ xmldb_unlock(clicon_handle h,
|
|||
* @param[in] h Clicon handle
|
||||
* @param[in] id Session id
|
||||
* @retval -1 Error
|
||||
* @retval 0 OK
|
||||
* @retval 0 OK
|
||||
*/
|
||||
int
|
||||
xmldb_unlock_all(clicon_handle h,
|
||||
uint32_t id)
|
||||
{
|
||||
int retval = -1;
|
||||
char **keys = NULL;
|
||||
size_t klen;
|
||||
int i;
|
||||
db_elmnt *de;
|
||||
int retval = -1;
|
||||
char **keys = NULL;
|
||||
size_t klen;
|
||||
int i;
|
||||
db_elmnt *de;
|
||||
|
||||
/* get all db:s */
|
||||
if (clicon_hash_keys(clicon_db_elmnt(h), &keys, &klen) < 0)
|
||||
goto done;
|
||||
for (i = 0; i < klen; i++)
|
||||
/* Identify the ones locked by client id */
|
||||
for (i = 0; i < klen; i++) {
|
||||
if ((de = clicon_db_elmnt_get(h, keys[i])) != NULL &&
|
||||
de->de_id == id){
|
||||
de->de_id = 0;
|
||||
clicon_db_elmnt_set(h, keys[i], de);
|
||||
}
|
||||
}
|
||||
retval = 0;
|
||||
done:
|
||||
if (keys)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue