Преглед изворни кода

Introspection data related to null character (0x00) same with pki data was solved and CT4.1.1 Bridge, VOD and VOD List behaviour was passed with CTT 2002.4.2 fully.

Trishia пре 4 година
родитељ
комит
4ba549c7db

BIN
app/libs/iotivity-lite.jar


+ 12 - 5
app/src/main/java/org/iotivity/bridge/homeserver/BridgeServer.java

@@ -681,11 +681,18 @@ public class BridgeServer {
         }
         }
 
 
         if(baos!=null) {
         if(baos!=null) {
-            int len = baos.toByteArray().length ;
-            byte[] result = Arrays.copyOf(baos.toByteArray(), len + 1);
-            result[len] = (byte)0x00;
-            Log.d(TAG, "bytes length = " + result.length);
-            return result ;
+            Log.d(TAG, "bytes length = " + baos.toByteArray().length);
+            return baos.toByteArray() ;
+
+            /*int len = baos.toByteArray().length ;
+            if(baos.toByteArray()[len-1] != (byte)0x00 ) {
+                byte[] result = Arrays.copyOf(baos.toByteArray(), len + 1);
+                result[len] = (byte) 0x00;
+                Log.d(TAG, "bytes length = " + result.length);
+                return result;
+            } else {
+                return baos.toByteArray() ;
+            }*/
         }
         }
         return null;
         return null;
     }
     }

+ 12 - 5
app/src/main/java/org/iotivity/bridge/homeserver/handler/BridgeInitHandler.java

@@ -115,11 +115,18 @@ public class BridgeInitHandler implements OCMainInitHandler {
         }
         }
 
 
         if(baos!=null) {
         if(baos!=null) {
-            int len = baos.toByteArray().length ;
-            byte[] result = Arrays.copyOf(baos.toByteArray(), len + 1);
-            result[len] = (byte)0x00;
-            Log.d(TAG, "bytes length = " + result.length);
-            return result ;
+            Log.d(TAG, "bytes length = " + baos.toByteArray().length);
+            return baos.toByteArray() ;
+
+            /*int len = baos.toByteArray().length ;
+            if(baos.toByteArray()[len-1] != (byte)0x00 ) {
+                byte[] result = Arrays.copyOf(baos.toByteArray(), len + 1);
+                result[len] = (byte) 0x00;
+                Log.d(TAG, "bytes length = " + result.length);
+                return result;
+            } else {
+                return baos.toByteArray() ;
+            }*/
         }
         }
         return null;
         return null;
     }
     }

BIN
app/src/main/jniLibs/arm64-v8a/libiotivity-lite-jni.so


BIN
app/src/main/jniLibs/armeabi-v7a/libiotivity-lite-jni.so


BIN
app/src/main/jniLibs/x86/libiotivity-lite-jni.so


BIN
app/src/main/jniLibs/x86_64/libiotivity-lite-jni.so