Selaa lähdekoodia

corrected some errors (no compilation was possible)

FlorianPalm 11 vuotta sitten
vanhempi
commit
b182656ce4

+ 2 - 1
OPCUAServer/.cproject

@@ -66,7 +66,7 @@
 					<folderInfo id="org.eclipse.linuxtools.cdt.autotools.core.configuration.build.2007012728.1003956089." name="/" resourcePath="">
 						<toolChain id="org.eclipse.linuxtools.cdt.autotools.core.toolChain.1824136001" name="GNU Autotools Toolchain" superClass="org.eclipse.linuxtools.cdt.autotools.core.toolChain">
 							<targetPlatform id="org.eclipse.linuxtools.cdt.autotools.core.toolchain.targetPlatform.1920178037" isAbstract="false" name="GNU Autotools Target Platform" superClass="org.eclipse.linuxtools.cdt.autotools.core.toolchain.targetPlatform"/>
-							<builder buildPath="${workspace_loc:/OPCUAServer}/build-test" enabledIncrementalBuild="true" id="org.eclipse.linuxtools.cdt.autotools.core.toolchain.builder.1994791557" incrementalBuildTarget="check" keepEnvironmentInBuildfile="false" managedBuildOn="true" superClass="org.eclipse.linuxtools.cdt.autotools.core.toolchain.builder">
+							<builder arguments="" buildPath="${workspace_loc:/OPCUAServer}/build-test" command="make" enabledIncrementalBuild="true" id="org.eclipse.linuxtools.cdt.autotools.core.toolchain.builder.1994791557" incrementalBuildTarget="check" keepEnvironmentInBuildfile="false" managedBuildOn="true" superClass="org.eclipse.linuxtools.cdt.autotools.core.toolchain.builder">
 								<outputEntries>
 									<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="outputPath" name=""/>
 								</outputEntries>
@@ -101,6 +101,7 @@
 		</scannerConfigBuildInfo>
 	</storageModule>
 	<storageModule moduleId="refreshScope" versionNumber="2">
+		<configuration configurationName="test"/>
 		<configuration configurationName="Build (GNU)">
 			<resource resourceType="PROJECT" workspacePath="/OPCUAServer"/>
 		</configuration>

+ 4 - 4
OPCUAServer/INSTALL

@@ -1,7 +1,7 @@
 Installation Instructions
 *************************
 
-Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation,
+Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
 Inc.
 
    Copying and distribution of this file, with or without modification,
@@ -309,10 +309,9 @@ causes the specified `gcc' to be used as the C compiler (unless it is
 overridden in the site shell script).
 
 Unfortunately, this technique does not work for `CONFIG_SHELL' due to
-an Autoconf limitation.  Until the limitation is lifted, you can use
-this workaround:
+an Autoconf bug.  Until the bug is fixed you can use this workaround:
 
