Remove unused "durability service" global variables
Signed-off-by: Erik Boasson <eb@ilities.com>
This commit is contained in:
parent
2e9ce9b4c1
commit
16f1df74f1
5 changed files with 1 additions and 32 deletions
|
@ -203,8 +203,6 @@ typedef struct dds_publisher {
|
|||
|
||||
typedef struct dds_participant {
|
||||
struct dds_entity m_entity;
|
||||
struct dds_entity * m_dur_reader;
|
||||
struct dds_entity * m_dur_writer;
|
||||
dds_entity_t m_builtin_subscriber;
|
||||
} dds_participant;
|
||||
|
||||
|
@ -299,10 +297,6 @@ typedef struct dds_waitset {
|
|||
typedef struct dds_globals {
|
||||
dds_domainid_t m_default_domain;
|
||||
int32_t m_init_count;
|
||||
void (*m_dur_reader) (struct dds_reader * reader, struct rhc * rhc);
|
||||
int (*m_dur_wait) (struct dds_reader * reader, dds_duration_t timeout);
|
||||
void (*m_dur_init) (void);
|
||||
void (*m_dur_fini) (void);
|
||||
ddsrt_avl_tree_t m_domains;
|
||||
ddsrt_mutex_t m_mutex;
|
||||
} dds_globals;
|
||||
|
|
|
@ -252,22 +252,8 @@ extern void dds_fini (void)
|
|||
ddsrt_fini();
|
||||
}
|
||||
|
||||
static int dds__init_plugin (void)
|
||||
{
|
||||
if (dds_global.m_dur_init) (dds_global.m_dur_init) ();
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void dds__fini_plugin (void)
|
||||
{
|
||||
if (dds_global.m_dur_fini) (dds_global.m_dur_fini) ();
|
||||
}
|
||||
|
||||
void ddsi_plugin_init (void)
|
||||
{
|
||||
ddsi_plugin.init_fn = dds__init_plugin;
|
||||
ddsi_plugin.fini_fn = dds__fini_plugin;
|
||||
|
||||
ddsi_plugin.builtintopic_is_builtintopic = dds__builtin_is_builtintopic;
|
||||
ddsi_plugin.builtintopic_is_visible = dds__builtin_is_visible;
|
||||
ddsi_plugin.builtintopic_get_tkmap_entry = dds__builtin_get_tkmap_entry;
|
||||
|
|
|
@ -402,10 +402,6 @@ dds_entity_t dds_create_reader (dds_entity_t participant_or_subscriber, dds_enti
|
|||
rd->m_entity.m_iid = get_entity_instance_id (&rd->m_entity.m_guid);
|
||||
dds_entity_register_child (&sub->m_entity, &rd->m_entity);
|
||||
|
||||
/* For persistent data register reader with durability */
|
||||
if (dds_global.m_dur_reader && (rd->m_entity.m_qos->durability.kind > DDS_DURABILITY_TRANSIENT_LOCAL)) {
|
||||
(dds_global.m_dur_reader) (rd, &rd->m_rhc->common.rhc);
|
||||
}
|
||||
dds_topic_unlock (tp);
|
||||
dds_subscriber_unlock (sub);
|
||||
|
||||
|
@ -493,6 +489,7 @@ dds_return_t dds_reader_wait_for_historical_data (dds_entity_t reader, dds_durat
|
|||
{
|
||||
dds_reader *rd;
|
||||
dds_return_t ret;
|
||||
(void) max_wait;
|
||||
if ((ret = dds_reader_lock (reader, &rd)) != DDS_RETCODE_OK)
|
||||
return ret;
|
||||
switch (rd->m_entity.m_qos->durability.kind)
|
||||
|
@ -504,7 +501,6 @@ dds_return_t dds_reader_wait_for_historical_data (dds_entity_t reader, dds_durat
|
|||
break;
|
||||
case DDS_DURABILITY_TRANSIENT:
|
||||
case DDS_DURABILITY_PERSISTENT:
|
||||
ret = (dds_global.m_dur_wait) (rd, max_wait);
|
||||
break;
|
||||
}
|
||||
dds_reader_unlock(rd);
|
||||
|
|
|
@ -396,9 +396,6 @@ struct ddsi_sertopic;
|
|||
struct entity_common;
|
||||
struct ddsi_plugin
|
||||
{
|
||||
int (*init_fn) (void);
|
||||
void (*fini_fn) (void);
|
||||
|
||||
bool (*builtintopic_is_builtintopic) (const struct ddsi_sertopic *topic);
|
||||
bool (*builtintopic_is_visible) (const nn_guid_t *guid, nn_vendorid_t vendorid);
|
||||
struct ddsi_tkmap_instance * (*builtintopic_get_tkmap_entry) (const struct nn_guid *guid);
|
||||
|
|
|
@ -1001,8 +1001,6 @@ int rtps_init (void)
|
|||
}
|
||||
#endif
|
||||
|
||||
(ddsi_plugin.init_fn) ();
|
||||
|
||||
gv.xmsgpool = nn_xmsgpool_new ();
|
||||
gv.serpool = ddsi_serdatapool_new ();
|
||||
|
||||
|
@ -1330,7 +1328,6 @@ err_unicast_sockets:
|
|||
ddsi_serdatapool_free (gv.serpool);
|
||||
nn_xmsgpool_free (gv.xmsgpool);
|
||||
ddsi_iid_fini ();
|
||||
(ddsi_plugin.fini_fn) ();
|
||||
#ifdef DDSI_INCLUDE_NETWORK_PARTITIONS
|
||||
err_network_partition_addrset:
|
||||
for (struct config_networkpartition_listelem *np = config.networkPartitions; np; np = np->next)
|
||||
|
@ -1678,6 +1675,5 @@ void rtps_fini (void)
|
|||
ddsi_serdatapool_free (gv.serpool);
|
||||
nn_xmsgpool_free (gv.xmsgpool);
|
||||
ddsi_iid_fini ();
|
||||
(ddsi_plugin.fini_fn) ();
|
||||
DDS_LOG(DDS_LC_CONFIG, "Finis.\n");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue