< Previous by Date Date Index Next by Date >
< Previous in Thread Thread Index  

Re: [reSIProcate] [PATCH] SDP: Parse broken rtpmap


Hi Gregor,

We have accepted patches in the past that follow Postel's Maxim/Law to
improve interopability.  I think this patch falls into that category.
 I'll apply it, as soon as I get a chance.

Thanks!

Scott

On Mon, Aug 17, 2009 at 7:26 AM, Gregor Jasny<jasny@xxxxxxxxxx> wrote:
> Hi,
>
> The SDP content of a 3rd party client sends a broken rtpmap attribute:
>
> a=rtpmap:126 H264
>
> As you can see the rate parameter is missing. The attaches patch skips
> parsing the rate if eof is already reached.
>
> Are you willing to apply this patch or should the nonstandard behavior be
> controlled by a configuration variable?
>
> Thanks,
> Gregor
>
>
> Index: resip/stack/SdpContents.cxx
> ===================================================================
> --- resip/stack/SdpContents.cxx (revision 8543)
> +++ resip/stack/SdpContents.cxx (working copy)
> @@ -1766,9 +1766,12 @@
>    const char* anchor = pb.skipWhitespace();
>    pb.skipToChar(Symbols::SLASH[0]);
>    pb.data(mName, anchor);
> -   pb.skipChar(Symbols::SLASH[0]);
> -   mRate = pb.integer();
> -   pb.skipToChar(Symbols::SLASH[0]);
> +   if(!pb.eof())
> +   {
> +      pb.skipChar(Symbols::SLASH[0]);
> +      mRate = pb.integer();
> +      pb.skipToChar(Symbols::SLASH[0]);
> +   }
>    if(!pb.eof() && *pb.position() == Symbols::SLASH[0])
>    {
>       anchor = pb.skipChar(Symbols::SLASH[0]);
>
> _______________________________________________
> resiprocate-devel mailing list
> resiprocate-devel@xxxxxxxxxxxxxxx
> https://list.resiprocate.org/mailman/listinfo/resiprocate-devel
>