Skip to content

Commit

Permalink
Merge pull request #111 from marcone/master
Browse files Browse the repository at this point in the history
Fix typo
  • Loading branch information
jfdelnero authored Nov 3, 2024
2 parents 87a3f4a + 1d95afe commit 6c1f1e3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion inc/mtp.h
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ void mtp_deinit_responder(mtp_ctx * ctx);

int build_response(mtp_ctx * ctx, uint32_t tx_id, uint16_t type, uint16_t status, void * buffer, int maxsize, void * datain,int size);
int check_and_send_USB_ZLP(mtp_ctx * ctx , int size);
int parse_incomming_dataset(mtp_ctx * ctx,void * datain,int size,uint32_t * newhandle, uint32_t parent_handle, uint32_t storage_id);
int parse_incoming_dataset(mtp_ctx * ctx,void * datain,int size,uint32_t * newhandle, uint32_t parent_handle, uint32_t storage_id);

#define APP_VERSION "v1.6.8"

Expand Down
6 changes: 3 additions & 3 deletions src/mtp.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ int build_response(mtp_ctx * ctx, uint32_t tx_id, uint16_t type, uint16_t status
return ofs;
}

int parse_incomming_dataset(mtp_ctx * ctx,void * datain,int size,uint32_t * newhandle, uint32_t parent_handle, uint32_t storage_id)
int parse_incoming_dataset(mtp_ctx * ctx,void * datain,int size,uint32_t * newhandle, uint32_t parent_handle, uint32_t storage_id)
{
MTP_PACKET_HEADER * tmp_hdr;
unsigned char *dataset_ptr;
Expand Down Expand Up @@ -204,13 +204,13 @@ int parse_incomming_dataset(mtp_ctx * ctx,void * datain,int size,uint32_t * newh
storage_flags = mtp_get_storage_flags(ctx, storage_id);
if( storage_flags == 0xFFFFFFFF )
{
PRINT_DEBUG("parse_incomming_dataset : Storage 0x%.8x is Invalid !",storage_id);
PRINT_DEBUG("%s : Storage 0x%.8x is Invalid !", __func__, storage_id);
return MTP_RESPONSE_INVALID_STORAGE_ID;
}

if( (storage_flags & UMTP_STORAGE_READONLY) )
{
PRINT_DEBUG("parse_incomming_dataset : Storage 0x%.8x is Read only !", storage_id);
PRINT_DEBUG("%s : Storage 0x%.8x is Read only !", __func__, storage_id);
return MTP_RESPONSE_STORE_READ_ONLY;
}

Expand Down
2 changes: 1 addition & 1 deletion src/mtp_operations/mtp_op_sendobjectinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ uint32_t mtp_op_SendObjectInfo(mtp_ctx * ctx,MTP_PACKET_HEADER * mtp_packet_hdr,

new_handle = 0xFFFFFFFF;

response_code = parse_incomming_dataset(ctx,ctx->rdbuffer2,sz,&new_handle,parent_handle,storageid);
response_code = parse_incoming_dataset(ctx,ctx->rdbuffer2,sz,&new_handle,parent_handle,storageid);
if( response_code == MTP_RESPONSE_OK )
{
PRINT_DEBUG("MTP_OPERATION_SEND_OBJECT_INFO : Response - storageid: 0x%.8X, parent_handle: 0x%.8X, new_handle: 0x%.8X ",storageid,parent_handle,new_handle);
Expand Down

0 comments on commit 6c1f1e3

Please sign in to comment.