On Sun, Mar 6, 2011 at 1:23 AM, Csaba Halász <csaba.hal...@gmail.com> wrote:
> On Sat, Mar 5, 2011 at 6:09 PM, Roberto Inzerillo <rob...@gmx.net> wrote:
>>
>> Is it FlightGear not parsing correctly the string input? Maybe attaching to 
>> it any \n it receives as a part of the string?
>
> Yes. That code could use some cleanup.
> First, it calls the simgear io channel function readline() which
> simply uses \n as delimiter, not knowing about the line separator
> specified in the protocol file. Then, the \n is left in the buffer and
> thus processed with the last chunk.

Just committed a quick fix which:
1) warns if given line separator doesn't end with a newline, and adds it
2) warns if any input data doesn't end with the expected line separator
3) strips the line separator from the input

Ideally, we'd have to pass down the line separator to simgear, but
that's for another time.
Report if I have broken something.

-- 
Csaba/Jester

------------------------------------------------------------------------------
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to