On 2013-04-15 23:08, Mike Gabriel wrote:
@Devs: I suspect we have to query x2gogetport 3x times during one run of x2gostartagent to make sure that more-than-one instances of x2gostartagent (run by different users at the very same time, a typical class room situation) do not interfere with each other.
I don't know how you come to the 3x conclusion, but looking at the code I'd suggest that USED_NONSSH_PORTS as well as USED_PORTS either be turned into a function or get updated within the while-loop. That should reduce the amount of failures.
This probably has to happen in x2goresume-session, as well.
Considering the amount of perl and code duplication we should consider putting that into a function and sourcing it or rewriting the whole thing in perl. Unfortunately currently time is very scarce for me.
Morty
-- Dipl.-Ing. Moritz 'Morty' Struebe (Wissenschaftlicher Mitarbeiter) Lehrstuhl für Informatik 4 (Verteilte Systeme und Betriebssysteme) Friedrich-Alexander-Universität Erlangen-Nürnberg Martensstr. 1 91058 Erlangen
Tel : +49 9131 85-25419 Fax : +49 9131 85-28732 eMail : struebe@informatik.uni-erlangen.de WWW : http://www4.informatik.uni-erlangen.de/~morty