Some scope can return POSITIVE/NEGATIVE instead of POS/NEG,
so accept this as well.
This closes bug #558.
*data = g_variant_new_string(tmp_str);
break;
case SR_CONF_TRIGGER_SLOPE:
*data = g_variant_new_string(tmp_str);
break;
case SR_CONF_TRIGGER_SLOPE:
- if (!strcmp(devc->trigger_slope, "POS"))
+ if (!strncmp(devc->trigger_slope, "POS", 3))
- else if (!strcmp(devc->trigger_slope, "NEG"))
+ else if (!strncmp(devc->trigger_slope, "NEG", 3))
tmp_str = "f";
else
return SR_ERR_NA;
tmp_str = "f";
else
return SR_ERR_NA;