-     CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
+     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
 
 `configure' Invocation
 ======================
@@ -368,3 +367,4 @@ operates.
 
 `configure' also accepts some other, not widely useful, options.  Run
 `configure --help' for more details.
+

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 661
OPCUAServer/config.log


+ 25 - 15
OPCUAServer/m4/libtool.m4

@@ -1324,14 +1324,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
 	    LD="${LD-ld} -m elf_i386_fbsd"
 	    ;;
 	  x86_64-*linux*)
-	    case `/usr/bin/file conftest.o` in
-	      *x86-64*)
-		LD="${LD-ld} -m elf32_x86_64"
-		;;
-	      *)
-		LD="${LD-ld} -m elf_i386"
-		;;
-	    esac
+	    LD="${LD-ld} -m elf_i386"
 	    ;;
 	  ppc64-*linux*|powerpc64-*linux*)
 	    LD="${LD-ld} -m elf32ppclinux"
@@ -1695,8 +1688,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
     ;;
   *)
     lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
-    if test -n "$lt_cv_sys_max_cmd_len" && \
-	test undefined != "$lt_cv_sys_max_cmd_len"; then
+    if test -n "$lt_cv_sys_max_cmd_len"; then
       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
     else
@@ -2520,6 +2512,17 @@ freebsd* | dragonfly*)
   esac
   ;;
 
+gnu*)
+  version_type=linux # correct to gnu/linux during the next big refactor
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
 haiku*)
   version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
@@ -2636,7 +2639,7 @@ linux*oldld* | linux*aout* | linux*coff*)
   ;;
 
 # This must be glibc/ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
   version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
@@ -3252,6 +3255,10 @@ freebsd* | dragonfly*)
   fi
   ;;
 
+gnu*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
 haiku*)
   lt_cv_deplibs_check_method=pass_all
   ;;
@@ -3290,7 +3297,7 @@ irix5* | irix6* | nonstopux*)
   ;;
 
 # This must be glibc/ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
@@ -4042,7 +4049,7 @@ m4_if([$1], [CXX], [
 	    ;;
 	esac
 	;;
-      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+      linux* | k*bsd*-gnu | kopensolaris*-gnu)
 	case $cc_basename in
 	  KCC*)
 	    # KAI C++ Compiler
@@ -4341,7 +4348,7 @@ m4_if([$1], [CXX], [
       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
       ;;
 
-    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+    linux* | k*bsd*-gnu | kopensolaris*-gnu)
       case $cc_basename in
       # old Intel for x86_64 which still supported -KPIC.
       ecc*)
@@ -6234,6 +6241,9 @@ if test "$_lt_caught_CXX_error" != yes; then
         _LT_TAGVAR(ld_shlibs, $1)=yes
         ;;
 
+      gnu*)
+        ;;
+
       haiku*)
         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
         _LT_TAGVAR(link_all_deplibs, $1)=yes
@@ -6395,7 +6405,7 @@ if test "$_lt_caught_CXX_error" != yes; then
         _LT_TAGVAR(inherit_rpath, $1)=yes
         ;;
 
-      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+      linux* | k*bsd*-gnu | kopensolaris*-gnu)
         case $cc_basename in
           KCC*)
 	    # Kuck and Associates, Inc. (KAI) C++ Compiler

+ 9 - 1
OPCUAServer/src/opcua_binaryEncDec.c

@@ -20,7 +20,15 @@ UInt16 convertToUInt16(const char* buf, Int32 *pos)
 {
 
 	Byte t1 = buf[*pos];
-	Int32 t2 = (UInt16) (buf[*pos + 1] << 8);
+	UInt16 t2 = (UInt16) (buf[*pos + 1] << 8);
+	*pos += 2;
+	return t1 + t2;
+}
+Int16 convertToInt16(const char* buf, Int32 *pos)
+{
+
+	Byte t1 = buf[*pos];
+	Int32 t2 = (Int16) (buf[*pos + 1] << 8);
 	*pos += 2;
 	return t1 + t2;
 }

+ 7 - 1
OPCUAServer/src/opcua_binaryEncDec.h

@@ -21,7 +21,13 @@
  */
 Byte convertToByte(const char* buf, Int32 *pos);
 
-
+/**
+ *
+ * @param buf
+ * @param pos
+ * @return
+ */
+Int16 convertToInt16(const char* buf, Int32 *pos);
 /**
  *
  * @param buf

+ 2 - 7
OPCUAServer/src/opcua_encodingLayer.c

@@ -33,7 +33,8 @@ Int32 convertToDiagnosticInfo(char* buf, Int32 *pos, T_DiagnosticInfo* dstDiagno
 	dstDiagnosticInfo->symbolicId = convertToInt32(buf, pos);
 	dstDiagnosticInfo->locale = convertToInt32(buf, pos);
 	dstDiagnosticInfo->localizesText = convertToInt32(buf, pos);
-	convertToUAString(buf, pos,dstDiagnosticInfo->additionalInfo.Data);
+
+	convertToUAByteString(buf, pos, dstDiagnosticInfo->additionalInfo);
 	dstDiagnosticInfo->innerStatusCode = convertToUAStatusCode(buf, pos);
 
 	//If the Flag InnerDiagnosticInfo is set, then the DiagnosticInfo will be encoded
@@ -80,13 +81,7 @@ Int32 decodeRequestHeader(const AD_RawMessage *srcRaw, Int32 *pos,
 /** \copydoc encodeResponseHeader */
 Int32 encodeResponseHeader(const T_ResponseHeader *responseHeader, Int32 *pos, AD_RawMessage *dstBuf)
 {
-	responseHeader->timestamp = convertToUADateTime(dstBuf->message, pos);
-	responseHeader->requestHandle = convertToIntegerId(dstBuf->message, pos);
-	responseHeader->serviceResult = convertToUAStatusCode(dstBuf->message,
-			pos);
 
-	responseHeader->serviceDiagnostics = convertToDiagnosticInfo(dstBuf->message,
-			pos);
 	return 0;
 }
 

+ 4 - 4
OPCUAServer/src/opcua_encodingLayer.h

@@ -43,11 +43,11 @@ Int32 encodeRequestHeader(const T_RequestHeader *srcHeader,Int32 *pos,AD_RawMess
 Int32 decodeResponseHeader(const AD_RawMessage *srcRaw, Int32 *pos, T_ResponseHeader *dstResponseHeader);
 
 /**
- *  \brief function to encode a secureChannelRequestHeader
+ *  @brief function to encode a secureChannelRequestHeader
  *
- * \param header   a open secure channel header structure which should be encoded to binary format
- * \param dstBuf   pointer to a structure which hold the encoded header
- * \return
+ * @param header   a open secure channel header structure which should be encoded to binary format
+ * @param dstBuf   pointer to a structure which hold the encoded header
+ * @return
  */
 Int32 encodeResponseHeader(const T_ResponseHeader *responseHeader, Int32 *pos, AD_RawMessage *dstBuf);
 

+ 1 - 0
OPCUAServer/src/opcua_transportLayer.c

@@ -187,6 +187,7 @@ void TL_getMessageHeader(struct TL_header *header, AD_RawMessage *rawMessage)
 	}
 
 	pos = pos + TL_MESSAGE_TYPE_LEN;
+
 	header->Reserved = convertToByte(rawMessage->message,pos);
 	pos = pos + TL_RESERVED_LEN;
 	header->MessageSize = convertToUInt32(rawMessage->message,pos);

+ 0 - 15
OPCUAServer/tests/check_stack.c

@@ -59,14 +59,6 @@ Suite* TL_testSuite_getPacketType(void)
 }
 
 
-Suite* EC_testSuite_encodeRequestHeader()
-{
-	Suite *s = suite_create("");
-	TCase *tc_core = tcase_create("Core");
-	tcase_add_test(tc_core,<TEST_NAME>);
-	suite_add_tcase(s,tc_core);
-	return s;
-}
 /*
 Suite* TL_<TESTSUITENAME>(void)
 {
@@ -90,13 +82,6 @@ int main (void)
 	srunner_free(sr);
 
 
-	s =  EC_testSuite_encodeRequestHeader();
-	sr = srunner_create(s);
-	srunner_run_all(sr,CK_NORMAL);
-	number_failed += srunner_ntests_failed(sr);
-	srunner_free(sr);
-
-
 	/* <TESTSUITE_TEMPLATE>
 	s =  <TESTSUITENAME>;
 	sr = srunner_create(s);