@@ -55,20 +55,20 @@ constexpr udpard_mem_deleter_t tx_payload_deleter{ .user = nullptr, .free = &tx_
5555
5656struct FeedbackState
5757{
58- size_t count = 0 ;
59- bool success = false ;
60- uint64_t topic_hash = 0 ;
61- uint64_t transfer_id = 0 ;
58+ size_t count = 0 ;
59+ uint32_t acknowledgements = 0 ;
60+ uint64_t topic_hash = 0 ;
61+ uint64_t transfer_id = 0 ;
6262};
6363
6464void record_feedback (udpard_tx_t *, const udpard_tx_feedback_t fb)
6565{
6666 auto * st = static_cast <FeedbackState*>(fb.user .ptr [0 ]);
6767 if (st != nullptr ) {
6868 st->count ++;
69- st->success = fb.success ;
70- st->topic_hash = fb.topic_hash ;
71- st->transfer_id = fb.transfer_id ;
69+ st->acknowledgements = fb.acknowledgements ;
70+ st->topic_hash = fb.topic_hash ;
71+ st->transfer_id = fb.transfer_id ;
7272 }
7373}
7474
@@ -353,7 +353,7 @@ void test_topic_with_p2p_response()
353353 now += 100 ;
354354 udpard_tx_poll (&a_tx, now, UDPARD_IFACE_MASK_ALL);
355355 TEST_ASSERT_EQUAL_size_t (1 , a_topic_fb.count );
356- TEST_ASSERT_TRUE ( a_topic_fb.success );
356+ TEST_ASSERT_EQUAL_UINT32 ( 1 , a_topic_fb.acknowledgements );
357357 TEST_ASSERT_EQUAL_UINT64 (topic_hash, a_topic_fb.topic_hash );
358358 TEST_ASSERT_EQUAL_UINT64 (transfer_id, a_topic_fb.transfer_id );
359359
@@ -426,7 +426,7 @@ void test_topic_with_p2p_response()
426426 now += 100 ;
427427 udpard_tx_poll (&b_tx, now, UDPARD_IFACE_MASK_ALL);
428428 TEST_ASSERT_EQUAL_size_t (1 , b_response_fb.count );
429- TEST_ASSERT_TRUE ( b_response_fb.success );
429+ TEST_ASSERT_EQUAL_UINT32 ( 1 , b_response_fb.acknowledgements );
430430 TEST_ASSERT_EQUAL_UINT64 (topic_hash, b_response_fb.topic_hash );
431431 TEST_ASSERT_EQUAL_UINT64 (transfer_id, b_response_fb.transfer_id );
432432
@@ -725,10 +725,10 @@ void test_topic_with_p2p_response_under_loss()
725725 TEST_ASSERT_TRUE (first_resp_ack_dropped);
726726
727727 TEST_ASSERT_EQUAL_size_t (1 , a_topic_fb.count );
728- TEST_ASSERT_TRUE ( a_topic_fb.success );
728+ TEST_ASSERT_EQUAL_UINT32 ( 1 , a_topic_fb.acknowledgements );
729729
730730 TEST_ASSERT_EQUAL_size_t (1 , b_response_fb.count );
731- TEST_ASSERT_TRUE ( b_response_fb.success );
731+ TEST_ASSERT_EQUAL_UINT32 ( 1 , b_response_fb.acknowledgements );
732732 TEST_ASSERT_EQUAL_UINT64 (topic_hash, b_response_fb.topic_hash );
733733 TEST_ASSERT_EQUAL_UINT64 (transfer_id, b_response_fb.transfer_id );
734734
0 commit comments