* Removed printfs in xpath-equal code

This commit is contained in:
Olof hagsand 2020-06-06 12:34:48 +02:00
parent e21e1afdc4
commit 7ffa2920a4
3 changed files with 20 additions and 9 deletions

View file

@ -25,6 +25,17 @@
## 4.6.0
Expected: July 2020
### Major New features
* Embedding restconf into the existing [libevhtp](https://github.com/criticalstack/libevhtp) embedded web server. Experimental.
* The existing FCGI restconf solution will continue to be supported for NGINX and other reverese proxies with an fast CGI API.
* The restconf code has been refactored to support both modes. Hopefully, it should be straightforward to add another embedded server, such as GNU microhttpd.
* The new restconf module is selected using a compile-time autotools configure as follows:
* `--with-restconf=fcgi FCGI interface for stand-alone web rev-proxy eg nginx (default)`
* `--with-restconf=evhtp Integrate restconf with libevhtp server`
* `--without-restconf Disable restconf altogether`
### C-API changes on existing features (For developers)
* Due to name collision with libevent, all clixon event functions prepended with `clixon_`. You need to rename your event functions as follows:

View file

@ -353,7 +353,7 @@ xpath_tree_eq(xpath_tree *xt1, /* pattern */
(xt2->xs_type == XP_PRIME_NR || xt2->xs_type == XP_PRIME_STR))
#endif
){
fprintf(stderr, "%s type %s vs %s\n", __FUNCTION__,
clicon_debug(2, "%s type %s vs %s\n", __FUNCTION__,
xpath_tree_int2str(xt1->xs_type),
xpath_tree_int2str(xt2->xs_type));
goto neq;
@ -365,19 +365,19 @@ xpath_tree_eq(xpath_tree *xt1, /* pattern */
goto eq;
}
if (xt1->xs_int != xt2->xs_int){
fprintf(stderr, "%s int\n", __FUNCTION__);
clicon_debug(2, "%s int\n", __FUNCTION__);
goto neq;
}
if (xt1->xs_double != xt2->xs_double){
fprintf(stderr, "%s double\n", __FUNCTION__);
clicon_debug(2, "%s double\n", __FUNCTION__);
goto neq;
}
if (clicon_strcmp(xt1->xs_s0, xt2->xs_s0)){
fprintf(stderr, "%s s0\n", __FUNCTION__);
clicon_debug(2, "%s s0\n", __FUNCTION__);
goto neq;
}
if (clicon_strcmp(xt1->xs_s1, xt2->xs_s1)){
fprintf(stderr, "%s s1\n", __FUNCTION__);
clicon_debug(2, "%s s1\n", __FUNCTION__);
goto neq;
}
xc1 = xt1->xs_c0;
@ -386,7 +386,7 @@ xpath_tree_eq(xpath_tree *xt1, /* pattern */
;
else{
if (xc1 == NULL || xc2 == NULL){
fprintf(stderr, "%s NULL\n", __FUNCTION__);
clicon_debug(2, "%s NULL\n", __FUNCTION__);
goto neq;
}
if ((ret = xpath_tree_eq(xc1, xc2, vec, len)) < 0)
@ -400,7 +400,7 @@ xpath_tree_eq(xpath_tree *xt1, /* pattern */
;
else{
if (xc1 == NULL || xc2 == NULL){
fprintf(stderr, "%s NULL\n", __FUNCTION__);
clicon_debug(2, "%s NULL\n", __FUNCTION__);
goto neq;
}
if ((ret = xpath_tree_eq(xc1, xc2, vec, len)) < 0)

View file

@ -78,7 +78,7 @@ APPSRC += clixon_util_xpath.c
APPSRC += clixon_util_path.c
APPSRC += clixon_util_datastore.c
APPSRC += clixon_util_regexp.c
ifeq ($(with_restconf),yes)
ifdef with_restconf
APPSRC += clixon_util_stream.c # Needs curl
endif
APPSRC += clixon_util_socket.c
@ -121,7 +121,7 @@ clixon_util_xml_mod: clixon_util_xml_mod.c $(LIBDEPS)
clixon_util_regexp: clixon_util_regexp.c $(LIBDEPS)
$(CC) $(INCLUDES) -I /usr/include/libxml2 $(CPPFLAGS) @CFLAGS@ $(LDFLAGS) $^ $(LIBS) -o $@
ifeq ($(with_restconf),yes)
ifdef with_restconf
clixon_util_stream: clixon_util_stream.c $(LIBDEPS)
$(CC) $(INCLUDES) $(CPPFLAGS) @CFLAGS@ $(LDFLAGS) $^ $(LIBS) -lcurl -o $@
endif