From e53c6bbd51c3b39630fc48c0da86417834505322 Mon Sep 17 00:00:00 2001 From: reger Date: Sat, 24 Oct 2015 19:36:33 +0200 Subject: [PATCH 1/6] fix init of peer flags (remove hiding of ssl flag) --- source/net/yacy/peers/Seed.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/net/yacy/peers/Seed.java b/source/net/yacy/peers/Seed.java index 3306b18ee..e425d4b38 100644 --- a/source/net/yacy/peers/Seed.java +++ b/source/net/yacy/peers/Seed.java @@ -992,8 +992,12 @@ public class Seed implements Cloneable, Comparable, Comparator return !my; } + /** + * set unused flags to zero + * currently last used flag is FLAG_SSL_AVAILABLE=4 (2015-10-24) + */ public final void setUnusedFlags() { - for ( int i = 4; i < 20; i++ ) { + for ( int i = 5; i < 20; i++ ) { setFlag(i, false); } } From c720b4c249760779530751ddacf3c10db5707b47 Mon Sep 17 00:00:00 2001 From: reger Date: Sat, 24 Oct 2015 22:44:28 +0200 Subject: [PATCH 2/6] remove override of dynamicField coordinate_p in solr schema (coordinate_p is not a mandatory field as such doesn't need to be declared as schema.field) --- defaults/solr/schema.xml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/defaults/solr/schema.xml b/defaults/solr/schema.xml index 9dde45e73..374a41409 100644 --- a/defaults/solr/schema.xml +++ b/defaults/solr/schema.xml @@ -57,7 +57,7 @@ - + @@ -73,9 +73,6 @@ - - - @@ -83,8 +80,8 @@ - - + + From c6687dd56029ba00dfec7aed022650654e5cd1e9 Mon Sep 17 00:00:00 2001 From: reger Date: Sun, 25 Oct 2015 00:26:45 +0200 Subject: [PATCH 3/6] fix a system.out to log.fine in bmpParser --- source/net/yacy/document/parser/images/bmpParser.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/net/yacy/document/parser/images/bmpParser.java b/source/net/yacy/document/parser/images/bmpParser.java index a4499e395..33a3fc9cf 100644 --- a/source/net/yacy/document/parser/images/bmpParser.java +++ b/source/net/yacy/document/parser/images/bmpParser.java @@ -154,9 +154,9 @@ public class bmpParser { else if (bitcount == 8) parseBMP8(s, offset, width, height, colortable); else if (bitcount == 24) parseBMP24(s, offset, width, height); else if (bitcount == 32) parseBMP32(s, offset, width, height); - else System.out.println("unsupported BMP format: biCompression = " + compression + ", biBitCount = " + bitcount); + else ConcurrentLog.fine("IMAGEPARSER", "unsupported BMP format: biCompression = " + compression + ", biBitCount = " + bitcount); } else { - System.out.println("unsupported BMP format: biCompression = " + compression + ", biBitCount = " + bitcount); + ConcurrentLog.fine("IMAGEPARSER", "unsupported BMP format: biCompression = " + compression + ", biBitCount = " + bitcount); } } } From bbe9df2bb3dce85aa8f41b371c0012440231f551 Mon Sep 17 00:00:00 2001 From: reger Date: Sun, 25 Oct 2015 03:06:15 +0100 Subject: [PATCH 4/6] fix MediawikiImporter for bz2 dump skip reading bz2 file magicbyte to identify bz2 format as inputstream reset would be required. Common compress reads and checks the magicbytes internally and throws ioexception if wrong, making preread obsolete. --- .../net/yacy/document/importer/MediawikiImporter.java | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/source/net/yacy/document/importer/MediawikiImporter.java b/source/net/yacy/document/importer/MediawikiImporter.java index b9557f803..d0d64cc72 100644 --- a/source/net/yacy/document/importer/MediawikiImporter.java +++ b/source/net/yacy/document/importer/MediawikiImporter.java @@ -153,16 +153,6 @@ public class MediawikiImporter extends Thread implements Importer { if (p > 0) targetstub = targetstub.substring(0, p); InputStream is = new BufferedInputStream(new FileInputStream(this.sourcefile), 1024 * 1024); if (this.sourcefile.getName().endsWith(".bz2")) { - int b = is.read(); - if (b != 'B') { - try {is.close();} catch (final IOException e) {} - throw new IOException("Invalid bz2 content."); - } - b = is.read(); - if (b != 'Z') { - try {is.close();} catch (final IOException e) {} - throw new IOException("Invalid bz2 content."); - } is = new BZip2CompressorInputStream(is); } else if (this.sourcefile.getName().endsWith(".gz")) { is = new GZIPInputStream(is); From a2dcf6403953476bc996a73178fe5ff153a800a4 Mon Sep 17 00:00:00 2001 From: reger Date: Sun, 25 Oct 2015 05:41:25 +0100 Subject: [PATCH 5/6] fix IndexImportMediawiki_p servlet's refresh header add url parameter to make sure no parameter are included in refresh url which could cause unwanted restart of import job see http://mantis.tokeek.de/view.php?id=591 comments --- htroot/IndexImportMediawiki_p.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htroot/IndexImportMediawiki_p.html b/htroot/IndexImportMediawiki_p.html index 3bf333b76..36d796df2 100644 --- a/htroot/IndexImportMediawiki_p.html +++ b/htroot/IndexImportMediawiki_p.html @@ -2,8 +2,10 @@ YaCy '#[clientname]#': MediaWiki Dump Import - #%env/templates/metas.template%# - #(import)#::#(/import)# + #%env/templates/metas.template%# + #(import)#:: + + #(/import)# #%env/templates/header.template%# From 2b775d5be6e0132d63383b611478d4a7f2d9f53e Mon Sep 17 00:00:00 2001 From: reger Date: Sun, 25 Oct 2015 19:38:42 +0100 Subject: [PATCH 6/6] fix typo in WikiCode coordinate calculation --- source/net/yacy/data/wiki/WikiCode.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/net/yacy/data/wiki/WikiCode.java b/source/net/yacy/data/wiki/WikiCode.java index 44c84149b..4459b0640 100644 --- a/source/net/yacy/data/wiki/WikiCode.java +++ b/source/net/yacy/data/wiki/WikiCode.java @@ -1061,7 +1061,7 @@ public class WikiCode extends AbstractWikiParser implements WikiParser { if (d.length == 1) {float l = Float.parseFloat(d[0]); if (l < 0) {lono = "W"; l = -l;} lon = (float) Math.floor(l); lonm = 60.0f * (l - lon);} else if (d.length == 2) {lon = Float.parseFloat(d[0]); lonm = Float.parseFloat(d[1]);} else if (d.length == 3) {lon = Float.parseFloat(d[0]); lonm = Float.parseFloat(d[1]) + Float.parseFloat(d[2]) / 60.0f;} - if (d[d.length-1].toUpperCase().equals("w")) {lon = -lon; lonm = -lonm;} + if (d[d.length-1].toUpperCase().equals("W")) {lon = -lon; lonm = -lonm;} } } if (lon != 0.0d && lat != 0.0d) {