MCPO::leaveGroup modification

7 views
Skip to first unread message

Jean-Baptiste

unread,
Mar 19, 2012, 12:55:51 PM3/19/12
to SpoVNet
Hi SpoVNet team,

In the MCPO.cpp file, in the leaveGroup function, we have:

//Check if member of that group
std::vector< ServiceID >::iterator it;

for (it = ownGroups.begin(); it != ownGroups.end(); it++) {

if ( *it == groupID ) {
ownGroups.erase(it);
logging_debug( "left group: " << groupID.toString() );
}

}

I think that a break; should be added after the logging_debug. If not,
you will modify the ownGroups vector used by iterator it and the
application freezes.

Regards,
JB

omn...@mario.n-ten.de

unread,
Mar 20, 2012, 5:30:04 AM3/20/12
to SpoVNet
Hi Jean-Baptiste.

Indeed, thank you for your report and fix.

I just added the "break;" in the trunk. Can you please check whether
your problem is solved now?

Thank you, Mario

Jean-Baptiste

unread,
Mar 22, 2012, 4:52:13 AM3/22/12
to SpoVNet
Hi Mario,

Yes I added the break; in the code too and it solved my problem.

Cheers,
JB

On Mar 20, 10:30 am, "omni...@mario.n-ten.de" <omni...@mario.n-ten.de>
wrote:
Reply all
Reply to author
Forward
0 new messages