Hi Geoff,

IIRC, I have sanitized the METAR string long ago and stripped the 
newlines before writing the property.
Looks like it has crept back in somehow. I'll see if I can find what 
happened, not sure if I can make it before the end of the year ;-)

Cheers, Torsten

Am 30.12.11 21:03, schrieb Geoff McLane:
> Hi all...
>
> I am sure this worked before, but now I seem unable to
> get the WHOLE metar string from /environment/metar/data...
>
> This is in a perl script, using IO::Socket - in the past
> it worked perfectly ;=))
>
> In the Debug ->  Browse Internal Properties I can 'see'
> the whole string like say -
> '2011/12/30 17:00\nYSDU 301700Z AUTO 12010KT etc...'
>
> But now my perl script ONLY receives the data before the
> '\n'... using either simple --telnet=5555, which is slow,
> or say --telnet=foo,bar,20,foo,5555,bar, which reduces
> the average access time to less than 0.1 seconds, as the
> FG command...
>
> Of course in the script I have tried setting the socket
> handle to binmode $SOCKET, but this does not help...
>
> As I say this worked before - perhaps months ago - probably
> prior 2.4 release... but I do not remember this '\n' being
> in the string...
>
> I have tried testing if (!eof $SOCKET) and doing a 2nd
> read, $val =<$SOCKET>, but this always blocks! ;=((
>
> It seems either the internal handling of sending of this string
> has changed, and it stops at the '\n', and the balance of the
> string is sent as a 2nd, 3rd, or 4th send, after other 'gets'
>
> That is, if I send 'get /environment/metar/data', receive the
> first part, then follow quickly with some other 'get ...'
> of some other 'properties', it seems the second part
> of the metar is then sent in reply to one of the subsequent
> get requests, which, as you can imagine, can create
> a REAL MESS ;=((
>
> It is simply not predictable in which of the subsequent 'gets'
> where the balance of the string will appear... but it does
> usually appear... and puts all other 'gets' out of order...
>
> But is 'lost' if I wait several seconds before the next
> get...
>
> And I have no problem with HUNDREDS of other 'gets',
> T/F, doubles, strings, provided I do not try to get this
> specific metar string... or if I put a several seconds delay
> after it, before the next get...
>
> Anyway, is this just me, or has the FG telnet code
> changed somehow? Or simply has this '\n' has been added to
> the metar string relatively recently, and telnet 'stumbles'
> on this LF...
>
> Now that I have tried everything I can think of to change
> my perl script handling, setting non-blocking, add delays, etc,
> etc, etc, will also take a look at the FG code, but meantime
> maybe someone can offer some quick pointers...
>
> Help needed...
>
> Regards,
> Geoff.
>
> PS: I have added a simple telnet perl script, chopped from
> my larger script, which should demonstrates the problem...
>   http://geoffair.org/tmp/simptelnet.txt
> run with a command say 'localhost 5555', or whatever...
>
> But also maybe perl/telnet experts can point out the error
> in the script ;=() or offer suggestions...
>
>
>
> ------------------------------------------------------------------------------
> Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
> infrastructure or vast IT resources to deliver seamless, secure access to
> virtual desktops. With this all-in-one solution, easily deploy virtual
> desktops for less than the cost of PCs and save 60% on VDI infrastructure
> costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
> _______________________________________________
> Flightgear-devel mailing list
> Flightgear-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/flightgear-devel
>
>


------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to