[asterisk-dev] svn blame

Philipp Kempgen philipp.kempgen at amooma.de
Thu Oct 23 13:08:56 CDT 2008


Philipp Kempgen schrieb:
> Klaus Darilion schrieb:
> 
>> I just wondered why this patch was added from 1.4.21.2 to 1.4.22 in 
>> chan_sip.c
>> 
>> 
>> @@ -4919,7 +4937,7 @@
>>          content_type = get_header(req, "Content-Type");
>> 
>>          /* if the body contains only SDP, this is easy */
>> -       if (!strcasecmp(content_type, "application/sdp")) {
>> +       if (!strncasecmp(content_type, "application/sdp", 15)) {
>>                  req->sdp_start = 0;
>>                  req->sdp_end = req->lines;
>>                  return req->lines ? 1 : 0;
> 
>> PS: Is there an easy way to find the corresponding commit (to read the 
>> commit comment)?
> 
> svn blame
> http://svnbook.red-bean.com/en/1.4/svn.ref.svn.c.blame.html
> 
> svn blame channels/chan_sip.c | grep 'application/sdp'

For those who are curious:

svn log -r 122918:122919
---cut---
Only compare the first 15 characters so that even if the charset
is specified we still accept it as SDP.
(closes issue #12803)
---cut---
http://bugs.digium.com/view.php?id=12803

The proper way would be to look for ";" in
"application/sdp; charset=utf-8" but strncasecmp(,,15) does the
trick.

   Philipp Kempgen

-- 
http://www.das-asterisk-buch.de  -  http://www.the-asterisk-book.com
Amooma GmbH - Bachstr. 126 - 56566 Neuwied  ->  http://www.amooma.de
Geschäftsführer: Stefan Wintermeyer, Handelsregister: Neuwied B14998
-- 



More information about the asterisk-dev mailing list