summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xlators/features/changelog/lib/src/gf-changelog-helpers.c2
-rw-r--r--xlators/features/changelog/lib/src/gf-changelog-helpers.h2
-rw-r--r--xlators/features/changelog/lib/src/gf-changelog-journal-handler.c16
-rw-r--r--xlators/features/changelog/lib/src/gf-changelog-journal.h2
4 files changed, 11 insertions, 11 deletions
diff --git a/xlators/features/changelog/lib/src/gf-changelog-helpers.c b/xlators/features/changelog/lib/src/gf-changelog-helpers.c
index 8b35f4e9416..45cf55778e4 100644
--- a/xlators/features/changelog/lib/src/gf-changelog-helpers.c
+++ b/xlators/features/changelog/lib/src/gf-changelog-helpers.c
@@ -36,7 +36,7 @@ gf_changelog_write (int fd, char *buffer, size_t len)
}
void
-gf_rfc3986_encode (unsigned char *s, char *enc, char *estr)
+gf_rfc3986_encode_space_newline (unsigned char *s, char *enc, char *estr)
{
for (; *s; s++) {
if (estr[*s])
diff --git a/xlators/features/changelog/lib/src/gf-changelog-helpers.h b/xlators/features/changelog/lib/src/gf-changelog-helpers.h
index bd21e4df035..b05628ee70d 100644
--- a/xlators/features/changelog/lib/src/gf-changelog-helpers.h
+++ b/xlators/features/changelog/lib/src/gf-changelog-helpers.h
@@ -209,7 +209,7 @@ ssize_t
gf_changelog_read_path (int fd, char *buffer, size_t bufsize);
void
-gf_rfc3986_encode (unsigned char *s, char *enc, char *estr);
+gf_rfc3986_encode_space_newline (unsigned char *s, char *enc, char *estr);
size_t
gf_changelog_write (int fd, char *buffer, size_t len);
diff --git a/xlators/features/changelog/lib/src/gf-changelog-journal-handler.c b/xlators/features/changelog/lib/src/gf-changelog-journal-handler.c
index e490069a165..f2fc25cc671 100644
--- a/xlators/features/changelog/lib/src/gf-changelog-journal-handler.c
+++ b/xlators/features/changelog/lib/src/gf-changelog-journal-handler.c
@@ -392,8 +392,10 @@ gf_changelog_parse_ascii (xlator_t *this,
break;
}
- gf_rfc3986_encode ((unsigned char *) ptr,
- eptr, jnl->rfc3986);
+ gf_rfc3986_encode_space_newline (
+ (unsigned char *) ptr,
+ eptr,
+ jnl->rfc3986_space_newline);
FILL_AND_MOVE (eptr, ascii, off,
mover, nleft, len);
free (eptr);
@@ -955,9 +957,8 @@ gf_changelog_init_history (xlator_t *this,
jnl->hist_jnl->jnl_brickpath[PATH_MAX-1] = 0;
for (i = 0; i < 256; i++) {
- jnl->hist_jnl->rfc3986[i] =
- (isalnum(i) || i == '~' ||
- i == '-' || i == '.' || i == '_') ? i : 0;
+ jnl->hist_jnl->rfc3986_space_newline[i] =
+ (i == ' ' || i == '\n' || i == '%') ? 0 : i;
}
return 0;
@@ -1026,9 +1027,8 @@ gf_changelog_journal_init (void *xl, struct gf_brick_spec *brick)
/* RFC 3986 {de,en}coding */
for (i = 0; i < 256; i++) {
- jnl->rfc3986[i] =
- (isalnum(i) || i == '~' ||
- i == '-' || i == '.' || i == '_') ? i : 0;
+ jnl->rfc3986_space_newline[i] =
+ (i == ' ' || i == '\n' || i == '%') ? 0 : i;
}
ret = gf_changelog_init_history (this, jnl, brick->brick_path);
diff --git a/xlators/features/changelog/lib/src/gf-changelog-journal.h b/xlators/features/changelog/lib/src/gf-changelog-journal.h
index e91807c80b6..46d50f159d9 100644
--- a/xlators/features/changelog/lib/src/gf-changelog-journal.h
+++ b/xlators/features/changelog/lib/src/gf-changelog-journal.h
@@ -53,7 +53,7 @@ typedef struct gf_changelog_journal {
char jnl_processed_dir[PATH_MAX];
char jnl_processing_dir[PATH_MAX];
- char rfc3986[256]; /* RFC 3986 string encoding */
+ char rfc3986_space_newline[256]; /* RFC 3986 string encoding */
struct gf_changelog_journal *hist_jnl;
int hist_done; /* holds 0 done scanning,