2006-04-12 jrandom

* Watch out for failed syndie index fetches (thanks bar!)
This commit is contained in:
jrandom
2006-04-12 06:49:01 +00:00
committed by zzz
parent 83bef43fd5
commit 8fcb871409
5 changed files with 15 additions and 6 deletions

View File

@ -1066,7 +1066,7 @@ public class BlogManager {
}
public boolean isBanned(Hash blog) {
if (blog == null) return false;
if ( (blog == null) || (blog.getData() == null) || (blog.getData().length <= 0) ) return false;
String str = blog.toBase64();
String banned = System.getProperty("syndie.bannedBlogs", "");
return (banned.indexOf(str) >= 0);

View File

@ -163,8 +163,9 @@ public class ArchiveIndex {
/** list of unique blogs locally known (set of Hash) */
public Set getUniqueBlogs() {
Set rv = new HashSet();
for (int i = 0; i < _blogs.size(); i++)
for (int i = 0; i < _blogs.size(); i++) {
rv.add(getBlog(i));
}
return rv;
}
public List getReplies(BlogURI uri) {
@ -367,7 +368,10 @@ public class ArchiveIndex {
return;
tok.nextToken();
String keyStr = tok.nextToken();
Hash keyHash = new Hash(Base64.decode(keyStr));
byte k[] = Base64.decode(keyStr);
if ( (k == null) || (k.length != Hash.HASH_LENGTH) )
return; // ignore bad hashes
Hash keyHash = new Hash(k);
String whenStr = tok.nextToken();
long when = getIndexDate(whenStr);
String tag = tok.nextToken();

View File

@ -641,6 +641,8 @@ public class RemoteArchiveBean {
int newBlogs = 0;
for (Iterator iter = remoteBlogs.iterator(); iter.hasNext(); ) {
Hash blog = (Hash)iter.next();
if ( (blog == null) || (blog.getData() == null) || (blog.getData().length <= 0) )
continue;
if (ignoreBlog(user, blog))
continue;
if (!localBlogs.contains(blog)) {

View File

@ -1,4 +1,7 @@
$Id: history.txt,v 1.451 2006/04/10 00:37:29 jrandom Exp $
$Id: history.txt,v 1.452 2006/04/11 08:39:07 jrandom Exp $
2006-04-12 jrandom
* Watch out for failed syndie index fetches (thanks bar!)
2006-04-11 jrandom
* Throttling improvements on SSU - throttle all transmissions to a peer

View File

@ -15,9 +15,9 @@ import net.i2p.CoreVersion;
*
*/
public class RouterVersion {
public final static String ID = "$Revision: 1.391 $ $Date: 2006/04/10 00:37:31 $";
public final static String ID = "$Revision: 1.392 $ $Date: 2006/04/11 08:39:09 $";
public final static String VERSION = "0.6.1.14";
public final static long BUILD = 6;
public final static long BUILD = 7;
public static void main(String args[]) {
System.out.println("I2P Router version: " + VERSION + "-" + BUILD);
System.out.println("Router ID: " + RouterVersion.ID);