Add serial_num and connection_id fields to sr_dev_inst
diff --git a/include/libsigrok/libsigrok.h b/include/libsigrok/libsigrok.h
index 4f3510d..655a4a0 100644
--- a/include/libsigrok/libsigrok.h
+++ b/include/libsigrok/libsigrok.h
@@ -868,6 +868,10 @@
char *model;
/** Device version. */
char *version;
+ /** Serial number. */
+ char *serial_num;
+ /** Connection string to uniquely identify devices. */
+ char *connection_id;
/** List of channels. */
GSList *channels;
/** List of sr_channel_group structs */
diff --git a/src/device.c b/src/device.c
index a331536..054c734 100644
--- a/src/device.c
+++ b/src/device.c
@@ -230,6 +230,8 @@
sdi->vendor = vendor ? g_strdup(vendor) : NULL;
sdi->model = model ? g_strdup(model) : NULL;
sdi->version = version ? g_strdup(version) : NULL;
+ sdi->serial_num = NULL;
+ sdi->connection_id = NULL;
sdi->channels = NULL;
sdi->channel_groups = NULL;
sdi->session = NULL;
@@ -262,6 +264,8 @@
g_free(sdi->vendor);
g_free(sdi->model);
g_free(sdi->version);
+ g_free(sdi->serial_num);
+ g_free(sdi->connection_id);
g_free(sdi);
}