gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnunet] 17/70: -did not working remove


From: gnunet
Subject: [gnunet] 17/70: -did not working remove
Date: Wed, 31 Aug 2022 18:00:11 +0200

This is an automated email from the git hooks/post-receive script.

martin-schanzenbach pushed a commit to branch master
in repository gnunet.

commit 8e685158f11e8c8d57b30248a694c66119066d0c
Author: Tristan Schwieren <tristan.schwieren@tum.de>
AuthorDate: Tue Dec 14 19:39:22 2021 +0100

    -did not working remove
---
 src/did/gnunet-did.c | 23 ++++++++++++++++-------
 1 file changed, 16 insertions(+), 7 deletions(-)

diff --git a/src/did/gnunet-did.c b/src/did/gnunet-did.c
index 62047beaf..f5dfc4f43 100644
--- a/src/did/gnunet-did.c
+++ b/src/did/gnunet-did.c
@@ -231,7 +231,7 @@ resolve_did_document()
 typedef void
 (*remove_did_document_callback) (void * cls);
 
-struct remove_did_document_cont_cls {
+struct event {
        remove_did_document_callback cont;
        void * cls;
 };
@@ -240,7 +240,7 @@ struct remove_did_document_cont_cls {
  * @brief Callback after the DID has been removed
  */
 static void
-remove_did_cb(void * cls){
+remove_did_cb(void * arg){
        // Test if record was removed from Namestore
        printf("DID Document has been removed\n");
        GNUNET_SCHEDULER_add_now(cleanup, NULL);
@@ -266,8 +266,7 @@ remove_did_ego_lookup_cb(void * cls, struct 
GNUNET_IDENTITY_Ego * ego){
        //      .flags = GNUNET_GNSRECORD_RF_NONE
        //};
 
-       struct remove_did_document_cont_cls * blob = (struct 
remove_did_document_cont_cls *) cls;
-       printf("2: %d\n", * ((int *) (blob->cls)));
+       printf("2: %d\n", * (int *) cls);
 
        //GNUNET_NAMESTORE_records_store (namestore_handle,
        //                                skey,
@@ -291,13 +290,23 @@ remove_did_document(remove_did_document_callback cont, 
void * cls)
                ret = 1;
                return;
        } else {
-               struct remove_did_document_cont_cls blob = {cont, cls};
-               printf("1: %d\n", * (int *) blob.cls);
+               //struct remove_did_document_cont_cls * blob = malloc(sizeof(* 
blob));
+               //blob->cont = (remove_did_document_callback *) 
malloc(sizeof(*cont));
+               //memcpy(blob->cont, cont, sizeof(*cont));
+
+               struct event * blob = malloc(sizeof(struct event));
+               //blob->cont = malloc(sizeof(remove_did_document_callback));
+               blob->cls = malloc(sizeof(*cls));
+
+               //memcpy(blob->cont, cont, sizeof(*cont));
+               memcpy(blob->cls, cls, sizeof(*cls));
+
+               printf("1: %d\n", * (int *) blob->cls);
 
                GNUNET_IDENTITY_ego_lookup(my_cfg,
                                           attr_ego,
                                           &remove_did_ego_lookup_cb,
-                                          (void *) &blob);
+                                          blob);
        } 
 }
 

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]