diff --git a/src/examples/roundtrip/ping.c b/src/examples/roundtrip/ping.c index ed72aca..5e13188 100644 --- a/src/examples/roundtrip/ping.c +++ b/src/examples/roundtrip/ping.c @@ -13,7 +13,7 @@ /* Forward declaration */ static dds_entity_t prepare_dds(dds_entity_t *writer, dds_entity_t *reader, dds_entity_t *readCond, dds_listener_t *listener); -static void finalize_dds(dds_entity_t participant, dds_entity_t reader, dds_entity_t readCond); +static void finalize_dds(dds_entity_t participant); typedef struct ExampleTimeStats { @@ -402,7 +402,7 @@ done: sigaction (SIGINT, &oldAction, 0); #endif - finalize_dds(participant, reader, readCond); + finalize_dds(participant); /* Clean up */ exampleDeleteTimeStats (&roundTrip); @@ -484,19 +484,9 @@ static dds_entity_t prepare_dds(dds_entity_t *wr, dds_entity_t *rd, dds_entity_t return participant; } -static void finalize_dds(dds_entity_t ppant, dds_entity_t rd, dds_entity_t rdcond) +static void finalize_dds(dds_entity_t ppant) { dds_return_t status; - - /* Disable callbacks */ - dds_set_enabled_status (rd, 0); - - (void) dds_waitset_detach (waitSet, rdcond); - status = dds_waitset_detach (waitSet, waitSet); - DDS_ERR_CHECK (status, DDS_CHECK_REPORT | DDS_CHECK_EXIT); - (void) dds_delete (rdcond); - status = dds_delete (waitSet); - DDS_ERR_CHECK (status, DDS_CHECK_REPORT | DDS_CHECK_EXIT); status = dds_delete (ppant); DDS_ERR_CHECK (status, DDS_CHECK_REPORT | DDS_CHECK_EXIT); } diff --git a/src/examples/roundtrip/pong.c b/src/examples/roundtrip/pong.c index ae29f0e..743add0 100644 --- a/src/examples/roundtrip/pong.c +++ b/src/examples/roundtrip/pong.c @@ -11,7 +11,7 @@ static dds_entity_t waitSet; /* Forward declarations */ static dds_entity_t prepare_dds(dds_entity_t *writer, dds_entity_t *reader, dds_entity_t *readCond, dds_listener_t *listener); -static void finalize_dds(dds_entity_t participant, dds_entity_t readCond, RoundTripModule_DataType data[MAX_SAMPLES]); +static void finalize_dds(dds_entity_t participant, RoundTripModule_DataType data[MAX_SAMPLES]); #ifdef _WIN32 #include @@ -131,23 +131,16 @@ int main (int argc, char *argv[]) #endif /* Clean up */ - finalize_dds(participant, readCond, data); + finalize_dds(participant, data); return EXIT_SUCCESS; } -static void finalize_dds(dds_entity_t participant, dds_entity_t readCond, RoundTripModule_DataType data[MAX_SAMPLES]) +static void finalize_dds(dds_entity_t participant, RoundTripModule_DataType data[MAX_SAMPLES]) { dds_return_t status; - (void)dds_waitset_detach (waitSet, readCond); - status = dds_waitset_detach (waitSet, waitSet); - DDS_ERR_CHECK (status, DDS_CHECK_REPORT | DDS_CHECK_EXIT); - (void)dds_delete (readCond); - status = dds_delete (waitSet); - DDS_ERR_CHECK (status, DDS_CHECK_REPORT | DDS_CHECK_EXIT); status = dds_delete (participant); DDS_ERR_CHECK (status, DDS_CHECK_REPORT | DDS_CHECK_EXIT); - for (unsigned int i = 0; i < MAX_SAMPLES; i++) { RoundTripModule_DataType_free (&data[i], DDS_FREE_CONTENTS);