* @retval Is there a command following?
*/
-static bool have_andx_command(const char *buf, uint16_t ofs)
+static bool have_andx_command(const char *buf, uint16_t ofs, uint8_t cmd)
{
uint8_t wct;
size_t buflen = talloc_get_size(buf);
+ if (!is_andx_req(cmd)) {
+ return false;
+ }
+
if ((ofs == buflen-1) || (ofs == buflen)) {
return false;
}
}
}
- if (!have_andx_command((char *)state->inbuf, wct_ofs)) {
+ if (!have_andx_command((char *)state->inbuf, wct_ofs, cmd)) {
/*
* This request was not completed because a previous
* request in the chain had received an error.
status = state->cli->raw_status;
}
- if (!have_andx_command((char *)state->inbuf, wct_ofs)) {
+ if (!have_andx_command((char *)state->inbuf, wct_ofs, cmd)) {
if ((cmd == SMBsesssetupX)
&& NT_STATUS_EQUAL(