[Gabel-guys] gabel/src/net/sf/gabel/server KnownNodeServer.java,1.3,1.4
Status: Alpha
Brought to you by:
alllee
|
From: allen l. <al...@us...> - 2004-05-12 15:16:38
|
Update of /cvsroot/gabel/gabel/src/net/sf/gabel/server In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23208/net/sf/gabel/server Modified Files: KnownNodeServer.java Log Message: - fixed 'quit' command - fixed a StringIndexOutOfBoundsException with the 'rem' command. - TODO: turn these into Command objects. Index: KnownNodeServer.java =================================================================== RCS file: /cvsroot/gabel/gabel/src/net/sf/gabel/server/KnownNodeServer.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** KnownNodeServer.java 12 May 2004 10:08:16 -0000 1.3 --- KnownNodeServer.java 12 May 2004 15:16:29 -0000 1.4 *************** *** 309,313 **** System.out.println("System up and running..."); System.out.println("Type help for instructions"); ! while (true) { System.out.print("> "); line = inp.readLine(); --- 309,313 ---- System.out.println("System up and running..."); System.out.println("Type help for instructions"); ! while (running) { System.out.print("> "); line = inp.readLine(); *************** *** 349,354 **** if (line.startsWith("rem")) { ! rest = line.substring(4); ! removeService(rest); } --- 349,360 ---- if (line.startsWith("rem")) { ! if ( line.length() > 4 ) { ! rest = line.substring(4); ! boolean removed = removeService(rest); ! if ( ! removed ) { ! logger.warning("Tried to remove service: " + rest + ": failed."); ! } ! } ! } *************** *** 377,380 **** --- 383,387 ---- */ kns.repl(); + // FIXME: maybe this isnt' bad. throw new RuntimeException("repl returned, uhoh!!"); } catch (Exception e) { |