aboutsummaryrefslogtreecommitdiffstats
path: root/rsync.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2006-02-06 18:42:46 +0000
committerWayne Davison <wayned@samba.org>2006-02-06 18:42:46 +0000
commite0f4a661be6975aad65aac31910fc4c7081e46a7 (patch)
treed4184036b61e0936cc568d95ddf8d91d71ffc567 /rsync.c
parent507433f6caec010564955a8e9133effb2fc50436 (diff)
downloadandroid_external_rsync-e0f4a661be6975aad65aac31910fc4c7081e46a7.tar.gz
android_external_rsync-e0f4a661be6975aad65aac31910fc4c7081e46a7.tar.bz2
android_external_rsync-e0f4a661be6975aad65aac31910fc4c7081e46a7.zip
Don't setup ic_chck if --8-bit was specified.
Diffstat (limited to 'rsync.c')
-rw-r--r--rsync.c34
1 files changed, 16 insertions, 18 deletions
diff --git a/rsync.c b/rsync.c
index ebccb13b..7f1056bb 100644
--- a/rsync.c
+++ b/rsync.c
@@ -43,6 +43,7 @@ extern int am_server;
extern int am_sender;
extern int am_generator;
extern int am_starting_up;
+extern int allow_8bit_chars;
extern int preserve_uid;
extern int preserve_gid;
extern int inplace;
@@ -66,26 +67,23 @@ static const char *default_charset(void)
void setup_iconv()
{
- const char *defset;
+ if (!am_server && !allow_8bit_chars) {
+ const char *defset = default_charset();
- if (!am_server)
- return;
-
- defset = default_charset();
-
- /* It's OK if this fails... */
- ic_chck = iconv_open(defset, defset);
+ /* It's OK if this fails... */
+ ic_chck = iconv_open(defset, defset);
- if (verbose > 3) {
- if (ic_chck == (iconv_t)-1) {
- rprintf(FINFO,
- "note: iconv_open(\"%s\", \"%s\") failed (%d)"
- " -- using isprint() instead of iconv().\n",
- defset, defset, errno);
- } else {
- rprintf(FINFO,
- "note: iconv_open(\"%s\", \"%s\") succeeded.\n",
- defset, defset);
+ if (verbose > 3) {
+ if (ic_chck == (iconv_t)-1) {
+ rprintf(FINFO,
+ "note: iconv_open(\"%s\", \"%s\") failed (%d)"
+ " -- using isprint() instead of iconv().\n",
+ defset, defset, errno);
+ } else {
+ rprintf(FINFO,
+ "note: iconv_open(\"%s\", \"%s\") succeeded.\n",
+ defset, defset);
+ }
}
}
}