Parcourir la source

added configure --enable-default=verbose, fixed responseHeader.stringTableSize=-1

Leon Urbas il y a 11 ans
Parent
commit
dc8b46c94f
3 fichiers modifiés avec 10 ajouts et 5 suppressions
  1. 1 1
      Makefile.am
  2. 8 3
      configure.ac
  3. 1 1
      src/ua_secureLayer.c

+ 1 - 1
Makefile.am

@@ -1,6 +1,6 @@
 AM_CFLAGS = -std=c99 -pedantic -pipe -fPIC -fno-exceptions -fstack-protector -Wl,-z,relro -Wl,-z,now -fvisibility=hidden -W -Wall -Wno-unused-parameter -Wno-unused-function -Wno-unused-label -Wpointer-arith -Wformat -Wreturn-type -Wsign-compare -Wmultichar -Wformat-nonliteral -Winit-self -Wuninitialized -Wno-deprecated -Wformat-security -Werror
 if DEBUG
-AM_CFLAGS += -g3 -O0 -DDEBUG=1 -DVERBOSE=1
+AM_CFLAGS += -g3 -O0
 else
 AM_CFLAGS += -O2 
 endif

+ 8 - 3
configure.ac

@@ -33,17 +33,22 @@ AC_ARG_ENABLE(debug,
 AS_HELP_STRING([--enable-debug],
                [enable debugging, default: no]),
 			   [case "${enableval}" in
-               		 yes) debug=true ;;
-             		 no)  debug=false ;;
+               		 yes) debug=true, verbose=false ;;
+             		 no)  debug=false, verbose=false ;;
+             		 verbose) debug=true, verbose=true;;
              		 *)   AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;; esac],
 				[debug=false])
 AM_CONDITIONAL(DEBUG, test x"$debug" = x"true")
 AM_COND_IF([DEBUG],
     AC_DEFINE([DEBUG])) #define DEBUG is accessible from pre-processor
 
+AM_CONDITIONAL(VERBOSE, test x"$verbose" = x"true")
+AM_COND_IF([VERBOSE],
+    AC_DEFINE([VERBOSE])) #define VERBOSE is accessible from pre-processor
+
 AC_ARG_ENABLE(multithreading,
 AS_HELP_STRING([--enable-multithreading],
-               [enable debugging, default: yes]),
+               [enable multithreading, default: yes]),
 			   [case "${enableval}" in
                		 yes) multithreading=true ;;
              		 no)  multithreading=false ;;

+ 1 - 1
src/ua_secureLayer.c

@@ -343,7 +343,7 @@ UA_SL_handleRequestTableEntry* getHRTEntry(UA_Int32 methodNodeId) {
 UA_Int32 UA_ResponseHeader_initFromRequest(UA_RequestHeader const * p, UA_ResponseHeader * r) {
 	r->requestHandle = p->requestHandle;
 	r->serviceResult = UA_STATUSCODE_GOOD;
-	r->stringTableSize = 0;
+	r->stringTableSize = -1;
 	r->timestamp = UA_DateTime_now();
 	return UA_SUCCESS;
 }