stream replay and subscription update
This commit is contained in:
parent
fb0d0606e3
commit
f23a21d5db
9 changed files with 103 additions and 66 deletions
|
|
@ -107,7 +107,6 @@ ce_event_cb(clicon_handle h,
|
|||
backend_client_rm(h, ce);
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -845,14 +844,17 @@ from_client_create_subscription(clicon_handle h,
|
|||
if ((x = xpath_first(xe, "//stopTime")) != NULL){
|
||||
stoptime = xml_find_value(x, "body");
|
||||
if (str2time(stoptime, &stop) < 0){
|
||||
clicon_err(OE_PROTO, errno, "str2time");
|
||||
goto done;
|
||||
if (netconf_bad_element(cbret, "application", "<bad-element>stopTime</bad-element>", "Expected timestamp") < 0)
|
||||
goto done;
|
||||
goto ok;
|
||||
}
|
||||
}
|
||||
if ((x = xpath_first(xe, "//startTime")) != NULL){
|
||||
starttime = xml_find_value(x, "body");
|
||||
if (str2time(starttime, &start) < 0){
|
||||
clicon_err(OE_PROTO, errno, "str2time");
|
||||
if (netconf_bad_element(cbret, "application", "<bad-element>startTime</bad-element>", "Expected timestamp") < 0)
|
||||
goto done;
|
||||
goto ok;
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -729,8 +729,12 @@ main(int argc,
|
|||
return -1;
|
||||
}
|
||||
|
||||
/* Publish stream on pubsub channels XXX conditional? */
|
||||
if (stream_publish_init() < 0)
|
||||
/* Publish stream on pubsub channels.
|
||||
* CLICON_STREAM_PUB should be set to URL to where streams are published
|
||||
* and configure should be run with --enable-publish
|
||||
*/
|
||||
if (clicon_option_exists(h, "CLICON_STREAM_PUB") &&
|
||||
stream_publish_init() < 0)
|
||||
goto done;
|
||||
if ((xmldb_plugin = clicon_xmldb_plugin(h)) == NULL){
|
||||
clicon_log(LOG_ERR, "No xmldb plugin given (specify option CLICON_XMLDB_PLUGIN).\n");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue