2003-05-27 Marcus Brinkmann <marcus@g10code.de>

* op-support.c (_gpgme_parse_inv_userid): Add missing break
	statements.
	* encrypt.c (gpgme_op_encrypt): Use gpgme_error_t instead of int.
This commit is contained in:
Marcus Brinkmann 2003-05-27 08:18:04 +00:00
parent ef83cb47d6
commit 78c70247f0
3 changed files with 18 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2003-05-27 Marcus Brinkmann <marcus@g10code.de>
* op-support.c (_gpgme_parse_inv_userid): Add missing break
statements.
* encrypt.c (gpgme_op_encrypt): Use gpgme_error_t instead of int.
2003-05-27 Marcus Brinkmann <marcus@g10code.de> 2003-05-27 Marcus Brinkmann <marcus@g10code.de>
* encrypt.c (gpgme_op_encrypt_result): Use intermediate variable * encrypt.c (gpgme_op_encrypt_result): Use intermediate variable

View File

@ -206,7 +206,7 @@ gpgme_error_t
gpgme_op_encrypt (gpgme_ctx_t ctx, gpgme_recipients_t recp, gpgme_op_encrypt (gpgme_ctx_t ctx, gpgme_recipients_t recp,
gpgme_data_t plain, gpgme_data_t cipher) gpgme_data_t plain, gpgme_data_t cipher)
{ {
int err = encrypt_start (ctx, 1, recp, plain, cipher); gpgme_error_t err = encrypt_start (ctx, 1, recp, plain, cipher);
if (!err) if (!err)
err = _gpgme_wait_one (ctx); err = _gpgme_wait_one (ctx);
return err; return err;

View File

@ -134,36 +134,47 @@ _gpgme_parse_inv_userid (char *args, gpgme_invalid_user_id_t *userid)
default: default:
case 0: case 0:
inv_userid->reason = GPGME_Unknown_Reason; inv_userid->reason = GPGME_Unknown_Reason;
break;
case 1: case 1:
inv_userid->reason = GPGME_Not_Found; inv_userid->reason = GPGME_Not_Found;
break;
case 2: case 2:
inv_userid->reason = GPGME_Ambiguous_Specification; inv_userid->reason = GPGME_Ambiguous_Specification;
break;
case 3: case 3:
inv_userid->reason = GPGME_Wrong_Key_Usage; inv_userid->reason = GPGME_Wrong_Key_Usage;
break;
case 4: case 4:
inv_userid->reason = GPGME_Key_Revoked; inv_userid->reason = GPGME_Key_Revoked;
break;
case 5: case 5:
inv_userid->reason = GPGME_Key_Expired; inv_userid->reason = GPGME_Key_Expired;
break;
case 6: case 6:
inv_userid->reason = GPGME_No_CRL_Known; inv_userid->reason = GPGME_No_CRL_Known;
break;
case 7: case 7:
inv_userid->reason = GPGME_CRL_Too_Old; inv_userid->reason = GPGME_CRL_Too_Old;
break;
case 8: case 8:
inv_userid->reason = GPGME_Policy_Mismatch; inv_userid->reason = GPGME_Policy_Mismatch;
break;
case 9: case 9:
inv_userid->reason = GPGME_No_Secret_Key; inv_userid->reason = GPGME_No_Secret_Key;
break;
case 10: case 10:
inv_userid->reason = GPGME_Key_Not_Trusted; inv_userid->reason = GPGME_Key_Not_Trusted;
break;
} }
while (*tail == ' ') while (*tail == ' ')