Commit 0ac52e22 authored by baire's avatar baire
Browse files

decode SentProtocol

parent 59c012d5
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -724,4 +724,21 @@ void From::PreDecodeField (int id, Buffer& buffer) throw (DecodeError)

}

void SentProtocol::PreDecodeField (int id, Buffer& buffer) throw (DecodeError)
{

	if (id) {
		static Regex reg_slash ("^/");
		reg_slash.AssertMatch (buffer, this);
		buffer.SetPosition(buffer.GetPosition() + reg_slash.GetMatchedLength());
	}

	static Regex reg_sp ("^" SIPREG_TOKEN);

	reg_sp.AssertMatch (buffer, this);

	SetHypFieldLength (id, reg_sp.GetMatchedLength());
}


}} // namespaces