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()) {
|
while (tok.hasMoreTokens()) {
|
||||||
String t = tok.nextToken();
|
String t = tok.nextToken();
|
||||||
if (t.startsWith("PROTOCOL="))
|
if (t.startsWith("PROTOCOL="))
|
||||||
pr = t.substring("PROTOTCOL=".length());
|
pr = t.substring("PROTOCOL=".length());
|
||||||
else if (t.startsWith("FROM_PORT="))
|
else if (t.startsWith("FROM_PORT="))
|
||||||
fp = t.substring("FROM_PORT=".length());
|
fp = t.substring("FROM_PORT=".length());
|
||||||
else if (t.startsWith("TO_PORT="))
|
else if (t.startsWith("TO_PORT="))
|
||||||
|
@ -440,7 +440,10 @@ public class SAMStreamSend {
|
|||||||
baos.write(DataHelper.getASCII(_remoteDestination));
|
baos.write(DataHelper.getASCII(_remoteDestination));
|
||||||
if (_isV32) {
|
if (_isV32) {
|
||||||
// only set TO_PORT to test session setting of FROM_PORT
|
// 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((byte) '\n');
|
||||||
baos.write(data, 0, read);
|
baos.write(data, 0, read);
|
||||||
|
Reference in New Issue
Block a user