This commit is contained in:
twinaphex 2017-05-20 14:02:16 +02:00
parent 57b7398bdd
commit 4333e3d5e7
3 changed files with 4 additions and 15 deletions

View File

@ -30,9 +30,6 @@ static int task_file_transfer_iterate_transfer(nbio_handle_t *nbio)
{
size_t i;
if (!nbio)
return -1;
nbio->pos_increment = 5;
if (nbio->is_finished)
@ -49,9 +46,6 @@ static int task_file_transfer_iterate_transfer(nbio_handle_t *nbio)
static int task_file_transfer_iterate_parse(nbio_handle_t *nbio)
{
if (!nbio)
return -1;
if (nbio->cb)
{
int len = 0;
@ -88,12 +82,12 @@ void task_file_load_handler(retro_task_t *task)
}
break;
case NBIO_STATUS_TRANSFER_PARSE:
if (task_file_transfer_iterate_parse(nbio) == -1)
if (!nbio || task_file_transfer_iterate_parse(nbio) == -1)
task_set_cancelled(task, true);
nbio->status = NBIO_STATUS_TRANSFER_FINISHED;
break;
case NBIO_STATUS_TRANSFER:
if (task_file_transfer_iterate_transfer(nbio) == -1)
if (!nbio || task_file_transfer_iterate_transfer(nbio) == -1)
nbio->status = NBIO_STATUS_TRANSFER_PARSE;
break;
case NBIO_STATUS_TRANSFER_FINISHED:

View File

@ -27,8 +27,7 @@
enum http_status_enum
{
HTTP_STATUS_POLL = 0,
HTTP_STATUS_CONNECTION_TRANSFER,
HTTP_STATUS_CONNECTION_TRANSFER = 0,
HTTP_STATUS_CONNECTION_TRANSFER_PARSE,
HTTP_STATUS_TRANSFER,
HTTP_STATUS_TRANSFER_PARSE,
@ -155,7 +154,6 @@ static void task_http_transfer_handler(retro_task_t *task)
goto task_finished;
break;
case HTTP_STATUS_TRANSFER_PARSE:
case HTTP_STATUS_POLL:
goto task_finished;
default:
break;

View File

@ -31,8 +31,7 @@
enum image_status_enum
{
IMAGE_STATUS_NONE = 0,
IMAGE_STATUS_TRANSFER,
IMAGE_STATUS_TRANSFER = 0,
IMAGE_STATUS_TRANSFER_PARSE,
IMAGE_STATUS_PROCESS_TRANSFER,
IMAGE_STATUS_PROCESS_TRANSFER_PARSE
@ -258,8 +257,6 @@ bool task_image_load_handler(retro_task_t *task)
}
if (!image->is_finished)
break;
case IMAGE_STATUS_NONE:
break;
}
}