virtual-device: Remove messages we can't process from queue when not scanning

Commands that are not valid for non-scan operations should be removed
from queue, or these may be re-proposed forever.
This commit is contained in:
Marco Trevisan (Treviño)
2021-01-28 00:54:34 +01:00
parent c495b82000
commit e1e3f6955e
2 changed files with 11 additions and 1 deletions

View File

@@ -164,7 +164,11 @@ process_cmds (FpDeviceVirtualDevice * self,
/* If we are not scanning, then we have to stop here. */
if (!scan)
break;
{
g_warning ("Could not process command: %s", cmd);
g_ptr_array_remove_index (self->pending_commands, 0);
break;
}
if (g_str_has_prefix (cmd, SCAN_CMD_PREFIX))
{