faubackup2/src/rsync rsync++_calls.cpp,1.1.1.1,1.2 rsync++_calls.hpp,1.1.1.1,1.2 rsync.cpp,1.2,1.3

Erik Merkel <[email protected]> Tue, 07 Jun 2005 10:31:18 +0000
Newsgroups gmane.comp.sysutils.backup.faubackup.cvs
Message-ID <[email protected]>
Update of /cvsroot/faubackup/faubackup2/src/rsync
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7754/src/rsync

Modified Files:
	rsync++_calls.cpp rsync++_calls.hpp rsync.cpp 
Log Message:
adjusting min filesize and blocksize for rsync


Index: rsync++_calls.hpp
===================================================================
RCS file: /cvsroot/faubackup/faubackup2/src/rsync/rsync++_calls.hpp,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** rsync++_calls.hpp	2 Jun 2005 09:31:13 -0000	1.1.1.1
--- rsync++_calls.hpp	7 Jun 2005 10:31:16 -0000	1.2
***************
*** 3,10 ****
  
  #ifdef __cplusplus
- 
  #include <network/network_com.hpp>
- 
- 
  extern "C"
  {
--- 3,7 ----

Index: rsync.cpp
===================================================================
RCS file: /cvsroot/faubackup/faubackup2/src/rsync/rsync.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** rsync.cpp	6 Jun 2005 19:45:08 -0000	1.2
--- rsync.cpp	7 Jun 2005 10:31:16 -0000	1.3
***************
*** 4,7 ****
--- 4,8 ----
  #include <cmath>
  #define STAT_CHAR_ARRAY_SIZE 200
+ #define MIN_RSYNC_BLOCKSIZE 1024
  extern "C"
  {
***************
*** 33,38 ****
  	blocksize = (size_t)pow(2, temp + 1);
  
! 	if(blocksize < 512)
! 		blocksize = 512;
  
  	output.information("rsync " + fileName + " with blocksize: " + int2string(blocksize), DEBUG_OUTPUT);
--- 34,39 ----
  	blocksize = (size_t)pow(2, temp + 1);
  
! 	if(blocksize < MIN_RSYNC_BLOCKSIZE)
! 		blocksize = MIN_RSYNC_BLOCKSIZE;
  
  	output.information("rsync " + fileName + " with blocksize: " + int2string(blocksize), DEBUG_OUTPUT);
***************
*** 41,46 ****
  		const char *error_msg = rs_strerror(result);
  		output.non_critical("error creating rsync checksum for " + fileName + " " + string(error_msg),0);
! 	}
! 	else {
  		//	rs_format_stats(&stats, buffer, STAT_CHAR_ARRAY_SIZE);
  		//	output.information(fileName + " : " + string(buffer), DEBUG_OUTPUT);
--- 42,46 ----
  		const char *error_msg = rs_strerror(result);
  		output.non_critical("error creating rsync checksum for " + fileName + " " + string(error_msg),0);
! 	} else {
  		//	rs_format_stats(&stats, buffer, STAT_CHAR_ARRAY_SIZE);
  		//	output.information(fileName + " : " + string(buffer), DEBUG_OUTPUT);
***************
*** 65,70 ****
  		const char *error_msg = rs_strerror(result);
  		output.non_critical("error creating rsync delta for " + fileName + " " + string(error_msg),0);
! 	}
! 	else {
  		//	rs_format_stats(&stats, buffer, STAT_CHAR_ARRAY_SIZE);
  		//	output.information(fileName + " : " + string(buffer), DEBUG_OUTPUT);
--- 65,69 ----
  		const char *error_msg = rs_strerror(result);
  		output.non_critical("error creating rsync delta for " + fileName + " " + string(error_msg),0);
! 	} else {
  		//	rs_format_stats(&stats, buffer, STAT_CHAR_ARRAY_SIZE);
  		//	output.information(fileName + " : " + string(buffer), DEBUG_OUTPUT);
***************
*** 93,98 ****
  		const char *error_msg = rs_strerror(result);
  		output.non_critical("error creating rsync patch for " + newFile + " with " + oldFile+ " " + string(error_msg),0);
! 	}
! 	else {
  		//	rs_format_stats(&stats, buffer, STAT_CHAR_ARRAY_SIZE);
  		//	output.information(newFile + " : " + string(buffer), DEBUG_OUTPUT);
--- 92,96 ----
  		const char *error_msg = rs_strerror(result);
  		output.non_critical("error creating rsync patch for " + newFile + " with " + oldFile+ " " + string(error_msg),0);
! 	} else {
  		//	rs_format_stats(&stats, buffer, STAT_CHAR_ARRAY_SIZE);
  		//	output.information(newFile + " : " + string(buffer), DEBUG_OUTPUT);

Index: rsync++_calls.cpp
===================================================================
RCS file: /cvsroot/faubackup/faubackup2/src/rsync/rsync++_calls.cpp,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** rsync++_calls.cpp	2 Jun 2005 09:31:13 -0000	1.1.1.1
--- rsync++_calls.cpp	7 Jun 2005 10:31:16 -0000	1.2
***************
*** 3,7 ****
  #include <common/common.hpp>
  
! #define R_BUFSIZE 16384
  
  using namespace faubackup;
--- 3,7 ----
  #include <common/common.hpp>
  
! #define R_BUFSIZE 32768
  
  using namespace faubackup;
***************
*** 17,22 ****
  		*eof = EoF;
  		*size = length;
! 	}
! 	else {
  		*size = 0;
  		*eof = 1;
--- 17,21 ----
  		*eof = EoF;
  		*size = length;
! 	} else {
  		*size = 0;
  		*eof = 1;
***************
*** 28,33 ****
  {
  
! static_cast<faubackup::NetCommunication *>(NetCommunicationPointer)->sendPackage(location, length, eof);
! return;
  	static size_t bufsize = 0;
  	static char buf[R_BUFSIZE+1] = {
--- 27,32 ----
  {
  
! 	static_cast<faubackup::NetCommunication *>(NetCommunicationPointer)->sendPackage(location, length, eof);
! 	return;
  	static size_t bufsize = 0;
  	static char buf[R_BUFSIZE+1] = {



-------------------------------------------------------
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