Similarly to GZPRINTF, this is a drop in replacement that can be
improved where needd.
---
notmuch-client.h | 1 +
notmuch-dump.c | 10 +-
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/notmuch-client.h b/notmuch-client.h
index 55d4d526..7efcb06f 100644
---
These can be large, and hit buffer limitations of gzprintf.
---
notmuch-dump.c| 4 +++-
test/T240-dump-restore.sh | 1 -
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/notmuch-dump.c b/notmuch-dump.c
index fb322237..23d7d20a 100644
--- a/notmuch-dump.c
+++
Here's a not too ambitious attempt to clean up the error handling on
zlib output. It's bit gross to treat any error reported by zlib as
fatal, but it's a step up from ignoring them, and it's in the client
code, not in the library.
The first patch splits out the first fix of
Although (as of 1.2.11) zlib checks this parameter before writing to
it, the docs don't promise to keep doing so, so be safe.
---
util/zlib-extra.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/util/zlib-extra.c b/util/zlib-extra.c
index f691cccf..e17a9731 100644
---
This will at least catch errors, and can be replaced with more
sophisticated error handling where appropriate.
---
notmuch-client.h | 3 +++
notmuch-dump.c | 24
2 files changed, 15 insertions(+), 12 deletions(-)
diff --git a/notmuch-client.h b/notmuch-client.h
index
This is in the client code, rather than libnotmuch_util, because it
prints to stderr. Also it in pretends to generate notmuch status
codes.
---
notmuch-client.h | 8 +++-
status.c | 14 ++
2 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/notmuch-client.h
David Bremner writes:
> 'qsx' reported a bug on #notmuch with notmuch-dump and large stored
> queries. This test will pass (on my machine) if the value of `repeat'
> is made smaller.
I believe the underlying problem is explained by this comment in zlib.h
The number of uncompressed bytes
'qsx' reported a bug on #notmuch with notmuch-dump and large stored
queries. This test will pass (on my machine) if the value of `repeat'
is made smaller.
---
test/T240-dump-restore.sh | 13 +
1 file changed, 13 insertions(+)
diff --git a/test/T240-dump-restore.sh
the following diff addresses 3 zlib-related bugs in notmuch.
1) the second argument of gzerror() cannot be NULL, so replace it by a dummy
2) gzerror() cannot be closed after gzclosed(), so just print the error value
instead.
3) in gz_getline(), if gz_error sets its second argument to