Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PTPObjectInfo related improvements #1039

Merged
merged 11 commits into from
Oct 10, 2024
2 changes: 1 addition & 1 deletion .github/workflows/ccpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:

- name: 'Install build requirements (Linux)'
if: runner.os == 'Linux'
run: sudo apt-get install -y autopoint gettext libusb-1.0-0-dev libcurl4-openssl-dev libgd-dev
run: sudo apt-get install -y autopoint gettext libusb-1.0-0-dev libcurl4-openssl-dev libgd-dev libltdl-dev

- name: 'Install build requirements (macOS)'
if: runner.os == 'macOS'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
if: ${{ github.event_name == 'pull_request' }}

# install all necessary things
- run: sudo apt-get update && sudo apt-get install -y autopoint gettext libusb-1.0-0-dev libcurl4-openssl-dev
- run: sudo apt-get update && sudo apt-get install -y autopoint gettext libusb-1.0-0-dev libcurl4-openssl-dev libltdl-dev

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
10 changes: 6 additions & 4 deletions camlibs/ptp2/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,6 @@ camera_canon_eos_update_capture_target(Camera *camera, GPContext *context, int v
static int
camera_prepare_canon_eos_capture(Camera *camera, GPContext *context) {
PTPParams *params = &camera->pl->params;
PTPStorageIDs sids;
int tries;

GP_LOG_D ("preparing EOS capture...");
Expand Down Expand Up @@ -440,14 +439,17 @@ camera_prepare_canon_eos_capture(Camera *camera, GPContext *context) {
ptp_free_deviceinfo (&params->deviceinfo);
C_PTP (ptp_getdeviceinfo(params, &params->deviceinfo));
CR (fixup_cached_deviceinfo (camera, &params->deviceinfo));

/* TODO: the following block of code seems to have no effect, remove? */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think we can comment it out.
it mirrors what the Canon EOS is doing, but its likely not going to break anything to disable it.

PTPStorageIDs sids;
C_PTP (ptp_canon_eos_getstorageids(params, &sids));
if (sids.n >= 1) {
if (sids.len >= 1) {
unsigned char *sdata;
unsigned int slen;
C_PTP (ptp_canon_eos_getstorageinfo(params, sids.Storage[0], &sdata, &slen ));
C_PTP (ptp_canon_eos_getstorageinfo(params, sids.val[0], &sdata, &slen));
free (sdata);
}
free (sids.Storage);
free_array(&sids);

/* FIXME: 9114 call missing here! */

Expand Down
Loading
Loading