faubackup2/src/copier distributor.cpp,1.1.1.1,1.2

Erik Merkel <[email protected]> Mon, 06 Jun 2005 19:45:10 +0000
Newsgroups gmane.comp.sysutils.backup.faubackup.cvs
Message-ID <[email protected]>
Update of /cvsroot/faubackup/faubackup2/src/copier
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2530/src/copier

Modified Files:
	distributor.cpp 
Log Message:
implemented variable blocksize based on filesize for rsync mode


Index: distributor.cpp
===================================================================
RCS file: /cvsroot/faubackup/faubackup2/src/copier/distributor.cpp,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** distributor.cpp	2 Jun 2005 09:31:13 -0000	1.1.1.1
--- distributor.cpp	6 Jun 2005 19:45:07 -0000	1.2
***************
*** 20,33 ****
  		network->sendString(file.getFilename());
  		network->sendString(file.getNameForLink());
! 	} else
  		if((st.st_size > MIN_RSYNC_SIZE) &&
! 		    (file.getFileSize() > MIN_RSYNC_SIZE) &&
! 		    (rsync) ) {
  			output.information("rsync file:\t" + file.getFilename(),
  			                   DEBUG_OUTPUT);
  			network->sendByte(RdiffRegFile);
  			network->sendString(file.getFilename());
! 			checkSum(old_dir + file.getFilename(), *network);
! 		} else {
  			output.information("copy file:\t" + file.getFilename() + " " + int2string(rsync),
  			                   DEBUG_OUTPUT);
--- 20,35 ----
  		network->sendString(file.getFilename());
  		network->sendString(file.getNameForLink());
! 	}
! 	else
  		if((st.st_size > MIN_RSYNC_SIZE) &&
! 		        (file.getFileSize() > MIN_RSYNC_SIZE) &&
! 		        (rsync) ) {
  			output.information("rsync file:\t" + file.getFilename(),
  			                   DEBUG_OUTPUT);
  			network->sendByte(RdiffRegFile);
  			network->sendString(file.getFilename());
! 			checkSum(old_dir + file.getFilename(), st.st_size, *network);
! 		}
! 		else {
  			output.information("copy file:\t" + file.getFilename() + " " + int2string(rsync),
  			                   DEBUG_OUTPUT);
***************
*** 65,69 ****
  		network->sendString(file.getFilename());
  		network->sendString(file.getNameForLink());
! 	} else {
  		if(do_nothing) {
  			output.information("Transfer file:\t" +
--- 67,72 ----
  		network->sendString(file.getFilename());
  		network->sendString(file.getNameForLink());
! 	}
! 	else {
  		if(do_nothing) {
  			output.information("Transfer file:\t" +
***************
*** 90,94 ****
  			network->sendString(file.getFilename());
  		}
! 	} else {
  		if(file.getFileType() == SLink)
  			network->sendByte(SymlinkFile);
--- 93,98 ----
  			network->sendString(file.getFilename());
  		}
! 	}
! 	else {
  		if(file.getFileType() == SLink)
  			network->sendByte(SymlinkFile);
***************
*** 132,136 ****
  			                   fileinfo.getFilename(), DEBUG_OUTPUT);
  			no_reg_file(fileinfo);
! 		} else
  			if( existFile(old_dir + fileinfo.getFilename()) ) {
  				output.information("file exist: " + old_dir +
--- 136,141 ----
  			                   fileinfo.getFilename(), DEBUG_OUTPUT);
  			no_reg_file(fileinfo);
! 		}
! 		else
  			if( existFile(old_dir + fileinfo.getFilename()) ) {
  				output.information("file exist: " + old_dir +
***************
*** 144,148 ****
  					                   DEBUG_OUTPUT);
  					file_unchanged(fileinfo);
! 				} else {
  					output.information("file exist changed: " +
  					                   fileinfo.getFilename(),
--- 149,154 ----
  					                   DEBUG_OUTPUT);
  					file_unchanged(fileinfo);
! 				}
! 				else {
  					output.information("file exist changed: " +
  					                   fileinfo.getFilename(),
***************
*** 150,154 ****
  					file_changed(fileinfo);
  				}
! 			} else {
  				output.information("file does not exist: "  +
  				                   fileinfo.getFilename(), DEBUG_OUTPUT);
--- 156,161 ----
  					file_changed(fileinfo);
  				}
! 			}
! 			else {
  				output.information("file does not exist: "  +
  				                   fileinfo.getFilename(), DEBUG_OUTPUT);



-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20