Skip to content

Commit

Permalink
Merge pull request #115 from marcone/master
Browse files Browse the repository at this point in the history
Fix copy/paste error
  • Loading branch information
jfdelnero authored Nov 7, 2024
2 parents f459eba + 1e6936a commit 1350035
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/usb_gadget.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ int write_usb(usb_gadget * ctx, int channel, unsigned char * buffer, int size)
{
ret = write (ctx->ep_handles[channel], buffer, size);
}
}while( ret < 0 && ( (errno == EAGAIN) || (errno == EAGAIN) ) && !mtp_context->cancel_req );
}while( ret < 0 && ( (errno == EAGAIN) || (errno == EWOULDBLOCK) ) && !mtp_context->cancel_req );
fcntl(ctx->ep_handles[channel], F_SETFL, fcntl(ctx->ep_handles[channel], F_GETFL) & ~O_NONBLOCK);
#else

Expand Down Expand Up @@ -498,8 +498,6 @@ static void handle_setup_request(usb_gadget * ctx, struct usb_ctrlrequest* setup
case MTP_REQ_CANCEL:
PRINT_DEBUG("MTP_REQ_CANCEL !");

status = read (ctx->usb_device, &status, 0);

mtp_context->cancel_req = 1;

cnt = 0;
Expand Down

0 comments on commit 1350035

Please sign in to comment.