Logoj0ke.net Open Build Service > Projects > ha:testing > csync2-git > rsync-default-strong-len.patch
Sign Up | Log In

File rsync-default-strong-len.patch of Package csync2-git (Revision 9b32d7f34c56f37c2692be5c29f5aae9)

Currently displaying revision 9b32d7f34c56f37c2692be5c29f5aae9, show latest

x
 
1
--- rsync.c.orig    2016-04-01 14:40:50.368258190 +0200
2
+++ rsync.c 2016-04-01 14:43:11.160366063 +0200
3
@@ -318,8 +318,13 @@
4
 
5
    if ( isreg ) {
6
        csync_debug(3, "Running rs_sig_file() from librsync....\n");
7
-       result = rs_sig_file(basis_file, sig_file,
8
-               RS_DEFAULT_BLOCK_LEN, RS_DEFAULT_STRONG_LEN, &stats);
9
+       #ifdef RS_DEFAULT_STRONG_LEN
10
+           result = rs_sig_file(basis_file, sig_file,
11
+                   RS_DEFAULT_BLOCK_LEN, RS_DEFAULT_STRONG_LEN, &stats);
12
+       #else
13
+           result = rs_sig_file(basis_file, sig_file,
14
+                   RS_DEFAULT_BLOCK_LEN, RS_MD4_SIG_MAGIC, &stats);
15
+       #endif
16
        if (result != RS_DONE) {
17
            csync_debug(0, "Internal error from rsync library!\n");
18
            goto error;
19
@@ -405,8 +410,13 @@
20
    if ( !basis_file ) basis_file = fopen("/dev/null", "rb");
21
 
22
    csync_debug(3, "Running rs_sig_file() from librsync..\n");
23
+   #ifdef RS_DEFAULT_STRONG_LEN
24
    result = rs_sig_file(basis_file, sig_file,
25
            RS_DEFAULT_BLOCK_LEN, RS_DEFAULT_STRONG_LEN, &stats);
26
+   #else
27
+   result = rs_sig_file(basis_file, sig_file,
28
+           RS_DEFAULT_BLOCK_LEN, RS_MD4_SIG_MAGIC, &stats);
29
+   #endif
30
    if (result != RS_DONE)
31
        csync_fatal("Got an error from librsync, too bad!\n");
32
 
33