Juha Heinanen wrote:
> i cannot understand why there is this code?
>
> if(*next_line == '\0')
> next_line +=1;
>
> if there are no more lines, why is next_line pointer advanced beyond the
> sdp body?
if you remove this, the last character of the last line will be
disregarded in cases where it is used like this
next = get_next_line(s);
string line(s, int(next-s)-2);
imo to work with \r\n and \n, and to not spill over the end of the
message, get_next_line needs to not only return the start of the next
line, but also the end of the current line and whether this is the last
line.
Stefan
>
> -- juha
> _______________________________________________
> Semsdev mailing list
> [email protected]
> http://lists.iptel.org/mailman/listinfo/semsdev
--
Stefan Sayer
VoIP Services
[EMAIL PROTECTED]
www.iptego.com
iptego GmbH
Am Borsigturm 40
13507 Berlin
Germany
Amtsgericht Charlottenburg, HRB 101010
Geschaeftsfuehrer: Alexander Hoffmann
_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev