* encode.c (encode_simple), sign.c (sign_symencrypt_file): Properly use
authorDavid Shaw <dshaw@jabberwocky.com>
Sat, 15 Nov 2003 15:38:43 +0000 (15:38 +0000)
committerDavid Shaw <dshaw@jabberwocky.com>
Sat, 15 Nov 2003 15:38:43 +0000 (15:38 +0000)
default_compress_algo (--compress-algo, followed by the highest
--personal-compress-preference, followed by ZIP) to get the algorithm.

g10/ChangeLog
g10/encode.c
g10/sign.c

index fc62679..c0518ad 100644 (file)
@@ -1,3 +1,10 @@
+2003-11-15  David Shaw  <dshaw@jabberwocky.com>
+
+       * encode.c (encode_simple), sign.c (sign_symencrypt_file):
+       Properly use default_compress_algo (--compress-algo, followed by
+       the highest --personal-compress-preference, followed by ZIP) to
+       get the algorithm.
+
 2003-11-14  David Shaw  <dshaw@jabberwocky.com>
 
        * options.h, trustdb.c (trust_model_string, init_trustdb): Add
index b291ece..b6a776d 100644 (file)
@@ -161,7 +161,7 @@ encode_simple( const char *filename, int mode, int use_seskey )
     compress_filter_context_t zfx;
     text_filter_context_t tfx;
     progress_filter_context_t pfx;
-    int do_compress = opt.compress && !RFC1991;
+    int do_compress = !RFC1991 && default_compress_algo();
 
     memset( &cfx, 0, sizeof cfx);
     memset( &afx, 0, sizeof afx);
@@ -332,7 +332,7 @@ encode_simple( const char *filename, int mode, int use_seskey )
       {
         if (cfx.dek && cfx.dek->use_mdc)
           zfx.new_ctb = 1;
-       push_compress_filter(out,&zfx,opt.def_compress_algo);
+       push_compress_filter(out,&zfx,default_compress_algo());
       }
 
     /* do the work */
index e595ce9..17c1d26 100644 (file)
@@ -1182,7 +1182,7 @@ sign_symencrypt_file (const char *fname, STRLIST locusr)
 
     /* Push the Zip filter */
     if (opt.compress && default_compress_algo())
-      push_compress_filter(out,&zfx,opt.def_compress_algo);
+      push_compress_filter(out,&zfx,default_compress_algo());
 
     /* Write the one-pass signature packets */
     /*(current filters: zip - encrypt - armor)*/