Skip to content

Commit

Permalink
- fix so that blocks are not queued up to be sent but instead we are …
Browse files Browse the repository at this point in the history
…sending from the latest screen capture

git-svn-id: http://svn.bigbluebutton.org/project-bbb/trunk@81 6ac8b576-4aa1-4e98-a958-8badfeb98c9d
  • Loading branch information
ritzalam committed Mar 5, 2010
1 parent 7dc4716 commit 8026b10
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,13 @@ public boolean hasChanged(BufferedImage capturedScreen) {
}

if (! checksumSame()) {
sendFlag.compareAndSet(false, true);
return true;
if (sendFlag.compareAndSet(false, true)) {
System.out.println("Block " + position + " has changed. Need to send it.");
return true;
} else {
System.out.println("Block " + position + " has changed but is already queued for sending.");
return false;
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ public void processCapturedScreen(BufferedImage capturedScreen) {
for (int position = 1; position <= numberOfBlocks; position++) {
Block block = blocksMap.get(new Integer(position));
if (block.hasChanged(capturedScreen)) {
System.out.println("Block " + block.getPosition() + " has changed.");
notifyChangedBlockListener(new Integer(block.getPosition()));
}
}
Expand Down

0 comments on commit 8026b10

Please sign in to comment.