Fix sr_dev_has_option().

This wasn't taking the SR_CONF_GET/_SET/_LIST flags into account.

Thanks to Janne Huttunen for spotting this.
This commit is contained in:
Bert Vermeulen 2014-10-09 23:42:24 +02:00
parent 818df9f8ec
commit d099d88021
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}