From 1b80ff9ee79b3fbe2028a8c22a01e45e9131cda2 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 8 May 2019 14:54:42 +0200 Subject: make generated ego key available in continuation when creating egos --- src/identity/plugin_rest_identity.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'src/identity/plugin_rest_identity.c') diff --git a/src/identity/plugin_rest_identity.c b/src/identity/plugin_rest_identity.c index 89f590d3e..e6537070a 100644 --- a/src/identity/plugin_rest_identity.c +++ b/src/identity/plugin_rest_identity.c @@ -641,6 +641,26 @@ do_finished (void *cls, const char *emsg) } +/** + * Processing finished, when creating an ego. + * + * @param cls request handle + * @param private key of the ego, or NULL on error + * @param emsg error message + */ +static void +do_finished_create (void *cls, + const struct GNUNET_CRYPTO_EcdsaPrivateKey *pk, + const char *emsg) +{ + struct RequestHandle *handle = cls; + + (void) pk; + do_finished (handle, + emsg); +} + + /** * Processing edit ego with EgoEntry ego_entry * @@ -1014,7 +1034,7 @@ ego_create (struct GNUNET_REST_RequestHandle *con_handle, json_decref (data_js); handle->response_code = MHD_HTTP_CREATED; handle->op = GNUNET_IDENTITY_create (handle->identity_handle, handle->name, - &do_finished, handle); + &do_finished_create, handle); } /** -- cgit v1.2.3