Skip to content

Commit 53e5f2f

Browse files
committed
Updated to work with the with the iOS New VM.
1 parent 74c7320 commit 53e5f2f

File tree

4 files changed

+7
-0
lines changed

4 files changed

+7
-0
lines changed

CN1SocketsDemo/lib/CN1Sockets.cn1lib

-1.03 KB
Binary file not shown.

build.xml

+1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858

5959
<target name="jar" depends="compile,Stubs">
6060
<mkdir dir="build/lib" />
61+
<mkdir dir="build/stubs"/>
6162
<zip basedir="${build.classes.dir}" compress="false" destfile="build/lib/main.zip" />
6263
<zip basedir="build/stubs" compress="false" destfile="build/lib/stubs.zip" />
6364
<copy file="manifest.properties" todir="build/lib" />

dist/CN1Sockets.cn1lib

-1.03 KB
Binary file not shown.

native/ios/ca_weblite_codename1_net_impl_NativeSocketImpl.m

+6
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,15 @@ -(int)readBuf:(int)len{
142142
return -1;
143143
}
144144
errorMessage = NULL;
145+
#ifndef NEW_CODENAME_ONE_VM
145146
org_xmlvm_runtime_XMLVMArray* byteArray = ca_weblite_codename1_net_Socket_getBuffer___int(bufferId);
146147
JAVA_ARRAY_BYTE* buffer = (JAVA_ARRAY_BYTE*)byteArray->fields.org_xmlvm_runtime_XMLVMArray.array_;
147148
if ( len > byteArray->fields.org_xmlvm_runtime_XMLVMArray.length_){
149+
#else
150+
JAVA_ARRAY byteArray = (JAVA_ARRAY)ca_weblite_codename1_net_Socket_getBuffer___int_R_byte_1ARRAY(CN1_THREAD_GET_STATE_PASS_ARG bufferId);
151+
JAVA_ARRAY_BYTE* buffer = (JAVA_ARRAY_BYTE*)byteArray->data;
152+
if ( len > byteArray->length){
153+
#endif
148154
errorMessage = @"Attempt to read byte array longer than the buffer.";
149155
return -2;
150156
}

0 commit comments

Comments
 (0)