forked from I2P_Developers/i2p.i2p
Fix PROTOCOL parsing
Add PROTOCOL test for raw sessions to send client
This commit is contained in:
@ -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,6 +440,9 @@ public class SAMStreamSend {
|
||||
baos.write(DataHelper.getASCII(_remoteDestination));
|
||||
if (_isV32) {
|
||||
// only set TO_PORT to test session setting of FROM_PORT
|
||||
if (_mode == RAW)
|
||||
baos.write(DataHelper.getASCII(" PROTOCOL=123 TO_PORT=5678"));
|
||||
else
|
||||
baos.write(DataHelper.getASCII(" TO_PORT=5678"));
|
||||
}
|
||||
baos.write((byte) '\n');
|
||||
|
Reference in New Issue
Block a user