Skip to content

Commit

Permalink
get_thumb: only 1 param is allowed
Browse files Browse the repository at this point in the history
  • Loading branch information
petabyt committed Aug 14, 2023
1 parent ffeb2e9 commit 77036aa
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/operations.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,8 @@ int ptp_get_prop_desc(struct PtpRuntime *r, int code, struct PtpDevPropDesc *pd)
int ptp_get_thumbnail(struct PtpRuntime *r, int handle) {
struct PtpCommand cmd;
cmd.code = PTP_OC_GetThumb;
cmd.param_length = 2;
cmd.params[0] = handle; // -1 to delete all image
cmd.params[1] = 0; // Object format code
cmd.param_length = 1;
cmd.params[0] = handle;

return ptp_generic_send(r, &cmd);
}
Expand Down

0 comments on commit 77036aa

Please sign in to comment.