Rémi Bernon (@rbernon) commented about dlls/mf/session.c:
- if (session->command_state != COMMAND_STATE_COMPLETE) + if (session->command_state != COMMAND_STATE_COMPLETE && + session->command_state != COMMAND_STATE_SUBMITTED) { WARN("session %p command is in progress, waiting for it to complete.\n", session); LeaveCriticalSection(&session->cs); return S_OK; } + + if (&op->entry == list_head(&session->commands) && session->command_state == COMMAND_STATE_SUBMITTED) + session->command_state = COMMAND_STATE_COMPLETE; + else if (session->command_state == COMMAND_STATE_SUBMITTED) + WARN("invoked command is not the one submitted.\n"); + else + WARN("no command was submitted.\n"); + When the command callback is invoked, its command state has to be `COMMAND_STATE_SUBMITTED`. I think that check is also not necessary anymore, unless there's something wrong with our state machines.
```suggestion:-14+0 assert( session->command_state == COMMAND_STATE_SUBMITTED ); ``` -- https://gitlab.winehq.org/wine/wine/-/merge_requests/8722#note_112230