Skip to content

Commit

Permalink
examples/winexe: fix fetching return code of the remote command
Browse files Browse the repository at this point in the history
ctrl_inbuf field is used to parse remote-side information. A typo was
there that tried to parse return code as "version 0x%x" whereas the
correct way to do it (tested on Windows 10) is to scan for "return_code
%x".

Signed-off-by: Yury Lunev <[email protected]>
Reviewed-by: Volker Lendecke <[email protected]>
Reviewed-by: Jeremy Allison <[email protected]>

Autobuild-User(master): Jeremy Allison <[email protected]>
Autobuild-Date(master): Thu Jul 28 18:01:16 UTC 2022 on sn-devel-184
  • Loading branch information
Yury Lunev authored and jrasamba committed Jul 28, 2022
1 parent 3323381 commit ab3d237
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/winexe/winexe.c
Original file line number Diff line number Diff line change
Expand Up @@ -1695,7 +1695,7 @@ static void winexe_ctrl_got_read(struct tevent_req *subreq)
return;
}

ret = sscanf(state->ctrl_inbuf, "version 0x%x\n", &return_code);
ret = sscanf(state->ctrl_inbuf, "return_code %x\n", &return_code);
if (ret == 1) {
state->return_code = return_code;
return;
Expand Down

0 comments on commit ab3d237

Please sign in to comment.