Moved write_ndx_and_attrs() too.
authorWayne Davison <wayned@samba.org>
Sat, 2 Dec 2006 16:13:02 +0000 (16:13 +0000)
committerWayne Davison <wayned@samba.org>
Sat, 2 Dec 2006 16:13:02 +0000 (16:13 +0000)
rsync.c
sender.c

diff --git a/rsync.c b/rsync.c
index 4649752e337e583c1ee62ba24a70b42fc5b0ad5d..b2c3ee056ddf3ce34175665968a9503d98e9650c 100644 (file)
--- a/rsync.c
+++ b/rsync.c
@@ -91,6 +91,19 @@ void setup_iconv()
 }
 #endif
 
+static void write_ndx_and_attrs(int f_out, int ndx, int iflags,
+                               uchar fnamecmp_type, char *buf, int len)
+{
+       write_int(f_out, ndx);
+       if (protocol_version < 29)
+               return;
+       write_shortint(f_out, iflags);
+       if (iflags & ITEM_BASIS_TYPE_FOLLOWS)
+               write_byte(f_out, fnamecmp_type);
+       if (iflags & ITEM_XNAME_FOLLOWS)
+               write_vstring(f_out, buf, len);
+}
+
 /* This is used by sender.c with a valid f_out, and by receive.c with
  * f_out = -1. */
 int read_item_attrs(int f_in, int f_out, int ndx, uchar *type_ptr,
index b0c6570b61d27f6d0f67eb6a289b0713165684da..52aaa9c6eeafe7953751fbc3ae4e70f6af0a16b3 100644 (file)
--- a/sender.c
+++ b/sender.c
@@ -143,19 +143,6 @@ void successful_send(int ndx)
        }
 }
 
-static void write_ndx_and_attrs(int f_out, int ndx, int iflags,
-                               uchar fnamecmp_type, char *buf, int len)
-{
-       write_int(f_out, ndx);
-       if (protocol_version < 29)
-               return;
-       write_shortint(f_out, iflags);
-       if (iflags & ITEM_BASIS_TYPE_FOLLOWS)
-               write_byte(f_out, fnamecmp_type);
-       if (iflags & ITEM_XNAME_FOLLOWS)
-               write_vstring(f_out, buf, len);
-}
-
 void send_files(struct file_list *flist, int f_out, int f_in)
 {
        int fd = -1;