---
src/device.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/src/device.c b/src/device.c
index 7e47548..4b2b5d6 100644
--- a/src/device.c
+++ b/src/device.c
@@ -574,6 +574,18 @@ SR_API char *sr_dev_inst_connid_get(struct sr_dev_inst
*sdi)
if (!sdi)
return NULL;
+ #ifdef HAVE_LIBSERIALPORT
+ struct sr_serial_dev_inst *serial;
+
+ if ((!sdi->connection_id) && (sdi->inst_type == SR_INST_SERIAL)) {
+ /* connection_id isn't populated, let's do that here. */
+
+ serial = sdi->conn;
+ sdi->connection_id = g_strdup(serial->port);
+ }
+ #endif
+
+
if ((!sdi->connection_id) && (sdi->inst_type == SR_INST_USB)) {
/* connection_id isn't populated, let's do that here. */
--
1.7.8.6
------------------------------------------------------------------------------
Slashdot TV. Videos for Nerds. Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk
_______________________________________________
sigrok-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sigrok-devel