faubackup2/src/common backup_control.cpp,1.16,1.17

Erik Merkel <[email protected]> Sun, 26 Jun 2005 19:49:35 +0000
Newsgroups gmane.comp.sysutils.backup.faubackup.cvs
Message-ID <[email protected]>
Update of /cvsroot/faubackup/faubackup2/src/common
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30773/src/common

Modified Files:
	backup_control.cpp 
Log Message:
corrected bug in rsync-buffer algo


Index: backup_control.cpp
===================================================================
RCS file: /cvsroot/faubackup/faubackup2/src/common/backup_control.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** backup_control.cpp	21 Jun 2005 09:16:44 -0000	1.16
--- backup_control.cpp	26 Jun 2005 19:49:33 -0000	1.17
***************
*** 59,67 ****
  	string oldbackupdir = dir_getlast(destination,lastbackup);
  	output.information(F_("Last backup found in: %s") % oldbackupdir,
! 	                   DEBUG_OUTPUT);
  
  	string actualbackupdir = dir_create(destination);
  	output.information(F_("Creating temp dir: %s") % actualbackupdir,
! 	                   DEBUG_OUTPUT);
  
  	int ret;
--- 59,67 ----
  	string oldbackupdir = dir_getlast(destination,lastbackup);
  	output.information(F_("Last backup found in: %s") % oldbackupdir,
! 			   DEBUG_OUTPUT);
  
  	string actualbackupdir = dir_create(destination);
  	output.information(F_("Creating temp dir: %s") % actualbackupdir,
! 			   DEBUG_OUTPUT);
  
  	int ret;
***************
*** 81,86 ****
  	try {
  		globalConfig = new SettingsFileParser(conf_file);
! 	}
! 	catch(int i) {
  		globalConfig = NULL;
  	}
--- 81,85 ----
  	try {
  		globalConfig = new SettingsFileParser(conf_file);
! 	} catch(int i) {
  		globalConfig = NULL;
  	}
***************
*** 135,139 ****
  	if (rsync)
  		outp.append(" --no-whole-file ");
! 	else 
  		outp.append(" --whole-file ");
  	if (boundaries)
--- 134,138 ----
  	if (rsync)
  		outp.append(" --no-whole-file ");
! 	else
  		outp.append(" --whole-file ");
  	if (boundaries)
***************
*** 147,154 ****
  
  	pid_t pid = piped_child(destination.hostname,
! 	                        destination.username,
! 	                        bin_file + outp + " --server " +
! 	                        destination.directory,
! 	                        fd_in_remote, fd_out_remote);
  	bigBrother.register_ssh(pid);
  
--- 146,153 ----
  
  	pid_t pid = piped_child(destination.hostname,
! 				destination.username,
! 				bin_file + outp + " --server " +
! 				destination.directory,
! 				fd_in_remote, fd_out_remote);
  	bigBrother.register_ssh(pid);
  
***************
*** 180,184 ****
  	if (rsync)
  		outp.append(" --no-whole-file ");
! 	else 
  		outp.append(" --whole-file ");
  	if (boundaries)
--- 179,183 ----
  	if (rsync)
  		outp.append(" --no-whole-file ");
! 	else
  		outp.append(" --whole-file ");
  	if (boundaries)
***************
*** 191,198 ****
  		bin_file = DEFAULT_BIN;
  	pid_t pid = piped_child(source.hostname,
! 	                        source.username,
! 	                        bin_file + outp + " --client " +
! 	                        source.directory,
! 	                        fd_in_remote, fd_out_remote);
  	bigBrother.register_ssh(pid);
  	server(destination.directory, fd_in_remote, fd_out_remote);
--- 190,197 ----
  		bin_file = DEFAULT_BIN;
  	pid_t pid = piped_child(source.hostname,
! 				source.username,
! 				bin_file + outp + " --client " +
! 				source.directory,
! 				fd_in_remote, fd_out_remote);
  	bigBrother.register_ssh(pid);
  	server(destination.directory, fd_in_remote, fd_out_remote);
***************
*** 217,221 ****
  	string lastbackupdir = dir_getlast(destdir, lastbackup);
  	output.information(F_("old backup dir: %s")
! 			% lastbackupdir, DEBUG_OUTPUT);
  	com_Distributor.sendInteger(lastbackup.year);
  	com_Distributor.sendInteger(lastbackup.month);
