static struct async_operations download_async_operations = {
.reap = download_reap,
.signal = {
- [SIGCHLD] = download_sigchld,
+ [SIGCHLD] = download_sigchld,
+ [SIGUPDATE] = SIG_IGN,
},
};
return;
}
+ /* Update progress */
+ http->async.completed = http->buffer->fill;
+ http->async.total = http->content_length;
+
/* If we have reached the content-length, stop now */
if ( http->content_length &&
( http->buffer->fill >= http->content_length ) ) {
strncpy ( image->name, name, ( sizeof ( image->name ) - 1 ) );
/* Download the file */
- if ( ( rc = async_block ( &async, start_download ( uri_string, &async,
- &image->data,
- &image->len ))) !=0)
+ if ( ( rc = async_block_progress ( &async,
+ start_download ( uri_string, &async,
+ &image->data,
+ &image->len )))!=0)
goto err;
/* Register the image */