Merge branch 'develop' of https://github.com/clicon/clixon into develop
This commit is contained in:
commit
9c4ac8678d
14 changed files with 368 additions and 66 deletions
|
|
@ -104,7 +104,7 @@ typedef int (xmldb_exists_t)(xmldb_handle xh, char *db);
|
|||
typedef int (xmldb_delete_t)(xmldb_handle xh, char *db);
|
||||
|
||||
/* Type of xmldb init function */
|
||||
typedef int (xmldb_init_t)(xmldb_handle xh, char *db);
|
||||
typedef int (xmldb_create_t)(xmldb_handle xh, char *db);
|
||||
|
||||
/* plugin init struct for the api */
|
||||
struct xmldb_api{
|
||||
|
|
@ -125,7 +125,7 @@ struct xmldb_api{
|
|||
xmldb_islocked_t *xa_islocked_fn;
|
||||
xmldb_exists_t *xa_exists_fn;
|
||||
xmldb_delete_t *xa_delete_fn;
|
||||
xmldb_init_t *xa_init_fn;
|
||||
xmldb_create_t *xa_create_fn;
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
@ -150,6 +150,6 @@ int xmldb_unlock_all(clicon_handle h, int pid);
|
|||
int xmldb_islocked(clicon_handle h, char *db);
|
||||
int xmldb_exists(clicon_handle h, char *db);
|
||||
int xmldb_delete(clicon_handle h, char *db);
|
||||
int xmldb_init(clicon_handle h, char *db);
|
||||
int xmldb_create(clicon_handle h, char *db);
|
||||
|
||||
#endif /* _CLIXON_XML_DB_H */
|
||||
|
|
|
|||
|
|
@ -652,15 +652,15 @@ xmldb_delete(clicon_handle h,
|
|||
return retval;
|
||||
}
|
||||
|
||||
/*! Initialize database. Open database for writing.
|
||||
/*! Create a database. Open database for writing.
|
||||
* @param[in] h Clicon handle
|
||||
* @param[in] db Database
|
||||
* @retval 0 OK
|
||||
* @retval -1 Error
|
||||
*/
|
||||
int
|
||||
xmldb_init(clicon_handle h,
|
||||
char *db)
|
||||
xmldb_create(clicon_handle h,
|
||||
char *db)
|
||||
{
|
||||
int retval = -1;
|
||||
xmldb_handle xh;
|
||||
|
|
@ -670,7 +670,7 @@ xmldb_init(clicon_handle h,
|
|||
clicon_err(OE_DB, 0, "No xmldb plugin");
|
||||
goto done;
|
||||
}
|
||||
if (xa->xa_init_fn == NULL){
|
||||
if (xa->xa_create_fn == NULL){
|
||||
clicon_err(OE_DB, 0, "No xmldb function");
|
||||
goto done;
|
||||
}
|
||||
|
|
@ -678,7 +678,7 @@ xmldb_init(clicon_handle h,
|
|||
clicon_err(OE_DB, 0, "Not connected to datastore plugin");
|
||||
goto done;
|
||||
}
|
||||
retval = xa->xa_init_fn(xh, db);
|
||||
retval = xa->xa_create_fn(xh, db);
|
||||
done:
|
||||
return retval;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue