summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdoardo La Greca2025-08-09 20:19:22 +0200
committerEdoardo La Greca2025-08-09 20:19:22 +0200
commit2f255179d5cc3fb2e62f44fd34ff813e98e353bb (patch)
tree7abb21f260523c5be366877174e5d8590dcaef05
parent903389ed23bdfe793bcb1aed050fbe650ea4b703 (diff)
update instantiations of OutMessage to reflect recent changes
-rw-r--r--src/main/kotlin/Connection.kt28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/main/kotlin/Connection.kt b/src/main/kotlin/Connection.kt
index 9b5af33..587f5ee 100644
--- a/src/main/kotlin/Connection.kt
+++ b/src/main/kotlin/Connection.kt
@@ -74,7 +74,7 @@ class Connection(transLay: TransportLayer) : ProtocolTranslator {
override fun version(msize: UInt, version: String) {
val omsg = OutMessage(NinePMessageType.TVERSION, this.NOTAG, listOf("msize", "version"),
mapOf(
- "msize" to BigInteger(msize.toString())
+ "msize" to Pair(BigInteger(msize.toString()), 4u)
),
mapOf(
"version" to version
@@ -106,7 +106,7 @@ class Connection(transLay: TransportLayer) : ProtocolTranslator {
override fun flush(oldtag: UShort) {
val omsg = OutMessage(NinePMessageType.TFLUSH, this.tagGen.generate(), listOf("oldtag"),
mapOf(
- "oldtag" to BigInteger(oldtag.toString())
+ "oldtag" to Pair(BigInteger(oldtag.toString()), 2u)
),
emptyMap(),
emptyMap(),
@@ -119,8 +119,8 @@ class Connection(transLay: TransportLayer) : ProtocolTranslator {
override fun attach(fid: UInt, afid: UInt, uname: String, aname: String): QID {
val omsg = OutMessage(NinePMessageType.TATTACH, this.tagGen.generate(), listOf("fid", "afid", "uname", "aname"),
mapOf(
- "fid" to BigInteger(fid.toString()),
- "afid" to BigInteger(afid.toString())
+ "fid" to Pair(BigInteger(fid.toString()), 4u),
+ "afid" to Pair(BigInteger(afid.toString()), 4u)
),
mapOf(
"uname" to uname,
@@ -141,9 +141,9 @@ class Connection(transLay: TransportLayer) : ProtocolTranslator {
val nwname = wname.size
val omsg = OutMessage(NinePMessageType.TWALK, this.tagGen.generate(), listOf("fid", "newfid", "nwname"),
mapOf(
- "fid" to BigInteger(fid.toString()),
- "newfid" to BigInteger(newfid.toString()),
- "nwname" to BigInteger(nwname.toString())
+ "fid" to Pair(BigInteger(fid.toString()), 4u),
+ "newfid" to Pair(BigInteger(newfid.toString()), 4u),
+ "nwname" to Pair(BigInteger(nwname.toString()), 2u)
),
emptyMap(),
emptyMap(),
@@ -175,8 +175,8 @@ class Connection(transLay: TransportLayer) : ProtocolTranslator {
override fun open(fid: UInt, mode: FileMode): Pair<QID, UInt> {
val omsg = OutMessage(NinePMessageType.TOPEN, this.tagGen.generate(), listOf("fid", "mode"),
mapOf(
- "fid" to BigInteger(fid.toString()),
- "mode" to BigInteger(mode.toModeByte().toString())
+ "fid" to Pair(BigInteger(fid.toString()), 4u),
+ "mode" to Pair(BigInteger(mode.toModeByte().toString()), 1u)
),
emptyMap(),
emptyMap(),
@@ -200,9 +200,9 @@ class Connection(transLay: TransportLayer) : ProtocolTranslator {
override fun read(fid: UInt, offset: ULong, count: UInt): Array<UByte> {
val omsg = OutMessage(NinePMessageType.TREAD, this.tagGen.generate(), listOf("fid", "offset", "count"),
mapOf(
- "fid" to BigInteger(fid.toString()),
- "offset" to BigInteger(offset.toString()),
- "count" to BigInteger(count.toString())
+ "fid" to Pair(BigInteger(fid.toString()), 4u),
+ "offset" to Pair(BigInteger(offset.toString()), 8u),
+ "count" to Pair(BigInteger(count.toString()), 4u)
),
emptyMap(),
emptyMap(),
@@ -221,8 +221,8 @@ class Connection(transLay: TransportLayer) : ProtocolTranslator {
val data = data.take(count.toInt()).toTypedArray()
val omsg = OutMessage(NinePMessageType.TWRITE, this.tagGen.generate(), listOf("offset", "count", "data"),
mapOf(
- "offset" to BigInteger(offset.toString()),
- "count" to BigInteger(count.toString()),
+ "offset" to Pair(BigInteger(offset.toString()), 8u),
+ "count" to Pair(BigInteger(count.toString()), 4u)
),
emptyMap(),
mapOf(