X-Git-Url: https://mattmccutchen.net/rsync/rsync-patches.git/blobdiff_plain/27e96866eb3225216b831283e53e2d2cf51b8126..b06103cc7d4f1827bb8f8a83ca07b56a48930e63:/ODBC-dblog.diff diff --git a/ODBC-dblog.diff b/ODBC-dblog.diff index 8ffa209..d0daa19 100644 --- a/ODBC-dblog.diff +++ b/ODBC-dblog.diff @@ -8,8 +8,8 @@ After applying this patch, run these commands for a successful build: See the file "instructions" (after applying this patch) for more info. ---- orig/Makefile.in 2006-02-06 05:03:50 -+++ Makefile.in 2005-09-23 15:59:02 +--- old/Makefile.in ++++ new/Makefile.in @@ -31,7 +31,7 @@ LIBOBJ=lib/wildmatch.o lib/compat.o lib/ ZLIBOBJ=zlib/deflate.o zlib/inffast.o zlib/inflate.o zlib/inftrees.o \ zlib/trees.o zlib/zutil.o zlib/adler32.o zlib/compress.o zlib/crc32.o @@ -19,8 +19,8 @@ See the file "instructions" (after applying this patch) for more info. OBJS2=options.o flist.o io.o compat.o hlink.o token.o uidlist.o socket.o \ fileio.o batch.o clientname.o chmod.o OBJS3=progress.o pipe.o ---- orig/cleanup.c 2006-02-03 20:00:35 -+++ cleanup.c 2005-09-23 15:59:19 +--- old/cleanup.c ++++ new/cleanup.c @@ -23,6 +23,7 @@ extern int io_error; @@ -44,8 +44,8 @@ See the file "instructions" (after applying this patch) for more info. if (verbose > 2) { rprintf(FINFO,"_exit_cleanup(code=%d, file=%s, line=%d): about to call exit(%d)\n", ---- orig/clientserver.c 2006-02-03 20:41:03 -+++ clientserver.c 2005-09-23 15:59:36 +--- old/clientserver.c ++++ new/clientserver.c @@ -392,6 +392,9 @@ static int rsync_module(int f_in, int f_ XFLG_ABS_IF_SLASH | XFLG_OLD_PREFIXES); @@ -66,9 +66,9 @@ See the file "instructions" (after applying this patch) for more info. } else { rprintf(FLOG, "rsync %s %s from %s (%s)\n", am_sender ? "on" : "to", ---- orig/configure.in 2006-02-05 04:53:34 -+++ configure.in 2005-09-24 18:38:47 -@@ -536,6 +536,12 @@ if test x"$with_included_popt" != x"yes" +--- old/configure.in ++++ new/configure.in +@@ -540,6 +540,12 @@ if test x"$with_included_popt" != x"yes" AC_CHECK_LIB(popt, poptGetContext, , [with_included_popt=yes]) fi @@ -81,8 +81,8 @@ See the file "instructions" (after applying this patch) for more info. AC_MSG_CHECKING([whether to use included libpopt]) if test x"$with_included_popt" = x"yes"; then AC_MSG_RESULT($srcdir/popt) ---- orig/db_log_error-list.txt 2005-09-23 15:58:32 -+++ db_log_error-list.txt 2005-09-23 15:58:32 +--- old/db_log_error-list.txt ++++ new/db_log_error-list.txt @@ -0,0 +1,35 @@ +error type description +0 not an error. @@ -119,8 +119,8 @@ See the file "instructions" (after applying this patch) for more info. +31 unlink +32 failed to open file/directory +33 open? ---- orig/dblog-tables-mysql.sql 2005-09-23 16:08:39 -+++ dblog-tables-mysql.sql 2005-09-23 16:08:39 +--- old/dblog-tables-mysql.sql ++++ new/dblog-tables-mysql.sql @@ -0,0 +1,64 @@ +drop table transfer; +drop table exit; @@ -186,8 +186,8 @@ See the file "instructions" (after applying this patch) for more info. + PrimaryKey (id), + foreign key (session_id) references session (id) +); ---- orig/dblog-tables-postgresql.sql 2005-09-23 16:00:34 -+++ dblog-tables-postgresql.sql 2005-09-23 16:00:34 +--- old/dblog-tables-postgresql.sql ++++ new/dblog-tables-postgresql.sql @@ -0,0 +1,67 @@ +drop table transfer; +drop table exit; @@ -256,8 +256,8 @@ See the file "instructions" (after applying this patch) for more info. + Primary Key (id), + foreign key (session_id) references session (id) +); ---- orig/dblog.c 2005-09-24 18:25:52 -+++ dblog.c 2005-09-24 18:25:52 +--- old/dblog.c ++++ new/dblog.c @@ -0,0 +1,549 @@ +/* + * ODBC Database logging functions @@ -808,8 +808,8 @@ See the file "instructions" (after applying this patch) for more info. + rprintf(FERROR,"Error at db_log_error: Not connected to database!\n"); + } +} ---- orig/instructions 2005-09-23 15:58:24 -+++ instructions 2005-09-23 15:58:24 +--- old/instructions ++++ new/instructions @@ -0,0 +1,84 @@ +This patch adds the following options: + @@ -895,8 +895,8 @@ See the file "instructions" (after applying this patch) for more info. + sequence is used for unique IDs). If False the statement will be executed + after the session row is inserted (as is done when the session ID is + automatically generates unique IDs). Defaults to True. ---- orig/loadparm.c 2006-01-30 21:47:45 -+++ loadparm.c 2005-09-24 18:29:59 +--- old/loadparm.c ++++ new/loadparm.c @@ -120,9 +120,16 @@ typedef struct { char *auth_users; @@ -1044,9 +1044,9 @@ See the file "instructions" (after applying this patch) for more info. FN_LOCAL_BOOL(lp_ignore_errors, ignore_errors) FN_LOCAL_BOOL(lp_ignore_nonreadable, ignore_nonreadable) FN_LOCAL_BOOL(lp_list, list) ---- orig/log.c 2006-02-05 04:53:34 -+++ log.c 2005-09-23 16:01:13 -@@ -93,7 +93,7 @@ struct { +--- old/log.c ++++ new/log.c +@@ -94,7 +94,7 @@ struct { /* * Map from rsync error code to name, or return NULL. */ @@ -1055,8 +1055,8 @@ See the file "instructions" (after applying this patch) for more info. { int i; for (i = 0; rerr_names[i].name; i++) { ---- orig/main.c 2006-02-05 04:53:34 -+++ main.c 2005-09-23 16:01:22 +--- old/main.c ++++ new/main.c @@ -168,6 +168,9 @@ static void handle_stats(int f) if (am_daemon) { @@ -1067,9 +1067,9 @@ See the file "instructions" (after applying this patch) for more info. if (f == -1 || !am_sender) return; } ---- orig/receiver.c 2006-01-31 02:30:18 -+++ receiver.c 2006-01-14 08:27:51 -@@ -174,6 +174,10 @@ static int get_tmpname(char *fnametmp, c +--- old/receiver.c ++++ new/receiver.c +@@ -113,6 +113,10 @@ static int get_tmpname(char *fnametmp, c if (maxname < 1) { rprintf(FERROR, "temporary filename too long: %s\n", fname); @@ -1080,7 +1080,7 @@ See the file "instructions" (after applying this patch) for more info. fnametmp[0] = '\0'; return 0; } -@@ -290,6 +294,11 @@ static int receive_data(int f_in, char * +@@ -229,6 +233,11 @@ static int receive_data(int f_in, char * rsyserr(FERROR, errno, "lseek failed on %s", full_fname(fname)); @@ -1092,7 +1092,7 @@ See the file "instructions" (after applying this patch) for more info. exit_cleanup(RERR_FILEIO); } continue; -@@ -315,6 +324,9 @@ static int receive_data(int f_in, char * +@@ -254,6 +263,9 @@ static int receive_data(int f_in, char * report_write_error: rsyserr(FERROR, errno, "write failed on %s", full_fname(fname)); @@ -1102,7 +1102,7 @@ See the file "instructions" (after applying this patch) for more info. exit_cleanup(RERR_FILEIO); } -@@ -358,6 +370,12 @@ static void handle_delayed_updates(struc +@@ -297,6 +309,12 @@ static void handle_delayed_updates(struc rsyserr(FERROR, errno, "rename failed for %s (from %s)", full_fname(fname), partialptr); @@ -1115,7 +1115,7 @@ See the file "instructions" (after applying this patch) for more info. } else { if (remove_sent_files || (preserve_hard_links -@@ -480,6 +498,9 @@ int recv_files(int f_in, struct file_lis +@@ -419,6 +437,9 @@ int recv_files(int f_in, struct file_lis if (server_filter_list.head && check_filter(&server_filter_list, fname, 0) < 0) { rprintf(FERROR, "attempt to hack rsync failed.\n"); @@ -1125,7 +1125,7 @@ See the file "instructions" (after applying this patch) for more info. exit_cleanup(RERR_PROTOCOL); } -@@ -535,6 +556,11 @@ int recv_files(int f_in, struct file_lis +@@ -474,6 +495,11 @@ int recv_files(int f_in, struct file_lis rprintf(FERROR, "invalid basis_dir index: %d.\n", fnamecmp_type); @@ -1137,7 +1137,7 @@ See the file "instructions" (after applying this patch) for more info. exit_cleanup(RERR_PROTOCOL); } pathjoin(fnamecmpbuf, sizeof fnamecmpbuf, -@@ -580,6 +606,9 @@ int recv_files(int f_in, struct file_lis +@@ -519,6 +545,9 @@ int recv_files(int f_in, struct file_lis if (fd1 != -1 && do_fstat(fd1,&st) != 0) { rsyserr(FERROR, errno, "fstat %s failed", full_fname(fnamecmp)); @@ -1147,7 +1147,7 @@ See the file "instructions" (after applying this patch) for more info. discard_receive_data(f_in, file->length); close(fd1); continue; -@@ -593,6 +622,9 @@ int recv_files(int f_in, struct file_lis +@@ -532,6 +561,9 @@ int recv_files(int f_in, struct file_lis */ rprintf(FERROR,"recv_files: %s is a directory\n", full_fname(fnamecmp)); @@ -1157,7 +1157,7 @@ See the file "instructions" (after applying this patch) for more info. discard_receive_data(f_in, file->length); close(fd1); continue; -@@ -616,6 +648,9 @@ int recv_files(int f_in, struct file_lis +@@ -555,6 +587,9 @@ int recv_files(int f_in, struct file_lis if (fd2 == -1) { rsyserr(FERROR, errno, "open %s failed", full_fname(fname)); @@ -1167,7 +1167,7 @@ See the file "instructions" (after applying this patch) for more info. discard_receive_data(f_in, file->length); if (fd1 != -1) close(fd1); -@@ -649,6 +684,10 @@ int recv_files(int f_in, struct file_lis +@@ -588,6 +623,10 @@ int recv_files(int f_in, struct file_lis if (fd2 == -1) { rsyserr(FERROR, errno, "mkstemp %s failed", full_fname(fnametmp)); @@ -1178,7 +1178,7 @@ See the file "instructions" (after applying this patch) for more info. discard_receive_data(f_in, file->length); if (fd1 != -1) close(fd1); -@@ -671,12 +710,19 @@ int recv_files(int f_in, struct file_lis +@@ -610,12 +649,19 @@ int recv_files(int f_in, struct file_lis if (!log_before_transfer) log_item(file, &initial_stats, iflags, NULL); @@ -1198,7 +1198,7 @@ See the file "instructions" (after applying this patch) for more info. exit_cleanup(RERR_FILEIO); } -@@ -730,6 +776,12 @@ int recv_files(int f_in, struct file_lis +@@ -669,6 +715,12 @@ int recv_files(int f_in, struct file_lis rprintf(msgtype, "%s: %s failed verification -- update %s%s.\n", errstr, fname, keptstr, redostr); @@ -1211,8 +1211,8 @@ See the file "instructions" (after applying this patch) for more info. } if (!phase) { SIVAL(numbuf, 0, i); ---- orig/sender.c 2006-01-14 20:27:10 -+++ sender.c 2005-09-23 16:01:44 +--- old/sender.c ++++ new/sender.c @@ -352,6 +352,9 @@ void send_files(struct file_list *flist, if (!log_before_transfer)