--- 216,220 ----
  	string lastbackupdir = dir_getlast(destdir, lastbackup);
  	output.information(F_("old backup dir: %s")
! 			   % lastbackupdir, DEBUG_OUTPUT);
  	com_Distributor.sendInteger(lastbackup.year);
  	com_Distributor.sendInteger(lastbackup.month);
***************
*** 246,252 ****
  	output.adderrors(com_FileReceiver.readInteger());
  	output.information(F_("total bytes send: %d")
! 			% sender.finished_Client(), NORMAL_OUTPUT);
  	output.information(F_("total bytes read: %d")
! 			% receiver.wait_for_finish(), NORMAL_OUTPUT);
  	dir_finalize(tempdir, destdir);
  	output.information("Server finished", DEBUG_OUTPUT);
--- 245,251 ----
  	output.adderrors(com_FileReceiver.readInteger());
  	output.information(F_("total bytes send: %d")
! 			   % sender.finished_Client(), NORMAL_OUTPUT);
  	output.information(F_("total bytes read: %d")
! 			   % receiver.wait_for_finish(), NORMAL_OUTPUT);
  	dir_finalize(tempdir, destdir);
  	output.information("Server finished", DEBUG_OUTPUT);
***************
*** 283,292 ****
  
  	output.information(F_("date of last backup: %d:%d:%d:%d:%d")
! 			% lastbackup.year % lastbackup.month % lastbackup.day
! 			% lastbackup.hour % lastbackup.minute, DEBUG_OUTPUT);
  	output.information(F_("actual date: %d:%d:%d:%d:%d")
! 			% actualbackup.year % actualbackup.month
! 			% actualbackup.day % actualbackup.hour
! 			% actualbackup.minute, DEBUG_OUTPUT);
  
  	XThread * infos = client_information_sender(sourcedir, com_InfoSender);
--- 282,291 ----
  
  	output.information(F_("date of last backup: %d:%d:%d:%d:%d")
! 			   % lastbackup.year % lastbackup.month % lastbackup.day
! 			   % lastbackup.hour % lastbackup.minute, DEBUG_OUTPUT);
  	output.information(F_("actual date: %d:%d:%d:%d:%d")
! 			   % actualbackup.year % actualbackup.month
! 			   % actualbackup.day % actualbackup.hour
! 			   % actualbackup.minute, DEBUG_OUTPUT);
  
  	XThread * infos = client_information_sender(sourcedir, com_InfoSender);
***************
*** 324,329 ****
  	try {
  		globalConfig = new SettingsFileParser(conf_file);
! 	}
! 	catch(int i) {
  		globalConfig = NULL;
  	}
--- 323,327 ----
  	try {
  		globalConfig = new SettingsFileParser(conf_file);
! 	} catch(int i) {
  		globalConfig = NULL;
  	}
***************
*** 343,347 ****
  {
  	output.information(F_("client_file_sender started: sourcedir %s")
! 			% sourcedir , DEBUG_OUTPUT);
  	/* receiving and sending some dummy data to make sure connection
  	is working */
--- 341,345 ----
  {
  	output.information(F_("client_file_sender started: sourcedir %s")
! 			   % sourcedir , DEBUG_OUTPUT);
  	/* receiving and sending some dummy data to make sure connection
  	is working */
***************
*** 361,369 ****
  
  XThread *server_distributor(string destdir, string lastbackupdir,
!                             NetCommunication &com)
  {
  
  	output.information(F_("server_distributor started: destdir %s")
! 			% lastbackupdir , DEBUG_OUTPUT);
  
  	/* receiving and sending some dummy data to make sure connection
--- 359,367 ----
  
  XThread *server_distributor(string destdir, string lastbackupdir,
! 			    NetCommunication &com)
  {
  
  	output.information(F_("server_distributor started: destdir %s")
! 			   % lastbackupdir , DEBUG_OUTPUT);
  
  	/* receiving and sending some dummy data to make sure connection
***************
*** 382,389 ****
  
  XThread *server_file_recveiver(string destdir, string lastbackupdir,
!                                NetCommunication &com)
  {
  	output.information(F_("server_file_recveiver started: destdir %s")
! 			% destdir , DEBUG_OUTPUT);
  	int bla = com.readInteger();
  	char blub = com.readByte();
--- 380,387 ----
  
  XThread *server_file_recveiver(string destdir, string lastbackupdir,
! 		NetCommunication &com)
  {
  	output.information(F_("server_file_recveiver started: destdir %s")
! 			   % destdir , DEBUG_OUTPUT);
  	int bla = com.readInteger();
  	char blub = com.readByte();



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click