*) Correcting Problems with lURLEntries containing null URLs.

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1104 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
theli 20 years ago
parent a12759c1bf
commit 89fab9f200

@ -94,22 +94,22 @@ public final class transferURL {
yacyCore.log.logFine("transferURL: got null URL-string from peer " + otherPeerName); yacyCore.log.logFine("transferURL: got null URL-string from peer " + otherPeerName);
} else { } else {
lEntry = sb.urlPool.loadedURL.newEntry(urls, true); lEntry = sb.urlPool.loadedURL.newEntry(urls, true);
if ( if ((lEntry != null) && (lEntry.url() != null)) {
(lEntry != null) && if (
(lEntry.url() != null) && (blockBlacklist) &&
(blockBlacklist) && (plasmaSwitchboard.urlBlacklist.isListed(lEntry.url().getHost().toLowerCase(), lEntry.url().getPath()))
(plasmaSwitchboard.urlBlacklist.isListed(lEntry.url().getHost().toLowerCase(), lEntry.url().getPath())) ){
) { yacyCore.log.logFine("transferURL: blocked blacklisted URL '" + lEntry.url() + "' from peer " + otherPeerName);
yacyCore.log.logFine("transferURL: blocked blacklisted URL '" + lEntry.url() + "' from peer " + otherPeerName); lEntry = null;
lEntry = null; } else {
} sb.urlPool.loadedURL.addEntry(lEntry, iam, iam, 3);
if ((lEntry != null)&&(lEntry.url() != null)) { yacyCore.log.logFine("transferURL: received URL '" + lEntry.url() + "' from peer " + otherPeerName);
sb.urlPool.loadedURL.addEntry(lEntry, iam, iam, 3); received++;
yacyCore.log.logFine("transferURL: received URL '" + lEntry.url() + "' from peer " + otherPeerName); }
received++;
} else { } else {
yacyCore.log.logWarning("transferURL: received invalid URL from peer " + otherPeerName + yacyCore.log.logWarning("transferURL: received invalid URL from peer " + otherPeerName +
"\n\tURL Property: " + urls); "\n\tURL Property: " + urls);
// TODO: should we send back an error message???
} }
} }
} }

Loading…
Cancel
Save