I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 48d7f496 authored by zzz's avatar zzz
Browse files

Fix PROTOCOL parsing

Add PROTOCOL test for raw sessions to send client
parent ed1567e9
No related branches found
No related tags found
No related merge requests found
......@@ -158,7 +158,7 @@ class SAMv3DatagramServer implements Handler {
while (tok.hasMoreTokens()) {
String t = tok.nextToken();
if (t.startsWith("PROTOCOL="))
pr = t.substring("PROTOTCOL=".length());
pr = t.substring("PROTOCOL=".length());
else if (t.startsWith("FROM_PORT="))
fp = t.substring("FROM_PORT=".length());
else if (t.startsWith("TO_PORT="))
......
......@@ -440,7 +440,10 @@ public class SAMStreamSend {
baos.write(DataHelper.getASCII(_remoteDestination));
if (_isV32) {
// only set TO_PORT to test session setting of FROM_PORT
baos.write(DataHelper.getASCII(" TO_PORT=5678"));
if (_mode == RAW)
baos.write(DataHelper.getASCII(" PROTOCOL=123 TO_PORT=5678"));
else
baos.write(DataHelper.getASCII(" TO_PORT=5678"));
}
baos.write((byte) '\n');
baos.write(data, 0, read);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment