forked from I2P_Developers/i2p.i2p
streaming: Allow i2p.streaming.profile != 1
previously threw an exception even though value was mostly ignored and never set by i2ptunnel. i2pd plans to start using this option. Do not set profile flag in streaming header, it is unused.
This commit is contained in:
@ -196,11 +196,13 @@ class ConnectionDataReceiver implements MessageOutputStream.DataReceiver {
|
||||
// bugfix release 0.7.8, we weren't dividing by 1000
|
||||
packet.setResendDelay(_connection.getOptions().getResendDelay() / 1000);
|
||||
|
||||
/*
|
||||
if (_connection.getOptions().getProfile() == ConnectionOptions.PROFILE_INTERACTIVE)
|
||||
packet.setFlag(Packet.FLAG_PROFILE_INTERACTIVE, true);
|
||||
else
|
||||
packet.setFlag(Packet.FLAG_PROFILE_INTERACTIVE, false);
|
||||
|
||||
*/
|
||||
|
||||
//if ( (!ackOnly) && (packet.getSequenceNum() <= 0) ) {
|
||||
if (isFirst) {
|
||||
packet.setFlag(Packet.FLAG_SYNCHRONIZE);
|
||||
|
@ -814,9 +814,15 @@ class ConnectionOptions extends I2PSocketOptionsImpl {
|
||||
* @return the profile of the connection.
|
||||
*/
|
||||
public int getProfile() { return _profile; }
|
||||
|
||||
|
||||
/**
|
||||
* Set the profile for this connection.
|
||||
* Through API 0.9.63, threw an IllegalArgumentException for any value !=1.
|
||||
* As of API 0.9.64, all values are saved.
|
||||
* Warning: unused.
|
||||
*/
|
||||
public void setProfile(int profile) {
|
||||
if (profile != PROFILE_BULK)
|
||||
throw new IllegalArgumentException("Only bulk is supported so far");
|
||||
_profile = profile;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user