handle options in proper sequence

pull/92/head
orignal 10 years ago
parent 4cb98757ce
commit 462436acba

@ -543,8 +543,9 @@ namespace util
}
else
{
std::string response ("HTTP/1.0 200 OK\r\n");
std::string response ("HTTP/1.0 503 Not Implemented\r\n");
m_Stream->Send ((uint8_t *)response.c_str (), response.length (), 30);
m_Stream->Close ();
}
delete this;
}

@ -29,7 +29,7 @@ namespace stream
Stream::Stream (boost::asio::io_service& service, StreamingDestination * local):
m_Service (service), m_SendStreamID (0), m_SequenceNumber (0), m_LastReceivedSequenceNumber (0),
m_IsOpen (false), m_IsOutgoing(true), m_LeaseSetUpdated (true), m_LocalDestination (local),
m_IsOpen (true), m_IsOutgoing(true), m_LeaseSetUpdated (true), m_LocalDestination (local),
m_RemoteLeaseSet (nullptr), m_ReceiveTimer (m_Service)
{
m_RecvStreamID = i2p::context.GetRandomNumberGenerator ().GenerateWord32 ();
@ -114,12 +114,6 @@ namespace stream
{
LogPrint ("Synchronize");
}
if (flags & PACKET_FLAG_SIGNATURE_INCLUDED)
{
LogPrint ("Signature");
optionData += 40;
}
if (flags & PACKET_FLAG_FROM_INCLUDED)
{
@ -135,6 +129,18 @@ namespace stream
optionData += sizeof (i2p::data::Identity);
}
if (flags & PACKET_FLAG_MAX_PACKET_SIZE_INCLUDED)
{
LogPrint ("Max packet size");
optionData += 2;
}
if (flags & PACKET_FLAG_SIGNATURE_INCLUDED)
{
LogPrint ("Signature");
optionData += 40;
}
packet->offset = packet->GetPayload () - packet->buf;
if (packet->GetLength () > 0)
{

Loading…
Cancel
Save