Define dds_guid_t as dds_builtintopic_guid_t

The former name should be less confusing.  Backwards compatibility is
preserved by only adding the sensible name as a typedef.

Signed-off-by: Erik Boasson <eb@ilities.com>
This commit is contained in:
Erik Boasson 2020-04-09 13:48:01 +02:00 committed by eboasson
parent 9239547d34
commit b2cf6921da
4 changed files with 11 additions and 7 deletions

View file

@ -186,17 +186,21 @@ typedef struct dds_builtintopic_guid
} }
dds_builtintopic_guid_t; dds_builtintopic_guid_t;
/* "dds_builtintopic_guid_t" is a bit of a weird name for what everyone just calls a GUID,
so let us try and switch to using the more logical one */
typedef struct dds_builtintopic_guid dds_guid_t;
typedef struct dds_builtintopic_participant typedef struct dds_builtintopic_participant
{ {
dds_builtintopic_guid_t key; dds_guid_t key;
dds_qos_t *qos; dds_qos_t *qos;
} }
dds_builtintopic_participant_t; dds_builtintopic_participant_t;
typedef struct dds_builtintopic_endpoint typedef struct dds_builtintopic_endpoint
{ {
dds_builtintopic_guid_t key; dds_guid_t key;
dds_builtintopic_guid_t participant_key; dds_guid_t participant_key;
dds_instance_handle_t participant_instance_handle; dds_instance_handle_t participant_instance_handle;
char *topic_name; char *topic_name;
char *type_name; char *type_name;

View file

@ -175,7 +175,7 @@ static struct ddsi_serdata *serdata_builtin_to_topicless (const struct ddsi_serd
return ddsi_serdata_ref (serdata_common); return ddsi_serdata_ref (serdata_common);
} }
static void convkey (dds_builtintopic_guid_t *key, const ddsi_guid_t *guid) static void convkey (dds_guid_t *key, const ddsi_guid_t *guid)
{ {
ddsi_guid_t tmp; ddsi_guid_t tmp;
tmp = nn_hton_guid (*guid); tmp = nn_hton_guid (*guid);

View file

@ -385,7 +385,7 @@ static void qp_qos (const dds_qos_t *q, FILE *fp)
qp_group_data (q, fp); qp_group_data (q, fp);
} }
static void print_key(FILE *fp, const char *label, const dds_builtintopic_guid_t *key) static void print_key(FILE *fp, const char *label, const dds_guid_t *key)
{ {
fprintf(fp, "%s", label); fprintf(fp, "%s", label);
for(size_t j = 0; j < sizeof (key->v); j++) { for(size_t j = 0; j < sizeof (key->v); j++) {

View file

@ -283,7 +283,7 @@ struct ppant {
ddsrt_avl_node_t avlnode; /* embedded AVL node for handle index */ ddsrt_avl_node_t avlnode; /* embedded AVL node for handle index */
ddsrt_fibheap_node_t fhnode; /* prio queue for timeout handling */ ddsrt_fibheap_node_t fhnode; /* prio queue for timeout handling */
dds_instance_handle_t handle; /* participant instance handle */ dds_instance_handle_t handle; /* participant instance handle */
dds_builtintopic_guid_t guid; /* participant GUID */ dds_guid_t guid; /* participant GUID */
char *hostname; /* hostname is taken from user_data QoS */ char *hostname; /* hostname is taken from user_data QoS */
uint32_t pid; /* pid is also taken from user_data QoS */ uint32_t pid; /* pid is also taken from user_data QoS */
dds_time_t tdisc; /* time at which it was discovered */ dds_time_t tdisc; /* time at which it was discovered */
@ -357,7 +357,7 @@ static void error3 (const char *fmt, ...)
verrorx (3, fmt, ap); verrorx (3, fmt, ap);
} }
static char *make_guidstr (struct guidstr *buf, const dds_builtintopic_guid_t *guid) static char *make_guidstr (struct guidstr *buf, const dds_guid_t *guid)
{ {
snprintf (buf->str, sizeof (buf->str), "%02x%02x%02x%02x_%02x%02x%02x%02x_%02x%02x%02x%02x_%02x%02x%02x%02x", snprintf (buf->str, sizeof (buf->str), "%02x%02x%02x%02x_%02x%02x%02x%02x_%02x%02x%02x%02x_%02x%02x%02x%02x",
guid->v[0], guid->v[1], guid->v[2], guid->v[3], guid->v[0], guid->v[1], guid->v[2], guid->v[3],