cleaned up string functions

This commit is contained in:
Olof hagsand 2017-04-04 17:11:21 +02:00
parent 75e1ea7c1c
commit 236b661e43
18 changed files with 245 additions and 427 deletions

View file

@ -694,7 +694,7 @@ from_client_create_subscription(clicon_handle h,
}
}
}
if (client_subscription_add(ce, stream, MSG_NOTIFY_XML, filter) == NULL)
if (client_subscription_add(ce, stream, FORMAT_XML, filter) == NULL)
goto done;
cprintf(cbret, "<rpc-reply><ok/></rpc-reply>");
ok:

View file

@ -72,7 +72,7 @@
#include "backend_handle.h"
/* Command line options to be passed to getopt(3) */
#define BACKEND_OPTS "hD:f:d:Fzu:P:1IRCc:rg:pt"
#define BACKEND_OPTS "hD:f:d:Fzu:P:1IRCc:rg:pty:"
/*! Terminate. Cannot use h after this */
static int
@ -426,6 +426,9 @@ main(int argc, char **argv)
case 't' : /* Print alternative dbspec format (eg if YANG, print KEY) */
printalt++;
break;
case 'y' : /* yang module */
clicon_option_str_set(h, "CLICON_YANG_MODULE_MAIN", optarg);
break;
default:
usage(argv[0], h);
break;

View file

@ -162,7 +162,7 @@ backend_notify(clicon_handle h,
/* Then go thru all global (handle) subscriptions and find matches */
hs = NULL;
while ((hs = subscription_each(h, hs)) != NULL){
if (hs->hs_format != MSG_NOTIFY_TXT)
if (hs->hs_format != FORMAT_TEXT)
continue;
if (strcmp(hs->hs_stream, stream))
continue;
@ -240,7 +240,7 @@ backend_notify_xml(clicon_handle h,
/* Then go thru all global (handle) subscriptions and find matches */
hs = NULL;
while ((hs = subscription_each(h, hs)) != NULL){
if (hs->hs_format != MSG_NOTIFY_XML)
if (hs->hs_format != FORMAT_XML)
continue;
if (strcmp(hs->hs_stream, stream))
continue;