projects
/
libsigrok.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
818df9f
)
Fix sr_dev_has_option().
author
Bert Vermeulen
<redacted>
Thu, 9 Oct 2014 21:42:24 +0000
(23:42 +0200)
committer
Bert Vermeulen
<redacted>
Thu, 9 Oct 2014 21:42:24 +0000
(23:42 +0200)
This wasn't taking the SR_CONF_GET/_SET/_LIST flags into account.
Thanks to Janne Huttunen for spotting this.
src/device.c
patch
|
blob
|
blame
|
history
diff --git
a/src/device.c
b/src/device.c
index 7bfaa4cfb93e572c04f25010d75e174679d8f44a..9ed6080294096fabc7751903a096f7d1ae1457b3 100644
(file)
--- a/
src/device.c
+++ b/
src/device.c
@@
-191,7
+191,7
@@
SR_API gboolean sr_dev_has_option(const struct sr_dev_inst *sdi, int key)
ret = FALSE;
devopts = g_variant_get_fixed_array(gvar, &num_opts, sizeof(int32_t));
for (i = 0; i < num_opts; i++) {
- if (
devopts[i]
== key) {
+ if (
(devopts[i] & SR_CONF_MASK)
== key) {
ret = TRUE;
break;
}