Skip to content

Commit

Permalink
fix for another BMP parser problem. This is not a bug, I guess it was…
Browse files Browse the repository at this point in the history
… caused by a corrupted graphics file.

see http://forum.yacy-websuche.de/viewtopic.php?f=6&t=180&hilit=&p=1017#p1017

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3995 6c8d7289-2bf4-0310-a012-ef5d649a1542
  • Loading branch information
orbiter committed Jul 19, 2007
1 parent 8ebfd73 commit bf6f682
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 19 deletions.
19 changes: 0 additions & 19 deletions source/de/anomic/yacy/yacyVersion.java
Expand Up @@ -172,25 +172,6 @@ public static final yacyVersion thisVersion() {
return thisVersion;
}

public static final boolean shallRetrieveUpdateInfo() {
// according to update properties, decide if we should retrieve update information
// if true, the release that can be obtained is returned.
// if false, null is returned
plasmaSwitchboard sb = plasmaSwitchboard.getSwitchboard();

// check if update process allowes update retrieve
String process = sb.getConfig("update.process", "manual");
if (process.equals("manual")) return false; // no, its a manual process

// check if the last retrieve time is a minimum time ago
long cycle = Math.max(1, sb.getConfigLong("update.cycle", 168)) * 60 * 60 * 1000; // update.cycle is hours
long timeLookup = sb.getConfigLong("update.time.lookup", System.currentTimeMillis());
if (timeLookup + cycle > System.currentTimeMillis()) return false; // no we have recently made a lookup

// ok, we may do a lookup
return true;
}

public static final yacyVersion rulebasedUpdateInfo(boolean manual) {
// according to update properties, decide if we should retrieve update information
// if true, the release that can be obtained is returned.
Expand Down
1 change: 1 addition & 0 deletions source/de/anomic/ymage/ymageBMPParser.java
Expand Up @@ -75,6 +75,7 @@ public BufferedImage getImage() {
}

public static final int DWORD(byte[] b, int offset) {
if (offset + 3 >= b.length) return 0;
int ret = ((int) b[offset + 3] & 0xff);
ret = (ret << 8) | ((int) b[offset + 2] & 0xff);
ret = (ret << 8) | ((int) b[offset + 1] & 0xff);
Expand Down

0 comments on commit bf6f682

Please sign in to comment.