diff options
Diffstat (limited to 'lib/jinterface/java_src')
| -rw-r--r-- | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java index d8f4d442dd..502c830c48 100644 --- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java +++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java @@ -700,24 +700,22 @@ public class OtpOutputStream extends ByteArrayOutputStream { * the nodename. * * @param id - * an arbitrary number. Only the low order 15 bits will be used. + * an arbitrary number. * * @param serial - * another arbitrary number. Only the low order 13 bits will be - * used. + * another arbitrary number. * * @param creation - * yet another arbitrary number. Only the low order 2 bits will - * be used. + * node incarnation number. * */ public void write_pid(final String node, final int id, final int serial, final int creation) { write1(OtpExternal.newPidTag); write_atom(node); - write4BE(id & 0x7fff); // 15 bits - write4BE(serial & 0x1fff); // 13 bits - write1(creation & 0x3); // 2 bits + write4BE(id); + write4BE(serial); + write4BE(creation); } /** @@ -813,12 +811,11 @@ public class OtpOutputStream extends ByteArrayOutputStream { * the nodename. * * @param ids - * an array of arbitrary numbers. Only the low order 18 bits of - * the first number will be used. At most three numbers + * an array of arbitrary numbers. At most three numbers * will be read from the array. * * @param creation - * another arbitrary number. Only the low order 2 bits will be used. + * another arbitrary number. * */ public void write_ref(final String node, final int[] ids, final int creation) { @@ -834,13 +831,9 @@ public class OtpOutputStream extends ByteArrayOutputStream { write_atom(node); - write1(creation & 0x3); // 2 bits + write4BE(creation); - // first int gets truncated to 18 bits - write4BE(ids[0] & 0x3ffff); - - // remaining ones are left as is - for (int i = 1; i < arity; i++) { + for (int i = 0; i < arity; i++) { write4BE(ids[i]); } } |
