diff options
author | Marcus Brinkmann <[email protected]> | 2009-11-26 17:53:06 +0000 |
---|---|---|
committer | Marcus Brinkmann <[email protected]> | 2009-11-26 17:53:06 +0000 |
commit | 56af8b77e678d8a464d6edeec4672965135b65e0 (patch) | |
tree | 7fdf419c3be0fe994fb9f17816b79a74799f8b18 /src/opassuan.c | |
parent | 2009-11-25 Marcus Brinkmann <[email protected]> (diff) | |
download | gpgme-56af8b77e678d8a464d6edeec4672965135b65e0.tar.gz gpgme-56af8b77e678d8a464d6edeec4672965135b65e0.zip |
2009-11-26 Marcus Brinkmann <[email protected]>
* opassuan.c (opassuan_start): Allocate result structure before
beginning operation.
Diffstat (limited to 'src/opassuan.c')
-rw-r--r-- | src/opassuan.c | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/src/opassuan.c b/src/opassuan.c index 0c535dc1..639a3661 100644 --- a/src/opassuan.c +++ b/src/opassuan.c @@ -29,6 +29,14 @@ #include "util.h" #include "debug.h" +/* LEGACY: Remove this when removing the deprecated result + structure. */ +typedef struct +{ + struct _gpgme_op_assuan_result result; +} *op_data_t; + + static gpgme_error_t opassuan_start (gpgme_ctx_t ctx, int synchronous, const char *command, @@ -50,6 +58,17 @@ opassuan_start (gpgme_ctx_t ctx, int synchronous, if (err) return err; + { + /* LEGACY: Remove this when removing the deprecated result + structure. */ + void *hook; + op_data_t opd; + err = _gpgme_op_data_lookup (ctx, OPDATA_ASSUAN, &hook, + sizeof (*opd), NULL); + if (err) + return err; + } + return _gpgme_engine_op_assuan_transact (ctx->engine, command, data_cb, data_cb_value, inq_cb, inq_cb_value, @@ -138,11 +157,6 @@ struct engine void *engine; }; -typedef struct -{ - struct _gpgme_op_assuan_result result; -} *op_data_t; - gpg_error_t _gpgme_engine_assuan_last_op_err (void *engine); gpgme_assuan_result_t |