Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refs:#5068 Bugfix/callback issue #480

Merged
merged 6 commits into from
Apr 30, 2019
Merged

Refs:#5068 Bugfix/callback issue #480

merged 6 commits into from
Apr 30, 2019

Conversation

MiguelBarro
Copy link
Contributor

The ParticipantImpl::~ParticipantImpl() must be modified to prevent a discovery callback error.

As implementation currently works the Participant object pass as argument to the callbacks is destroyed before this callbacks are cutoff. Callbacks are cutoff in the RTPSDomain::removeRTPSParticipant so the Participant object pass as argument should at least be alive till this call returns. The file src/cpp/participant/ParticipantImpl.cpp should be modified by reordering:

		// delete(mp_participant); // former position

		if(this->mp_rtpsParticipant != nullptr)
		{
			RTPSDomain::removeRTPSParticipant(this->mp_rtpsParticipant);
		}

		delete(mp_participant); // new position

Miguel Barro Otero added 4 commits February 25, 2019 07:36
… discovery callback error.

As implementation currently works the Participant object pass as argument to the callbacks is destroyed before this callbacks are cutoff. Callbacks are cutoff in the RTPSDomain::removeRTPSParticipant so the Participant object pass as argument should at least be alive till this call returns. The file src/cpp/participant/ParticipantImpl.cpp should be modified by reordering:

	// delete(mp_participant); // former position

	if(this->mp_rtpsParticipant != nullptr)
	{
		RTPSDomain::removeRTPSParticipant(this->mp_rtpsParticipant);
	}

	delete(mp_participant); // new position
@MiguelBarro MiguelBarro self-assigned this Apr 8, 2019
@MiguelBarro MiguelBarro changed the title Bugfix/callback issue Refs:#5068 Bugfix/callback issue Apr 8, 2019
Miguel Barro Otero and others added 2 commits April 8, 2019 10:28
…cause the associated discovery CacheChange was twice removed from PDP History
Copy link
Member

@MiguelCompany MiguelCompany left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 👍

@richiware
Copy link
Member

Build status:

  • Linux Build Status
  • Mac Build Status
  • Windows Build Status

@richiware richiware merged commit 1d77408 into develop Apr 30, 2019
@richiware richiware deleted the bugfix/callback_issue branch April 30, 2019 11:48
@richiware
Copy link
Member

Failed tests not related.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants