diff --git a/inc/mtp.h b/inc/mtp.h index 1500da8..376ddff 100644 --- a/inc/mtp.h +++ b/inc/mtp.h @@ -171,6 +171,6 @@ int build_response(mtp_ctx * ctx, uint32_t tx_id, uint16_t type, uint16_t status 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); -#define APP_VERSION "v1.6.4" +#define APP_VERSION "v1.6.5" #endif diff --git a/src/mtp_operations/mtp_op_getdeviceinfos.c b/src/mtp_operations/mtp_op_getdeviceinfos.c index 4436916..466c10c 100644 --- a/src/mtp_operations/mtp_op_getdeviceinfos.c +++ b/src/mtp_operations/mtp_op_getdeviceinfos.c @@ -41,8 +41,8 @@ uint32_t mtp_op_GetDeviceInfos(mtp_ctx * ctx,MTP_PACKET_HEADER * mtp_packet_hdr, { int sz,tmp_sz; - if(!ctx->fs_db) - return MTP_RESPONSE_SESSION_NOT_OPEN; + // Note : From the MTP specification this operation can be used without first + // opening an MTP session by sending an OpenSession command ! sz = build_response(ctx, mtp_packet_hdr->tx_id, MTP_CONTAINER_TYPE_DATA, mtp_packet_hdr->code, ctx->wrbuffer, ctx->usb_wr_buffer_max_size,0,0); if(sz < 0)