aboutsummaryrefslogtreecommitdiff
path: root/src/reclaim
diff options
context:
space:
mode:
authorTristan Schwieren <tristan.schwieren@tum.de>2022-07-08 12:52:48 +0200
committerTristan Schwieren <tristan.schwieren@tum.de>2022-07-08 12:52:48 +0200
commitdcdb638c4159602b0ddb7c6729e07d044e88392b (patch)
treef648507e82476322bbfce20650dde3408d9dcab1 /src/reclaim
parentfe80bcfb8c0ff189fc625e72eb38a6617d419dd7 (diff)
downloadgnunet-dcdb638c4159602b0ddb7c6729e07d044e88392b.tar.gz
gnunet-dcdb638c4159602b0ddb7c6729e07d044e88392b.zip
- DID lib; formatting
Diffstat (limited to 'src/reclaim')
-rw-r--r--src/reclaim/did_core.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/reclaim/did_core.c b/src/reclaim/did_core.c
index 574e3938d..69331c6ea 100644
--- a/src/reclaim/did_core.c
+++ b/src/reclaim/did_core.c
@@ -66,7 +66,8 @@ DID_resolve_gns_lookup_cb (
66 free (cls); 66 free (cls);
67 67
68 if (rd_count != 1) 68 if (rd_count != 1)
69 cb (GNUNET_NO, "An ego should only have one DID Document", cls_did_resolve_cb); 69 cb (GNUNET_NO, "An ego should only have one DID Document",
70 cls_did_resolve_cb);
70 71
71 if (rd[0].record_type == GNUNET_DNSPARSER_TYPE_TXT) 72 if (rd[0].record_type == GNUNET_DNSPARSER_TYPE_TXT)
72 { 73 {
@@ -100,13 +101,18 @@ DID_resolve (const char *did,
100 return GNUNET_NO; 101 return GNUNET_NO;
101 102
102 // Create closure for lookup callback 103 // Create closure for lookup callback
103 struct DID_resolve_return *cls_gns_lookup_cb = malloc (sizeof(struct DID_resolve_return)); 104 struct DID_resolve_return *cls_gns_lookup_cb
105 = malloc (sizeof(struct DID_resolve_return));
104 cls_gns_lookup_cb->cb = cont; 106 cls_gns_lookup_cb->cb = cont;
105 cls_gns_lookup_cb->cls = cls; 107 cls_gns_lookup_cb->cls = cls;
106 108
107 GNUNET_GNS_lookup (gns_handle, DID_DOCUMENT_LABEL, &pkey, 109 GNUNET_GNS_lookup (gns_handle,
110 DID_DOCUMENT_LABEL,
111 &pkey,
108 GNUNET_DNSPARSER_TYPE_TXT, 112 GNUNET_DNSPARSER_TYPE_TXT,
109 GNUNET_GNS_LO_DEFAULT, &DID_resolve_gns_lookup_cb, cls_gns_lookup_cb); 113 GNUNET_GNS_LO_DEFAULT,
114 &DID_resolve_gns_lookup_cb,
115 cls_gns_lookup_cb);
110 116
111 return GNUNET_OK; 117 return GNUNET_OK;
112} 118}
@@ -195,7 +201,8 @@ DID_create_namestore_lookup_cb (void *cls,
195 record_data.flags = GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION; 201 record_data.flags = GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION;
196 202
197 // Create closure for record store callback 203 // Create closure for record store callback
198 struct DID_action_return *cls_record_store_cb = malloc (sizeof(struct DID_action_return)); 204 struct DID_action_return *cls_record_store_cb
205 = malloc (sizeof(struct DID_action_return));
199 cls_record_store_cb->cb = cont; 206 cls_record_store_cb->cb = cont;
200 cls_record_store_cb->cls = cls1; 207 cls_record_store_cb->cls = cls1;
201 208
@@ -209,8 +216,8 @@ DID_create_namestore_lookup_cb (void *cls,
209 (void *) cls_record_store_cb); 216 (void *) cls_record_store_cb);
210 217
211 } 218 }
212 219
213 free(cls); 220 free (cls);
214} 221}
215 222
216/** 223/**