From ce4bd05256a891d45b0013c33cdd9f2597c3bc80 Mon Sep 17 00:00:00 2001 From: Bert Vermeulen Date: Tue, 18 Nov 2014 15:34:52 +0100 Subject: [PATCH] agilent-dmm: Publish driver options. --- src/hardware/agilent-dmm/api.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/hardware/agilent-dmm/api.c b/src/hardware/agilent-dmm/api.c index 9dcbd230..59bb9ffa 100644 --- a/src/hardware/agilent-dmm/api.c +++ b/src/hardware/agilent-dmm/api.c @@ -229,8 +229,12 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst * scanopts, ARRAY_SIZE(scanopts), sizeof(uint32_t)); break; case SR_CONF_DEVICE_OPTIONS: - *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32, - devopts, ARRAY_SIZE(devopts), sizeof(uint32_t)); + if (!sdi) + *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32, + devopts, ARRAY_SIZE(devopts), sizeof(uint32_t)); + else + *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32, + devopts, 0, sizeof(uint32_t)); break; default: return SR_ERR_NA;