test stream util function

This commit is contained in:
Olof hagsand 2018-10-29 22:38:34 +01:00
parent 7450eae046
commit e4adec413a
5 changed files with 233 additions and 5 deletions

View file

@ -304,8 +304,7 @@ clixon_plugin_init(clicon_handle h)
*/
if (clicon_option_exists(h, "CLICON_STREAM_RETENTION"))
retention.tv_sec = clicon_option_int(h, "CLICON_STREAM_RETENTION");
if (stream_add(h, "EXAMPLE", "Example event stream", 1,
retention.tv_sec?&retention:NULL) < 0)
if (stream_add(h, "EXAMPLE", "Example event stream", 1, &retention) < 0)
goto done;
/* assumes: CLIXON_PUBLISH_STREAMS, eg configure --enable-publish
*/