aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacki <jacki@thejackimonster.de>2024-05-08 00:30:14 +0200
committerJacki <jacki@thejackimonster.de>2024-05-08 00:30:14 +0200
commita02d9f298d4ccf03e51a00404abd193dcb9f11d9 (patch)
treefcf22155b83ce11579d0a4980e857bc28bae773f
parentc024d2357a996afbaa6f0efa7fa6b6675212065a (diff)
downloadlibgnunetchat-a02d9f298d4ccf03e51a00404abd193dcb9f11d9.tar.gz
libgnunetchat-a02d9f298d4ccf03e51a00404abd193dcb9f11d9.zip
Fix ticket consumption regarding changes in reclaim
Signed-off-by: Jacki <jacki@thejackimonster.de>
-rw-r--r--src/gnunet_chat_lib_intern.c4
-rw-r--r--src/gnunet_chat_ticket.c2
-rw-r--r--tests/test_gnunet_chat_attribute.c25
3 files changed, 14 insertions, 17 deletions
diff --git a/src/gnunet_chat_lib_intern.c b/src/gnunet_chat_lib_intern.c
index ad45798..3e8e858 100644
--- a/src/gnunet_chat_lib_intern.c
+++ b/src/gnunet_chat_lib_intern.c
@@ -1033,7 +1033,7 @@ cb_iterate_ticket_check (void *cls,
1033 new_tickets->op = GNUNET_RECLAIM_ticket_consume( 1033 new_tickets->op = GNUNET_RECLAIM_ticket_consume(
1034 handle->reclaim, 1034 handle->reclaim,
1035 ticket, 1035 ticket,
1036 //rp_uri, 1036 rp_uri,
1037 cb_consume_ticket_check, 1037 cb_consume_ticket_check,
1038 new_tickets 1038 new_tickets
1039 ); 1039 );
@@ -1119,7 +1119,7 @@ cb_iterate_ticket (void *cls,
1119 new_tickets->op = GNUNET_RECLAIM_ticket_consume( 1119 new_tickets->op = GNUNET_RECLAIM_ticket_consume(
1120 handle->reclaim, 1120 handle->reclaim,
1121 ticket, 1121 ticket,
1122 //rp_uri, 1122 rp_uri,
1123 cb_consume_ticket, 1123 cb_consume_ticket,
1124 new_tickets 1124 new_tickets
1125 ); 1125 );
diff --git a/src/gnunet_chat_ticket.c b/src/gnunet_chat_ticket.c
index c7a635e..216cccd 100644
--- a/src/gnunet_chat_ticket.c
+++ b/src/gnunet_chat_ticket.c
@@ -93,7 +93,7 @@ ticket_consume(struct GNUNET_CHAT_Ticket *ticket,
93 ticket->op = GNUNET_RECLAIM_ticket_consume( 93 ticket->op = GNUNET_RECLAIM_ticket_consume(
94 ticket->handle->reclaim, 94 ticket->handle->reclaim,
95 &(ticket->ticket), 95 &(ticket->ticket),
96 //rp_uri, 96 rp_uri,
97 cb_ticket_consume_attribute, 97 cb_ticket_consume_attribute,
98 ticket 98 ticket
99 ); 99 );
diff --git a/tests/test_gnunet_chat_attribute.c b/tests/test_gnunet_chat_attribute.c
index 4ee42f8..8cd350e 100644
--- a/tests/test_gnunet_chat_attribute.c
+++ b/tests/test_gnunet_chat_attribute.c
@@ -295,26 +295,23 @@ on_gnunet_chat_attribute_share_msg(void *cls,
295 ck_assert_ptr_null(context); 295 ck_assert_ptr_null(context);
296 break; 296 break;
297 case GNUNET_CHAT_KIND_SHARED_ATTRIBUTES: 297 case GNUNET_CHAT_KIND_SHARED_ATTRIBUTES:
298 ck_assert_ptr_nonnull(context);
299 ck_assert_ptr_nonnull(sender);
300
301 if (GNUNET_YES != GNUNET_CHAT_message_is_sent(message)) 298 if (GNUNET_YES != GNUNET_CHAT_message_is_sent(message))
302 { 299 {
303 printf("exit?\n"); 300 printf("exit?\n");
304 301
305 GNUNET_CHAT_disconnect(handle); 302 GNUNET_CHAT_disconnect(handle);
306 break;
307 } 303 }
308 304 else
309 printf("list attributes?\n"); 305 {
310 306 printf("list attributes?\n");
311 GNUNET_CHAT_get_shared_attributes( 307
312 handle, 308 GNUNET_CHAT_get_shared_attributes(
313 GNUNET_CHAT_message_get_recipient(message), 309 handle,
314 on_gnunet_chat_attribute_share_attr, 310 GNUNET_CHAT_message_get_recipient(message),
315 handle 311 on_gnunet_chat_attribute_share_attr,
316 ); 312 handle
317 313 );
314 }
318 break; 315 break;
319 default: 316 default:
320 ck_abort_msg("%d\n", GNUNET_CHAT_message_get_kind(message)); 317 ck_abort_msg("%d\n", GNUNET_CHAT_message_get_kind(message));