Browse Source

don't send reset message due problem at other side

pull/189/head
orignal 10 years ago
parent
commit
c873e9dd68
  1. 6
      Streaming.cpp
  2. 2
      Streaming.h

6
Streaming.cpp

@ -487,7 +487,7 @@ namespace stream
LogPrint (eLogInfo, "Trying to send stream data before closing"); LogPrint (eLogInfo, "Trying to send stream data before closing");
break; break;
case eStreamStatusReset: case eStreamStatusReset:
SendClose (true); // send reset SendClose ();
Terminate (); Terminate ();
m_LocalDestination.DeleteStream (shared_from_this ()); m_LocalDestination.DeleteStream (shared_from_this ());
break; break;
@ -510,7 +510,7 @@ namespace stream
}; };
} }
void Stream::SendClose (bool reset) void Stream::SendClose ()
{ {
Packet * p = new Packet (); Packet * p = new Packet ();
uint8_t * packet = p->GetBuffer (); uint8_t * packet = p->GetBuffer ();
@ -526,7 +526,7 @@ namespace stream
packet[size] = 0; packet[size] = 0;
size++; // NACK count size++; // NACK count
size++; // resend delay size++; // resend delay
htobe16buf (packet + size, (reset ? PACKET_FLAG_RESET : PACKET_FLAG_CLOSE) | PACKET_FLAG_SIGNATURE_INCLUDED); htobe16buf (packet + size, PACKET_FLAG_CLOSE | PACKET_FLAG_SIGNATURE_INCLUDED);
size += 2; // flags size += 2; // flags
size_t signatureLen = m_LocalDestination.GetOwner ().GetIdentity ().GetSignatureLen (); size_t signatureLen = m_LocalDestination.GetOwner ().GetIdentity ().GetSignatureLen ();
htobe16buf (packet + size, signatureLen); // signature only htobe16buf (packet + size, signatureLen); // signature only

2
Streaming.h

@ -138,7 +138,7 @@ namespace stream
void SendBuffer (); void SendBuffer ();
void SendQuickAck (); void SendQuickAck ();
void SendClose (bool reset = false); void SendClose ();
bool SendPacket (Packet * packet); bool SendPacket (Packet * packet);
void SendPackets (const std::vector<Packet *>& packets); void SendPackets (const std::vector<Packet *>& packets);

Loading…
Cancel
Save