aboutsummaryrefslogtreecommitdiffstats
path: root/g10/compress.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>1998-03-09 21:44:06 +0000
committerWerner Koch <[email protected]>1998-03-09 21:44:06 +0000
commita6a8f1e706bd7e528262151bc04ebb9409c2eeed (patch)
tree20b5771581e695a22559d8ffe3f90862afb11e3d /g10/compress.c
parentremoved g10maint.c (diff)
downloadgnupg-a6a8f1e706bd7e528262151bc04ebb9409c2eeed.tar.gz
gnupg-a6a8f1e706bd7e528262151bc04ebb9409c2eeed.zip
partial DSA support
Diffstat (limited to 'g10/compress.c')
-rw-r--r--g10/compress.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/g10/compress.c b/g10/compress.c
index ebad43045..686332b82 100644
--- a/g10/compress.c
+++ b/g10/compress.c
@@ -230,9 +230,11 @@ compress_filter( void *opaque, int control,
* Handle a compressed packet
*/
int
-handle_compressed( PKT_compressed *cd )
+handle_compressed( PKT_compressed *cd,
+ int (*callback)(IOBUF, void *), void *passthru )
{
compress_filter_context_t cfx;
+ int rc;
memset( &cfx, 0, sizeof cfx );
if( cd->algorithm == 1 )
@@ -241,7 +243,10 @@ handle_compressed( PKT_compressed *cd )
return G10ERR_COMPR_ALGO;
iobuf_push_filter( cd->buf, compress_filter, &cfx );
- proc_packets(cd->buf);
+ if( callback )
+ rc = callback(cd->buf, passthru );
+ else
+ rc = proc_packets(cd->buf);
iobuf_pop_filter( cd->buf, compress_filter, &cfx );
#if 0
if( cd->len )
@@ -250,6 +255,6 @@ handle_compressed( PKT_compressed *cd )
iobuf_clear_eof( cd->buf );
#endif
cd->buf = NULL;
- return 0;
+ return rc;
}