[jetrix-cvs] SF.net SVN: jetrix:[732] jetrix/branches/0.2.x/src/java/net/jetrix/services /Publishin
Brought to you by:
smanux
From: <sm...@us...> - 2008-08-22 13:13:56
|
Revision: 732 http://jetrix.svn.sourceforge.net/jetrix/?rev=732&view=rev Author: smanux Date: 2008-08-22 13:13:53 +0000 (Fri, 22 Aug 2008) Log Message: ----------- Publish the server address to servers.tetrinet.fr only since the other directories are no longer available Modified Paths: -------------- jetrix/branches/0.2.x/src/java/net/jetrix/services/PublishingService.java Modified: jetrix/branches/0.2.x/src/java/net/jetrix/services/PublishingService.java =================================================================== --- jetrix/branches/0.2.x/src/java/net/jetrix/services/PublishingService.java 2008-08-22 08:29:00 UTC (rev 731) +++ jetrix/branches/0.2.x/src/java/net/jetrix/services/PublishingService.java 2008-08-22 13:13:53 UTC (rev 732) @@ -60,7 +60,7 @@ public PublishingService() { setDelay(1000); - setPeriod(24 * 3600 * 1000); + setPeriod(24 * 3600 * 1000); // 24 hours } public void setHost(String host) @@ -91,46 +91,18 @@ log.info("Publishing server address to online directories... (" + host + ")"); - // publishing to tfast.org + // publishing to servers.tetrinet.fr try { - String url = "http://www.tfast.org/en/add.php"; + String url = "http://servers.tetrinet.fr/server-add.jsp"; Map<String, String> params = new HashMap<String, String>(); - params.put("ip", host); - params.put("desc", Server.getInstance().getConfig().getName()); - post(url, params); - } - catch (IOException e) - { - e.printStackTrace(); - } - - // publishing to tetrinet.org - try - { - String url = "http://slummy.tetrinet.org/grav/slummy_addsvr.pl"; - Map<String, String> params = new HashMap<String, String>(); - params.put("qname", host); - params.put("submit_bt", "Add Server"); - post(url, params); - } - catch (IOException e) - { - e.printStackTrace(); - } - - // publishing to tsrv.com - try - { - String url = "http://dieterdhoker.mine.nu:8280/cgi-bin/TSRV/submitserver.pl"; - Map<String, String> params = new HashMap<String, String>(); params.put("hostname", host); params.put("description", Server.getInstance().getConfig().getName()); post(url, params); } catch (IOException e) { - e.printStackTrace(); + log.log(Level.WARNING, "Unable to publish the server on http://servers.tetrinet.fr", e); } } @@ -182,7 +154,7 @@ // send the request conn.connect(); - if (log.isLoggable(Level.FINE)) + if (log.isLoggable(Level.FINE) && conn.getResponseCode() >= 400) { log.fine("Response: " + conn.getResponseCode() + " - " + conn.getResponseMessage()); @@ -196,7 +168,6 @@ in.close(); } - } finally { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |