etch-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vei...@apache.org
Subject svn commit: r1460567 - in /etch/trunk/binding-cpp/runtime: src/main/serialization/ src/main/transport/ toolchains/
Date Mon, 25 Mar 2013 09:46:32 GMT
Author: veithm
Date: Mon Mar 25 09:46:31 2013
New Revision: 1460567

URL: http://svn.apache.org/r1460567
Log:
Small bug fixes in Etch Code Generation and Runtime

Change-Id: Ia3507b790eb66947c8c1cf36605b1ae1ae4a699e

Modified:
    etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedDataInput.cpp
    etch/trunk/binding-cpp/runtime/src/main/serialization/EtchTaggedData.cpp
    etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorObject.cpp
    etch/trunk/binding-cpp/runtime/src/main/transport/EtchPacketizer.cpp
    etch/trunk/binding-cpp/runtime/toolchains/Windows_X86_32.toolchain

Modified: etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedDataInput.cpp
URL: http://svn.apache.org/viewvc/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedDataInput.cpp?rev=1460567&r1=1460566&r2=1460567&view=diff
==============================================================================
--- etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedDataInput.cpp (original)
+++ etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedDataInput.cpp Mon
Mar 25 09:46:31 2013
@@ -140,9 +140,13 @@ status_t EtchBinaryTaggedDataInput::read
     capu::SmartPointer<EtchValidator> v;
     if (t->getValidator(key, v) == ETCH_OK) { // read the value but ignore it.
       capu::SmartPointer<EtchObject> obj;
-      if (readValue(v, obj) == ETCH_OK) {
+      ret = readValue(v, obj);
+      if (ret == ETCH_OK) {
         sv->put(key, obj);
       }
+      else {
+        return ret;
+      }
     } else {
       capu::SmartPointer<EtchObject> obj;
       capu::SmartPointer<EtchValidator> val;
@@ -155,18 +159,19 @@ status_t EtchBinaryTaggedDataInput::read
 }
 
 status_t EtchBinaryTaggedDataInput::readValues(EtchArrayValue *av, capu::SmartPointer<EtchValidator>
v) {
+  status_t ret = ETCH_OK;
   capu::SmartPointer<EtchValidator> validator;
-  v->getElementValidator(validator);
+  ret = v->getElementValidator(validator);
 
-  while (true) {
+  while (true && ret == ETCH_OK) {
     capu::SmartPointer<EtchObject> value;
-    readValue(validator, true, value);
+    ret = readValue(validator, true, value);
     if (value == NONE()) {
       break;
     }
-    av->add(value);
+    ret = av->add(value);
   }
-  return ETCH_OK;
+  return ret;
 }
 
 status_t EtchBinaryTaggedDataInput::startMessage(capu::SmartPointer<EtchMessage> &result)
{

Modified: etch/trunk/binding-cpp/runtime/src/main/serialization/EtchTaggedData.cpp
URL: http://svn.apache.org/viewvc/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchTaggedData.cpp?rev=1460567&r1=1460566&r2=1460567&view=diff
==============================================================================
--- etch/trunk/binding-cpp/runtime/src/main/serialization/EtchTaggedData.cpp (original)
+++ etch/trunk/binding-cpp/runtime/src/main/serialization/EtchTaggedData.cpp Mon Mar 25 09:46:31
2013
@@ -49,6 +49,11 @@ const EtchObjectType* EtchTaggedData::ge
 status_t EtchTaggedData::allocNativeArray(capu::int8_t typeCode, EtchType* customStructType,
capu::int32_t dim, capu::int32_t length, capu::SmartPointer<EtchNativeArrayBase> &result)
{
   const EtchObjectType* componentType = getComponentType(typeCode, customStructType, dim
- 1);
 
+  if (!componentType) {
+    //unknown type code
+    return ETCH_ERROR;
+  }
+
   switch (componentType->getTypeId()) {
     case EOTID_INT32:
       result = new EtchNativeArray<capu::SmartPointer<EtchInt32> >(length, dim);

Modified: etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorObject.cpp
URL: http://svn.apache.org/viewvc/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorObject.cpp?rev=1460567&r1=1460566&r2=1460567&view=diff
==============================================================================
--- etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorObject.cpp (original)
+++ etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorObject.cpp Mon Mar
25 09:46:31 2013
@@ -80,5 +80,9 @@ status_t EtchValidatorObject::Get(EtchRu
 }
 
 status_t EtchValidatorObject::getElementValidator(capu::SmartPointer<EtchValidator>
&val) {
-  return EtchValidatorObject::Get(mRuntime, mNDims - 1, val);
+  if (mNDims > 0) {
+    return EtchValidatorObject::Get(mRuntime, mNDims - 1, val);
+  } else {
+    return EtchValidatorObject::Get(mRuntime, 0, val);
+  }
 }

Modified: etch/trunk/binding-cpp/runtime/src/main/transport/EtchPacketizer.cpp
URL: http://svn.apache.org/viewvc/etch/trunk/binding-cpp/runtime/src/main/transport/EtchPacketizer.cpp?rev=1460567&r1=1460566&r2=1460567&view=diff
==============================================================================
--- etch/trunk/binding-cpp/runtime/src/main/transport/EtchPacketizer.cpp (original)
+++ etch/trunk/binding-cpp/runtime/src/main/transport/EtchPacketizer.cpp Mon Mar 25 09:46:31
2013
@@ -197,7 +197,11 @@ status_t EtchPacketizer::sessionData(cap
         capu::uint32_t index = buf->getIndex();
         buf->setLength(index + mBodyLen);
         CAPU_LOG_DEBUG(mRuntime->getLogger(), TAG, "Header is parsed and the body of message
is sent to Messagizer");
-        mSession->sessionPacket(sender, buf);
+        result = mSession->sessionPacket(sender, buf);
+
+        if (result != ETCH_OK) {
+          return result;
+        }
 
         buf->setLength(length);
         buf->setIndex(index + mBodyLen);

Modified: etch/trunk/binding-cpp/runtime/toolchains/Windows_X86_32.toolchain
URL: http://svn.apache.org/viewvc/etch/trunk/binding-cpp/runtime/toolchains/Windows_X86_32.toolchain?rev=1460567&r1=1460566&r2=1460567&view=diff
==============================================================================
--- etch/trunk/binding-cpp/runtime/toolchains/Windows_X86_32.toolchain (original)
+++ etch/trunk/binding-cpp/runtime/toolchains/Windows_X86_32.toolchain Mon Mar 25 09:46:31
2013
@@ -34,8 +34,8 @@ add_definitions("-DOS_WINDOWS")
 add_definitions("-DARCH_X86_32")
 
 add_definitions("-D_VARIADIC_MAX=10") #this is needed for compiling gtest with visual studio
11
-add_definitions("-D_WIN32_WINNT=0x0501")
-add_definitions("-DWINVER=0x0501")
+add_definitions("-D_WIN32_WINNT=0x0600")
+add_definitions("-DWINVER=0x0600")
 
 # enable the BUILD_CHECK_MEMORY flag if you would like to check for memory leaks with visual
leak detector
 #add_definitions("-DBUILD_CHECK_MEMORY")



Mime
View raw message