scpi: scpi_cmd_resp() shouldn't return SR_OK without filling the gvar

scpi-pps at line 212 assumes that an SR_OK return means that the gvar
is valid, which leads to the following error:
** GLib:ERROR:/build/glib2.0-2.45.8/./glib/gvarianttypeinfo.c:184:g_variant_type_info_check: assertion failed: (0 <= index && index < 24)
This commit is contained in:
Aurelien Jacobs 2015-09-20 16:15:01 +02:00
parent baed0211a1
commit 06f63a749e
1 changed files with 2 additions and 2 deletions

View File

@ -97,8 +97,8 @@ SR_PRIV int scpi_cmd_resp(const struct sr_dev_inst *sdi, const struct scpi_comma
const char *cmd;
if (!(cmd = scpi_cmd_get(cmdtable, command))) {
/* Device does not implement this command, that's OK. */
return SR_OK;
/* Device does not implement this command. */
return SR_ERR_NA;
}
scpi = sdi->conn;