fix sequencing of internal liveliness monitoring and rtps init/term
liveliness monitoring requires rtps stack initialised if initially deaf, so starting the monitoring thread must happen after rtps_init Signed-off-by: Erik Boasson <eb@ilities.com>
This commit is contained in:
parent
9cab5e769c
commit
259e4676dc
4 changed files with 23 additions and 11 deletions
|
@ -20,6 +20,7 @@ struct nn_servicelease;
|
|||
|
||||
struct nn_servicelease *nn_servicelease_new (void (*renew_cb) (void *arg), void *renew_arg);
|
||||
int nn_servicelease_start_renewing (struct nn_servicelease *sl);
|
||||
void nn_servicelease_stop_renewing (struct nn_servicelease *sl);
|
||||
void nn_servicelease_free (struct nn_servicelease *sl);
|
||||
void nn_servicelease_statechange_barrier (struct nn_servicelease *sl);
|
||||
|
||||
|
|
|
@ -478,7 +478,7 @@ static bool serdata_default_topicless_to_sample_cdr (const struct ddsi_sertopic
|
|||
|
||||
static bool serdata_default_topicless_to_sample_cdr_nokey (const struct ddsi_sertopic *topic, const struct ddsi_serdata *serdata_common, void *sample, void **bufptr, void *buflim)
|
||||
{
|
||||
(void)topic; (void)sample; (void)bufptr; (void)buflim;
|
||||
(void)topic; (void)sample; (void)bufptr; (void)buflim; (void)serdata_common;
|
||||
assert (serdata_common->topic == NULL);
|
||||
assert (serdata_common->kind == SDK_KEY);
|
||||
return true;
|
||||
|
|
|
@ -230,7 +230,7 @@ void nn_servicelease_statechange_barrier (struct nn_servicelease *sl)
|
|||
os_mutexUnlock (&sl->lock);
|
||||
}
|
||||
|
||||
void nn_servicelease_free (struct nn_servicelease *sl)
|
||||
void nn_servicelease_stop_renewing (struct nn_servicelease *sl)
|
||||
{
|
||||
if (sl->keepgoing != -1)
|
||||
{
|
||||
|
@ -240,6 +240,10 @@ void nn_servicelease_free (struct nn_servicelease *sl)
|
|||
os_mutexUnlock (&sl->lock);
|
||||
join_thread (sl->ts);
|
||||
}
|
||||
}
|
||||
|
||||
void nn_servicelease_free (struct nn_servicelease *sl)
|
||||
{
|
||||
os_condDestroy (&sl->cond);
|
||||
os_mutexDestroy (&sl->lock);
|
||||
os_free (sl->av_ary);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue