Fix dds_sample_info.publication_handle incorrectly set to 1 as well as some corner cases where it ended up at 0 and some related assertion failures (#8)
Signed-off-by: Erik Boasson <eb@ilities.com>
This commit is contained in:
parent
79ec9e1cd4
commit
daa17704db
24 changed files with 343 additions and 385 deletions
|
@ -18,6 +18,7 @@ PREPEND(srcs_ddsi "${CMAKE_CURRENT_LIST_DIR}/src"
|
|||
ddsi_raweth.c
|
||||
ddsi_ipaddr.c
|
||||
ddsi_mcgroup.c
|
||||
ddsi_rhc_plugin.c
|
||||
q_addrset.c
|
||||
q_bitset_inlines.c
|
||||
q_bswap.c
|
||||
|
@ -67,6 +68,7 @@ PREPEND(hdrs_private_ddsi "${CMAKE_CURRENT_LIST_DIR}/include/ddsi"
|
|||
ddsi_raweth.h
|
||||
ddsi_ipaddr.h
|
||||
ddsi_mcgroup.h
|
||||
ddsi_rhc_plugin.h
|
||||
probes-constants.h
|
||||
q_addrset.h
|
||||
q_align.h
|
||||
|
|
48
src/core/ddsi/include/ddsi/ddsi_rhc_plugin.h
Normal file
48
src/core/ddsi/include/ddsi/ddsi_rhc_plugin.h
Normal file
|
@ -0,0 +1,48 @@
|
|||
/*
|
||||
* Copyright(c) 2006 to 2018 ADLINK Technology Limited and others
|
||||
*
|
||||
* This program and the accompanying materials are made available under the
|
||||
* terms of the Eclipse Public License v. 2.0 which is available at
|
||||
* http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
|
||||
* v. 1.0 which is available at
|
||||
* http://www.eclipse.org/org/documents/edl-v10.php.
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
|
||||
*/
|
||||
#ifndef DDSI_RHC_PLUGIN_H
|
||||
#define DDSI_RHC_PLUGIN_H
|
||||
|
||||
struct rhc;
|
||||
struct nn_xqos;
|
||||
struct tkmap_instance;
|
||||
struct serdata;
|
||||
struct sertopic;
|
||||
struct entity_common;
|
||||
|
||||
struct proxy_writer_info
|
||||
{
|
||||
nn_guid_t guid;
|
||||
bool auto_dispose;
|
||||
int32_t ownership_strength;
|
||||
uint64_t iid;
|
||||
};
|
||||
|
||||
struct ddsi_rhc_plugin
|
||||
{
|
||||
void (*rhc_free_fn) (struct rhc *rhc);
|
||||
void (*rhc_fini_fn) (struct rhc *rhc);
|
||||
bool (*rhc_store_fn)
|
||||
(struct rhc * __restrict rhc, const struct proxy_writer_info * __restrict pwr_info,
|
||||
struct serdata * __restrict sample, struct tkmap_instance * __restrict tk);
|
||||
void (*rhc_unregister_wr_fn)
|
||||
(struct rhc * __restrict rhc, const struct proxy_writer_info * __restrict pwr_info);
|
||||
void (*rhc_relinquish_ownership_fn)
|
||||
(struct rhc * __restrict rhc, const uint64_t wr_iid);
|
||||
void (*rhc_set_qos_fn) (struct rhc * rhc, const struct nn_xqos * qos);
|
||||
struct tkmap_instance * (*rhc_lookup_fn) (struct serdata *serdata);
|
||||
void (*rhc_unref_fn) (struct tkmap_instance *tk);
|
||||
};
|
||||
|
||||
void make_proxy_writer_info(struct proxy_writer_info *pwr_info, const struct entity_common *e, const struct nn_xqos *xqos);
|
||||
|
||||
#endif
|
|
@ -100,7 +100,7 @@ struct serdata_base
|
|||
serstate_t st; /* back pointer to (opaque) serstate so RTPS impl only needs serdata */
|
||||
struct serdata_msginfo msginfo;
|
||||
int hash_valid; /* whether hash is valid or must be computed from key/data */
|
||||
uint32_t hash; /* cached serdata hash, valid only if hash_valid != 0 */
|
||||
uint32_t hash; /* cached serdata hash, valid only if hash_valid != 0 */
|
||||
dds_key_hash_t keyhash;
|
||||
bool bswap; /* Whether state is native endian or requires swapping */
|
||||
};
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include "ddsi/q_xqos.h"
|
||||
#include "ddsi/ddsi_tran.h"
|
||||
#include "ddsi/q_feature_check.h"
|
||||
#include "ddsi/ddsi_rhc_plugin.h"
|
||||
|
||||
#if defined (__cplusplus)
|
||||
extern "C" {
|
||||
|
@ -404,35 +405,13 @@ struct config
|
|||
q__schedPrioClass watchdog_sched_priority_class;
|
||||
};
|
||||
|
||||
struct rhc;
|
||||
struct nn_xqos;
|
||||
struct tkmap_instance;
|
||||
struct nn_rsample_info;
|
||||
struct serdata;
|
||||
struct sertopic;
|
||||
struct proxy_writer;
|
||||
struct proxy_writer_info;
|
||||
|
||||
struct ddsi_plugin
|
||||
{
|
||||
int (*init_fn) (void);
|
||||
void (*fini_fn) (void);
|
||||
|
||||
|
||||
/* Read cache */
|
||||
|
||||
void (*rhc_free_fn) (struct rhc *rhc);
|
||||
void (*rhc_fini_fn) (struct rhc *rhc);
|
||||
bool (*rhc_store_fn)
|
||||
(struct rhc * __restrict rhc, const struct nn_rsample_info * __restrict sampleinfo,
|
||||
struct serdata * __restrict sample, struct tkmap_instance * __restrict tk);
|
||||
void (*rhc_unregister_wr_fn)
|
||||
(struct rhc * __restrict rhc, const struct proxy_writer_info * __restrict pwr_info);
|
||||
void (*rhc_relinquish_ownership_fn)
|
||||
(struct rhc * __restrict rhc, const uint64_t wr_iid);
|
||||
void (*rhc_set_qos_fn) (struct rhc * rhc, const struct nn_xqos * qos);
|
||||
struct tkmap_instance * (*rhc_lookup_fn) (struct serdata *serdata);
|
||||
void (*rhc_unref_fn) (struct tkmap_instance *tk);
|
||||
struct ddsi_rhc_plugin rhc_plugin;
|
||||
|
||||
/* IID generator */
|
||||
|
||||
|
|
|
@ -109,14 +109,6 @@ struct receiver_state {
|
|||
nn_locator_t srcloc;
|
||||
};
|
||||
|
||||
struct proxy_writer_info
|
||||
{
|
||||
nn_guid_t guid;
|
||||
bool auto_dispose;
|
||||
int32_t ownership_strength;
|
||||
uint64_t iid;
|
||||
};
|
||||
|
||||
struct nn_rsample_info {
|
||||
seqno_t seq;
|
||||
struct receiver_state *rst;
|
||||
|
@ -129,9 +121,6 @@ struct nn_rsample_info {
|
|||
unsigned pt_wr_info_zoff: 16; /* PrismTech writer info offset */
|
||||
unsigned bswap: 1; /* so we can extract well formatted writer info quicker */
|
||||
unsigned complex_qos: 1; /* includes QoS other than keyhash, 2-bit statusinfo, PT writer info */
|
||||
unsigned hashash: 1; /* Do we have a key hash */
|
||||
nn_keyhash_t keyhash; /* Key hash. Not currently used by OSPL */
|
||||
struct proxy_writer_info pwr_info;
|
||||
};
|
||||
|
||||
struct nn_rdata {
|
||||
|
|
22
src/core/ddsi/src/ddsi_rhc_plugin.c
Normal file
22
src/core/ddsi/src/ddsi_rhc_plugin.c
Normal file
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
* Copyright(c) 2006 to 2018 ADLINK Technology Limited and others
|
||||
*
|
||||
* This program and the accompanying materials are made available under the
|
||||
* terms of the Eclipse Public License v. 2.0 which is available at
|
||||
* http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
|
||||
* v. 1.0 which is available at
|
||||
* http://www.eclipse.org/org/documents/edl-v10.php.
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
|
||||
*/
|
||||
#include "ddsi/q_entity.h"
|
||||
#include "ddsi/q_xqos.h"
|
||||
#include "ddsi/ddsi_rhc_plugin.h"
|
||||
|
||||
void make_proxy_writer_info(struct proxy_writer_info *pwr_info, const struct entity_common *e, const struct nn_xqos *xqos)
|
||||
{
|
||||
pwr_info->guid = e->guid;
|
||||
pwr_info->ownership_strength = xqos->ownership_strength.value;
|
||||
pwr_info->auto_dispose = xqos->writer_data_lifecycle.autodispose_unregistered_instances;
|
||||
pwr_info->iid = e->iid;
|
||||
}
|
|
@ -1379,12 +1379,8 @@ static void reader_drop_connection (const struct nn_guid *rd_guid, const struct
|
|||
if (rd->rhc)
|
||||
{
|
||||
struct proxy_writer_info pwr_info;
|
||||
pwr_info.guid = pwr->e.guid;
|
||||
pwr_info.ownership_strength = pwr->c.xqos->ownership_strength.value;
|
||||
pwr_info.auto_dispose = pwr->c.xqos->writer_data_lifecycle.autodispose_unregistered_instances;
|
||||
pwr_info.iid = pwr->e.iid;
|
||||
|
||||
(ddsi_plugin.rhc_unregister_wr_fn) (rd->rhc, &pwr_info);
|
||||
make_proxy_writer_info(&pwr_info, &pwr->e, pwr->c.xqos);
|
||||
(ddsi_plugin.rhc_plugin.rhc_unregister_wr_fn) (rd->rhc, &pwr_info);
|
||||
}
|
||||
if (rd->status_cb)
|
||||
{
|
||||
|
@ -1418,12 +1414,8 @@ static void reader_drop_local_connection (const struct nn_guid *rd_guid, const s
|
|||
{
|
||||
/* FIXME: */
|
||||
struct proxy_writer_info pwr_info;
|
||||
pwr_info.guid = wr->e.guid;
|
||||
pwr_info.ownership_strength = wr->xqos->ownership_strength.value;
|
||||
pwr_info.auto_dispose = wr->xqos->writer_data_lifecycle.autodispose_unregistered_instances;
|
||||
pwr_info.iid = wr->e.iid;
|
||||
|
||||
(ddsi_plugin.rhc_unregister_wr_fn) (rd->rhc, &pwr_info);
|
||||
make_proxy_writer_info(&pwr_info, &wr->e, wr->xqos);
|
||||
(ddsi_plugin.rhc_plugin.rhc_unregister_wr_fn) (rd->rhc, &pwr_info);
|
||||
}
|
||||
if (rd->status_cb)
|
||||
{
|
||||
|
@ -1605,26 +1597,6 @@ static void writer_add_connection (struct writer *wr, struct proxy_reader *prd)
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
init_sampleinfo(
|
||||
_Out_ struct nn_rsample_info *sampleinfo,
|
||||
_In_ struct writer *wr,
|
||||
_In_ int64_t seq,
|
||||
_In_ serdata_t payload)
|
||||
{
|
||||
memset(sampleinfo, 0, sizeof(*sampleinfo));
|
||||
sampleinfo->bswap = 0;
|
||||
sampleinfo->complex_qos = 0;
|
||||
sampleinfo->hashash = 0;
|
||||
sampleinfo->seq = seq;
|
||||
sampleinfo->reception_timestamp = payload->v.msginfo.timestamp;
|
||||
sampleinfo->statusinfo = payload->v.msginfo.statusinfo;
|
||||
sampleinfo->pwr_info.iid = 1;
|
||||
sampleinfo->pwr_info.auto_dispose = 0;
|
||||
sampleinfo->pwr_info.guid = wr->e.guid;
|
||||
sampleinfo->pwr_info.ownership_strength = 0;
|
||||
}
|
||||
|
||||
static void writer_add_local_connection (struct writer *wr, struct reader *rd)
|
||||
{
|
||||
struct wr_rd_match *m = os_malloc (sizeof (*m));
|
||||
|
@ -1652,11 +1624,11 @@ static void writer_add_local_connection (struct writer *wr, struct reader *rd)
|
|||
struct whc_node *n;
|
||||
while ((n = whc_next_node(wr->whc, seq)) != NULL)
|
||||
{
|
||||
struct nn_rsample_info sampleinfo;
|
||||
struct proxy_writer_info pwr_info;
|
||||
serdata_t payload = n->serdata;
|
||||
struct tkmap_instance *tk = (ddsi_plugin.rhc_lookup_fn) (payload);
|
||||
init_sampleinfo(&sampleinfo, wr, n->seq, payload);
|
||||
(void)(ddsi_plugin.rhc_store_fn) (rd->rhc, &sampleinfo, payload, tk);
|
||||
struct tkmap_instance *tk = (ddsi_plugin.rhc_plugin.rhc_lookup_fn) (payload);
|
||||
make_proxy_writer_info(&pwr_info, &wr->e, wr->xqos);
|
||||
(void)(ddsi_plugin.rhc_plugin.rhc_store_fn) (rd->rhc, &pwr_info, payload, tk);
|
||||
seq = n->seq;
|
||||
}
|
||||
}
|
||||
|
@ -3272,7 +3244,7 @@ static struct reader * new_reader_guid
|
|||
/* set rhc qos for reader */
|
||||
if (rhc)
|
||||
{
|
||||
(ddsi_plugin.rhc_set_qos_fn) (rd->rhc, rd->xqos);
|
||||
(ddsi_plugin.rhc_plugin.rhc_set_qos_fn) (rd->rhc, rd->xqos);
|
||||
}
|
||||
assert (rd->xqos->present & QP_LIVELINESS);
|
||||
if (rd->xqos->liveliness.kind != NN_AUTOMATIC_LIVELINESS_QOS ||
|
||||
|
@ -3402,7 +3374,7 @@ static void gc_delete_reader (struct gcreq *gcreq)
|
|||
#endif
|
||||
if (rd->rhc)
|
||||
{
|
||||
(ddsi_plugin.rhc_free_fn) (rd->rhc);
|
||||
(ddsi_plugin.rhc_plugin.rhc_free_fn) (rd->rhc);
|
||||
}
|
||||
if (rd->status_cb)
|
||||
{
|
||||
|
@ -3431,7 +3403,7 @@ int delete_reader (const struct nn_guid *guid)
|
|||
}
|
||||
if (rd->rhc)
|
||||
{
|
||||
(ddsi_plugin.rhc_fini_fn) (rd->rhc);
|
||||
(ddsi_plugin.rhc_plugin.rhc_fini_fn) (rd->rhc);
|
||||
}
|
||||
nn_log (LC_DISCOVERY, "delete_reader_guid(guid %x:%x:%x:%x) ...\n", PGUID (*guid));
|
||||
ephash_remove_reader_guid (rd);
|
||||
|
|
|
@ -3123,16 +3123,6 @@ unsigned char *nn_plist_quickscan (struct nn_rsample_info *dest, const struct nn
|
|||
{
|
||||
case PID_PAD:
|
||||
break;
|
||||
case PID_KEYHASH:
|
||||
if (length < sizeof (dest->keyhash))
|
||||
{
|
||||
TRACE (("plist(vendor %u.%u): quickscan(PID_KEYHASH): buffer too small\n",
|
||||
src->vendorid.id[0], src->vendorid.id[1]));
|
||||
return NULL;
|
||||
}
|
||||
memcpy (&dest->keyhash, pl, sizeof (dest->keyhash));
|
||||
dest->hashash = 1;
|
||||
break;
|
||||
case PID_STATUSINFO:
|
||||
if (length < 4)
|
||||
{
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#include "ddsi/q_md5.h"
|
||||
#include "util/ut_avl.h"
|
||||
#include "q__osplser.h"
|
||||
#include "dds__stream.h"
|
||||
#include "ddsi/q_protocol.h"
|
||||
#include "ddsi/q_rtps.h"
|
||||
#include "ddsi/q_misc.h"
|
||||
|
@ -320,13 +321,6 @@ static void set_sampleinfo_proxy_writer (struct nn_rsample_info *sampleinfo, nn_
|
|||
{
|
||||
struct proxy_writer * pwr = ephash_lookup_proxy_writer_guid (pwr_guid);
|
||||
sampleinfo->pwr = pwr;
|
||||
if (pwr)
|
||||
{
|
||||
sampleinfo->pwr_info.guid = pwr->e.guid;
|
||||
sampleinfo->pwr_info.ownership_strength = pwr->c.xqos->ownership_strength.value;
|
||||
sampleinfo->pwr_info.auto_dispose = pwr->c.xqos->writer_data_lifecycle.autodispose_unregistered_instances;
|
||||
sampleinfo->pwr_info.iid = pwr->e.iid;
|
||||
}
|
||||
}
|
||||
|
||||
static int valid_Data (const struct receiver_state *rst, struct nn_rmsg *rmsg, Data_t *msg, size_t size, int byteswap, struct nn_rsample_info *sampleinfo, unsigned char **payloadp)
|
||||
|
@ -1818,6 +1812,18 @@ static serstate_t make_raw_serstate
|
|||
return st;
|
||||
}
|
||||
|
||||
static serdata_t ddsi_serstate_fix_with_key (serstate_t st, const struct sertopic *topic, bool bswap)
|
||||
{
|
||||
serdata_t sample = ddsi_serstate_fix(st);
|
||||
dds_stream_t is;
|
||||
assert(sample->v.keyhash.m_flags == 0);
|
||||
sample->v.bswap = bswap;
|
||||
dds_stream_from_serstate (&is, sample->v.st);
|
||||
/* FIXME: the relationship between dds_topic, topic_descriptor and sertopic clearly needs some work */
|
||||
dds_stream_read_keyhash (&is, &sample->v.keyhash, topic->status_cb_entity->m_descriptor, sample->v.st->kind == STK_KEY);
|
||||
return sample;
|
||||
}
|
||||
|
||||
static serdata_t extract_sample_from_data
|
||||
(
|
||||
const struct nn_rsample_info *sampleinfo, unsigned char data_smhdr_flags,
|
||||
|
@ -1845,7 +1851,7 @@ static serdata_t extract_sample_from_data
|
|||
return NULL;
|
||||
}
|
||||
st = make_raw_serstate (topic, fragchain, sampleinfo->size, 0, statusinfo, tstamp);
|
||||
sample = ddsi_serstate_fix (st);
|
||||
sample = ddsi_serstate_fix_with_key (st, topic, sampleinfo->bswap);
|
||||
}
|
||||
else if (sampleinfo->size)
|
||||
{
|
||||
|
@ -1856,13 +1862,13 @@ static serdata_t extract_sample_from_data
|
|||
if (data_smhdr_flags & DATA_FLAG_KEYFLAG)
|
||||
{
|
||||
st = make_raw_serstate (topic, fragchain, sampleinfo->size, 1, statusinfo, tstamp);
|
||||
sample = ddsi_serstate_fix (st);
|
||||
sample = ddsi_serstate_fix_with_key (st, topic, sampleinfo->bswap);
|
||||
}
|
||||
else
|
||||
{
|
||||
assert (data_smhdr_flags & DATA_FLAG_DATAFLAG);
|
||||
st = make_raw_serstate (topic, fragchain, sampleinfo->size, 0, statusinfo, tstamp);
|
||||
sample = ddsi_serstate_fix (st);
|
||||
sample = ddsi_serstate_fix_with_key (st, topic, sampleinfo->bswap);
|
||||
}
|
||||
}
|
||||
else if (data_smhdr_flags & DATA_FLAG_INLINE_QOS)
|
||||
|
@ -1880,7 +1886,7 @@ static serdata_t extract_sample_from_data
|
|||
ddsi_serstate_set_msginfo (st, statusinfo, tstamp, NULL);
|
||||
st->kind = STK_KEY;
|
||||
ddsi_serstate_append_blob (st, 1, sizeof (qos->keyhash), qos->keyhash.value);
|
||||
sample = ddsi_serstate_fix (st);
|
||||
sample = ddsi_serstate_fix_with_key (st, topic, sampleinfo->bswap);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -1901,10 +1907,6 @@ static serdata_t extract_sample_from_data
|
|||
failmsg ? failmsg : "for reasons unknown"
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
sample->v.bswap = sampleinfo->bswap;
|
||||
}
|
||||
return sample;
|
||||
}
|
||||
|
||||
|
@ -2036,16 +2038,12 @@ static int deliver_user_data (const struct nn_rsample_info *sampleinfo, const st
|
|||
us */
|
||||
{
|
||||
struct tkmap_instance * tk;
|
||||
|
||||
if (sampleinfo->hashash)
|
||||
{
|
||||
payload->v.keyhash.m_flags = DDS_KEY_HASH_SET;
|
||||
memcpy (&payload->v.keyhash.m_hash, &sampleinfo->keyhash, sizeof (payload->v.keyhash.m_hash));
|
||||
}
|
||||
tk = (ddsi_plugin.rhc_lookup_fn) (payload);
|
||||
|
||||
tk = (ddsi_plugin.rhc_plugin.rhc_lookup_fn) (payload);
|
||||
if (tk)
|
||||
{
|
||||
struct proxy_writer_info pwr_info;
|
||||
make_proxy_writer_info(&pwr_info, &pwr->e, pwr->c.xqos);
|
||||
|
||||
if (rdguid == NULL)
|
||||
{
|
||||
TRACE ((" %"PRId64"=>EVERYONE\n", sampleinfo->seq));
|
||||
|
@ -2069,7 +2067,7 @@ retry:
|
|||
for (i = 0; rdary[i]; i++)
|
||||
{
|
||||
TRACE (("reader %x:%x:%x:%x\n", PGUID (rdary[i]->e.guid)));
|
||||
if (! (ddsi_plugin.rhc_store_fn) (rdary[i]->rhc, sampleinfo, payload, tk))
|
||||
if (! (ddsi_plugin.rhc_plugin.rhc_store_fn) (rdary[i]->rhc, &pwr_info, payload, tk))
|
||||
{
|
||||
if (pwr_locked) os_mutexUnlock (&pwr->e.lock);
|
||||
os_mutexUnlock (&pwr->rdary.rdary_lock);
|
||||
|
@ -2100,7 +2098,7 @@ retry:
|
|||
if ((rd = ephash_lookup_reader_guid (&m->rd_guid)) != NULL)
|
||||
{
|
||||
TRACE (("reader-via-guid %x:%x:%x:%x\n", PGUID (rd->e.guid)));
|
||||
(void) (ddsi_plugin.rhc_store_fn) (rd->rhc, sampleinfo, payload, tk);
|
||||
(void) (ddsi_plugin.rhc_plugin.rhc_store_fn) (rd->rhc, &pwr_info, payload, tk);
|
||||
}
|
||||
}
|
||||
if (!pwr_locked) os_mutexUnlock (&pwr->e.lock);
|
||||
|
@ -2112,14 +2110,14 @@ retry:
|
|||
{
|
||||
struct reader *rd = ephash_lookup_reader_guid (rdguid);;
|
||||
TRACE ((" %"PRId64"=>%x:%x:%x:%x%s\n", sampleinfo->seq, PGUID (*rdguid), rd ? "" : "?"));
|
||||
while (rd && ! (ddsi_plugin.rhc_store_fn) (rd->rhc, sampleinfo, payload, tk) && ephash_lookup_proxy_writer_guid (&pwr->e.guid))
|
||||
while (rd && ! (ddsi_plugin.rhc_plugin.rhc_store_fn) (rd->rhc, &pwr_info, payload, tk) && ephash_lookup_proxy_writer_guid (&pwr->e.guid))
|
||||
{
|
||||
if (pwr_locked) os_mutexUnlock (&pwr->e.lock);
|
||||
dds_sleepfor (DDS_MSECS (1));
|
||||
if (pwr_locked) os_mutexLock (&pwr->e.lock);
|
||||
}
|
||||
}
|
||||
(ddsi_plugin.rhc_unref_fn) (tk);
|
||||
(ddsi_plugin.rhc_plugin.rhc_unref_fn) (tk);
|
||||
}
|
||||
}
|
||||
ddsi_serdata_unref (payload);
|
||||
|
@ -2837,7 +2835,6 @@ static int handle_submsg_sequence
|
|||
{
|
||||
struct nn_rsample_info sampleinfo;
|
||||
unsigned char *datap;
|
||||
sampleinfo.hashash = 0;
|
||||
/* valid_DataFrag does not validate the payload */
|
||||
if (!valid_DataFrag (rst, rmsg, &sm->datafrag, submsg_size, byteswap, &sampleinfo, &datap))
|
||||
goto malformed;
|
||||
|
@ -2853,7 +2850,6 @@ static int handle_submsg_sequence
|
|||
{
|
||||
struct nn_rsample_info sampleinfo;
|
||||
unsigned char *datap;
|
||||
sampleinfo.hashash = 0;
|
||||
/* valid_Data does not validate the payload */
|
||||
if (!valid_Data (rst, rmsg, &sm->data, submsg_size, byteswap, &sampleinfo, &datap))
|
||||
{
|
||||
|
|
|
@ -1138,9 +1138,9 @@ int write_sample_gc_notk (struct nn_xpack *xp, struct writer *wr, serdata_t serd
|
|||
{
|
||||
struct tkmap_instance *tk;
|
||||
int res;
|
||||
tk = (ddsi_plugin.rhc_lookup_fn) (serdata);
|
||||
tk = (ddsi_plugin.rhc_plugin.rhc_lookup_fn) (serdata);
|
||||
res = write_sample_eot (xp, wr, NULL, serdata, tk, 0, 1);
|
||||
(ddsi_plugin.rhc_unref_fn) (tk);
|
||||
(ddsi_plugin.rhc_plugin.rhc_unref_fn) (tk);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -1148,9 +1148,9 @@ int write_sample_nogc_notk (struct nn_xpack *xp, struct writer *wr, serdata_t se
|
|||
{
|
||||
struct tkmap_instance *tk;
|
||||
int res;
|
||||
tk = (ddsi_plugin.rhc_lookup_fn) (serdata);
|
||||
tk = (ddsi_plugin.rhc_plugin.rhc_lookup_fn) (serdata);
|
||||
res = write_sample_eot (xp, wr, NULL, serdata, tk, 0, 0);
|
||||
(ddsi_plugin.rhc_unref_fn) (tk);
|
||||
(ddsi_plugin.rhc_plugin.rhc_unref_fn) (tk);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
|
@ -1131,9 +1131,9 @@ static void write_pmd_message (struct nn_xpack *xp, struct participant *pp, unsi
|
|||
encoding. */
|
||||
serdata->hdr.identifier = PLATFORM_IS_LITTLE_ENDIAN ? CDR_LE : CDR_BE;
|
||||
|
||||
tk = (ddsi_plugin.rhc_lookup_fn) (serdata);
|
||||
tk = (ddsi_plugin.rhc_plugin.rhc_lookup_fn) (serdata);
|
||||
write_sample_nogc (xp, wr, serdata, tk);
|
||||
(ddsi_plugin.rhc_unref_fn) (tk);
|
||||
(ddsi_plugin.rhc_plugin.rhc_unref_fn) (tk);
|
||||
#undef PMD_DATA_LENGTH
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue