missed the list off...

----------  Forwarded Message  ----------

Subject: Re: [Flightgear-devel] MAX_CALLSIGN_LEN
Date: Thursday 22 February 2007
From: Nick Warne <[EMAIL PROTECTED]>
To: "Csaba Halász" <[EMAIL PROTECTED]>

On Thursday 22 February 2007 16:40:57 Csaba Halász wrote:
> On 2/22/07, Nick Warne <[EMAIL PROTECTED]> wrote:
> > Yes, I understand that - but what seems to be happening here is user is
> > allowed to input callsign of 8 (or more) and only later is the string
> > looked at.  Why not just parse the string to 7 + \0 at runtime?
> >
> > It appears to me this is done every packet sent?
>
> It is just a string copy, which would have to be done anyway.
> Also, if later the protocol will support longer nicks, it will be
> totally transparent. And this limit is documented. Strictly IMHO.

Yes, OK, but why not do it at runtime?  MAX_CALLSIGN_LEN will determine the 
length no matter what when/if the protocol changes.

I don't see the sense (nor logic) in trimming a string _every_ packet when for 
all pretense and purpose it will not change during a session.  And if users 
can change callsign on the fly (I don't know if you can?), then only that 
update mechanism should address the string, surely?

Nick

-------------------------------------------------------

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to