* Ensured you can add multiple callbacks for any RPC, including basic ones.
* Extra RPC:s will be called _after_ the basic ones.
* One specific usecase is hook for `copy-config` (see [doc/ROADMAP.md] that can be implemented thus way.
* `rpc_callback_register` added a namespace parameter. Example:
```
rpc_callback_register(h, empty_rpc, NULL, "urn:example:clixon", "empty");
```
This commit is contained in:
parent
748c7282ea
commit
b1c74b5f1f
18 changed files with 755 additions and 514 deletions
|
|
@ -1674,7 +1674,7 @@ api_operations_post(clicon_handle h,
|
|||
*/
|
||||
if ((ret = rpc_callback_call(h, xbot, cbret, r)) < 0)
|
||||
goto done;
|
||||
if (ret == 1){ /* Handled locally */
|
||||
if (ret > 0){ /* Handled locally */
|
||||
if (xml_parse_string(cbuf_get(cbret), NULL, &xret) < 0)
|
||||
goto done;
|
||||
/* Local error: return it and quit */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue