2005-10-20 dust

* Fix bug in ircclient that prevented it to use its own dest (i.e. was
      always shared. (thx for info Ragnarok)
    * Fix crash in Sucker with some bad html.
This commit is contained in:
dust
2005-10-20 19:42:13 +00:00
committed by zzz
parent ea22c73a73
commit 13bda1f6d7
4 changed files with 18 additions and 8 deletions

View File

@ -620,11 +620,11 @@ public class I2PTunnel implements Logging, EventDispatcher {
} }
boolean isShared = true; boolean isShared = true;
if (args.length > 1) { if (args.length > 2) {
if ("true".equalsIgnoreCase(args[2].trim())) { if ("true".equalsIgnoreCase(args[2].trim())) {
isShared = true; isShared = true;
} else if ("false".equalsIgnoreCase(args[1].trim())) { } else if ("false".equalsIgnoreCase(args[2].trim())) {
_log.warn("args[1] == [" + args[1] + "] and rejected explicitly"); _log.warn("args[2] == [" + args[2] + "] and rejected explicitly");
isShared = false; isShared = false;
} else { } else {
// isShared not specified, default to true // isShared not specified, default to true

View File

@ -340,6 +340,11 @@ public class Sucker {
//System.out.println("html: "+html.substring(i)); //System.out.println("html: "+html.substring(i));
int tagLen = findTagLen(html.substring(i)); int tagLen = findTagLen(html.substring(i));
if(tagLen<=0)
{
System.out.println("Bad html? ("+html+")");
break;
}
// //
String htmlTag = html.substring(i,i+tagLen); String htmlTag = html.substring(i,i+tagLen);
@ -477,12 +482,12 @@ public class Sucker {
if(s.charAt(i)=='"') if(s.charAt(i)=='"')
{ {
i++; i++;
while(s.charAt(i)!='"') while(i<s.length() && s.charAt(i)!='"')
i++; i++;
} }
} }
System.out.println("WTF"); System.out.println("WTF");
return 0; return -1;
} }
private boolean existsInHistory(String messageId) { private boolean existsInHistory(String messageId) {

View File

@ -1,4 +1,9 @@
$Id: history.txt,v 1.302 2005/10/19 17:38:46 jrandom Exp $ $Id: history.txt,v 1.303 2005/10/20 03:56:40 jrandom Exp $
2005-10-20 dust
* Fix bug in ircclient that prevented it to use its own dest (i.e. was
always shared. (thx for info Ragnarok)
* Fix crash in Sucker with some bad html.
2005-10-20 jrandom 2005-10-20 jrandom
* Workaround a bug in GCJ's Calendar implementation * Workaround a bug in GCJ's Calendar implementation

View File

@ -15,9 +15,9 @@ import net.i2p.CoreVersion;
* *
*/ */
public class RouterVersion { public class RouterVersion {
public final static String ID = "$Revision: 1.273 $ $Date: 2005/10/19 17:38:45 $"; public final static String ID = "$Revision: 1.274 $ $Date: 2005/10/20 03:56:39 $";
public final static String VERSION = "0.6.1.3"; public final static String VERSION = "0.6.1.3";
public final static long BUILD = 4; public final static long BUILD = 5;
public static void main(String args[]) { public static void main(String args[]) {
System.out.println("I2P Router version: " + VERSION + "-" + BUILD); System.out.println("I2P Router version: " + VERSION + "-" + BUILD);
System.out.println("Router ID: " + RouterVersion.ID); System.out.println("Router ID: " + RouterVersion.ID);