aboutsummaryrefslogtreecommitdiffstats
path: root/g10
diff options
context:
space:
mode:
Diffstat (limited to 'g10')
-rw-r--r--g10/ChangeLog7
-rw-r--r--g10/armor.c45
-rw-r--r--g10/hkp.c7
3 files changed, 36 insertions, 23 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog
index 3b8c6a0fb..a1b94b3e5 100644
--- a/g10/ChangeLog
+++ b/g10/ChangeLog
@@ -1,3 +1,10 @@
+Fri Dec 31 14:08:15 CET 1999 Werner Koch <[email protected]>
+
+ * armor.c (armor_filter): Made the "Comment:" header translatable.
+
+ * hkp.c (hkp_import): Make sure that the program does not return
+ success when there is a connection problem. Reported by Phillip Jones.
+
Sun Dec 19 15:22:26 CET 1999 Werner Koch <[email protected]>
* armor.c (LF): Use this new macro at all places where a line LF
diff --git a/g10/armor.c b/g10/armor.c
index 7ef8f336d..7728337e3 100644
--- a/g10/armor.c
+++ b/g10/armor.c
@@ -894,42 +894,43 @@ armor_filter( void *opaque, int control,
}
else if( control == IOBUFCTRL_FLUSH && !afx->cancel ) {
if( !afx->status ) { /* write the header line */
+ const char *s;
+
if( afx->what >= DIM(head_strings) )
log_bug("afx->what=%d", afx->what);
iobuf_writestr(a, "-----");
iobuf_writestr(a, head_strings[afx->what] );
- iobuf_writestr(a, "-----" LF );
+ iobuf_writestr(a, "-----\n");
if( !opt.no_version )
iobuf_writestr(a, "Version: GnuPG v" VERSION " ("
- PRINTABLE_OS_NAME ")" LF );
-
- if( opt.comment_string ) {
- const char *s = opt.comment_string;
- if( *s ) {
- iobuf_writestr(a, "Comment: " );
- for( ; *s; s++ ) {
- if( *s == '\n' )
- iobuf_writestr(a, "\\n" );
- else if( *s == '\r' )
- iobuf_writestr(a, "\\r" );
- else if( *s == '\v' )
- iobuf_writestr(a, "\\v" );
- else
- iobuf_put(a, *s );
- }
- iobuf_writestr(a, LF );
+ PRINTABLE_OS_NAME ")\n");
+
+ /* write the comment string or a default one */
+ s = opt.comment_string ? opt.comment_string
+ : _("For info see http://www.gnupg.org");
+ if( *s ) {
+ iobuf_writestr(a, "Comment: " );
+ for( ; *s; s++ ) {
+ if( *s == '\n' )
+ iobuf_writestr(a, "\\n" );
+ else if( *s == '\r' )
+ iobuf_writestr(a, "\\r" );
+ else if( *s == '\v' )
+ iobuf_writestr(a, "\\v" );
+ else
+ iobuf_put(a, *s );
}
+ iobuf_put(a, '\n' );
}
- else
- iobuf_writestr(a,
- "Comment: For info see http://www.gnupg.org" LF);
+
if( afx->hdrlines )
iobuf_writestr(a, afx->hdrlines);
- iobuf_writestr(a, LF );
+ iobuf_put(a, '\n');
afx->status++;
afx->idx = 0;
afx->idx2 = 0;
afx->crc = CRCINIT;
+
}
crc = afx->crc;
idx = afx->idx;
diff --git a/g10/hkp.c b/g10/hkp.c
index 712fb6f51..7950cc54b 100644
--- a/g10/hkp.c
+++ b/g10/hkp.c
@@ -102,7 +102,12 @@ hkp_import( STRLIST users )
log_info(_("%s: not a valid key ID\n"), users->d );
continue;
}
- hkp_ask_import( kid );
+ /* because the function may use log_info in some situations, the
+ * errorcounter ist not increaed and the program will return
+ * with success - which is not good when this function is used.
+ */
+ if( hkp_ask_import( kid ) )
+ log_inc_errorcount();
}
return 0;
#endif