Skip to content

Commit

Permalink
Minor tweaks and notes
Browse files Browse the repository at this point in the history
  • Loading branch information
petabyt committed Sep 10, 2024
1 parent f36f4a5 commit a114311
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions src/object.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
#include <string.h>

struct ObjectCache {
// List of indexes to priority objects
// List of indexes to access object list -> status[i].info or status[i]->thumb
// GetObjects will traverse index list and return downloaded objects

// Unoptimized array
struct ObjectStatus {
int handle;
Expand Down Expand Up @@ -138,3 +142,8 @@ struct ObjectCache *ptp_create_object_service(int *handles, int length, ptp_obje

return oc;
}

void ptp_free_object_service(struct ObjectCache *oc) {
free(oc->status);
free(oc);
}
2 changes: 1 addition & 1 deletion src/transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ int ptpusb_send_bulk_packets(struct PtpRuntime *r, int length) {
x = ptp_cmd_write(r, r->data + sent, length);

if (x < 0) {
ptp_verbose_log("send_bulk_packet: %d\n", __func__, x);
ptp_verbose_log("%s: %d\n", __func__, x);
return PTP_IO_ERR;
}

Expand Down

0 comments on commit a114311

Please sign in to comment.