Add serial_num and connection_id fields to sr_dev_inst
This commit is contained in:
parent
db156e5409
commit
2fe6210af6
|
@ -868,6 +868,10 @@ struct sr_dev_inst {
|
||||||
char *model;
|
char *model;
|
||||||
/** Device version. */
|
/** Device version. */
|
||||||
char *version;
|
char *version;
|
||||||
|
/** Serial number. */
|
||||||
|
char *serial_num;
|
||||||
|
/** Connection string to uniquely identify devices. */
|
||||||
|
char *connection_id;
|
||||||
/** List of channels. */
|
/** List of channels. */
|
||||||
GSList *channels;
|
GSList *channels;
|
||||||
/** List of sr_channel_group structs */
|
/** List of sr_channel_group structs */
|
||||||
|
|
|
@ -230,6 +230,8 @@ SR_PRIV struct sr_dev_inst *sr_dev_inst_new(int index, int status,
|
||||||
sdi->vendor = vendor ? g_strdup(vendor) : NULL;
|
sdi->vendor = vendor ? g_strdup(vendor) : NULL;
|
||||||
sdi->model = model ? g_strdup(model) : NULL;
|
sdi->model = model ? g_strdup(model) : NULL;
|
||||||
sdi->version = version ? g_strdup(version) : NULL;
|
sdi->version = version ? g_strdup(version) : NULL;
|
||||||
|
sdi->serial_num = NULL;
|
||||||
|
sdi->connection_id = NULL;
|
||||||
sdi->channels = NULL;
|
sdi->channels = NULL;
|
||||||
sdi->channel_groups = NULL;
|
sdi->channel_groups = NULL;
|
||||||
sdi->session = NULL;
|
sdi->session = NULL;
|
||||||
|
@ -262,6 +264,8 @@ SR_PRIV void sr_dev_inst_free(struct sr_dev_inst *sdi)
|
||||||
g_free(sdi->vendor);
|
g_free(sdi->vendor);
|
||||||
g_free(sdi->model);
|
g_free(sdi->model);
|
||||||
g_free(sdi->version);
|
g_free(sdi->version);
|
||||||
|
g_free(sdi->serial_num);
|
||||||
|
g_free(sdi->connection_id);
|
||||||
g_free(sdi);
|
g_free(sdi);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue