Commit Graph

3655 Commits (a6b18c868bcf32ddb14ddea79281fa3c12e22803)

Author SHA1 Message Date
Tatsuhiro Tsujikawa a6b18c868b Log size before flush 2012-12-06 03:04:41 +09:00
Tatsuhiro Tsujikawa df5f1fe77f Fixed bug that size_ is not updated when WrDiskCacheEntry::append is called 2012-12-06 03:04:05 +09:00
Tatsuhiro Tsujikawa 838949ab85 Append new data to the contagious cache data
If we receive small data (e.g., 1 or 2 bytes), cache entry becomes a
headache. To mitigate this problem, we allocate cache buffer at least
4KiB and append the data to the contagious cache data.
2012-12-06 02:23:32 +09:00
Tatsuhiro Tsujikawa 2c5e77f422 Flush cached data on checkout/cancel Segment
This change prevents the cached data from overlap because of BT peers.
2012-12-06 01:16:28 +09:00
Tatsuhiro Tsujikawa 56c498bcbf Clear write cache on Segment::clear and Piece::clearAllBlock 2012-12-06 00:39:14 +09:00
Tatsuhiro Tsujikawa 9ed8502e74 Write data in 4K aligned offset in write with disk cache enabled
This greatly reduces disk activity especially on Win + NTFS.  Not so
much difference on Linux.
2012-12-06 00:17:11 +09:00
Tatsuhiro Tsujikawa 911851debb mingw32: Removed FSCTL_SET_SPARSE set 2012-12-03 23:07:05 +09:00
Tatsuhiro Tsujikawa 8f2a4cc716 Removed unused members 2012-12-03 21:32:09 +09:00
Tatsuhiro Tsujikawa f314719618 Added --disk-cache option
This option enables disk cache. If SIZE is 0, the disk cache is
disabled. This feature caches the downloaded data in memory, which
grows to at most SIZE bytes. The cache storage is created for aria2
instance and shared by all downloads. The one advantage of the disk
cache is reduce the disk seek time because the data is written in
larger unit and it is reordered by the offset of the file. If the
underlying file is heavily fragmented it is not the case.
2012-12-03 01:39:10 +09:00
Tatsuhiro Tsujikawa 8ac433a8e9 Fixed compile error without SSL/TLS lib 2012-12-01 23:37:57 +09:00
Tatsuhiro Tsujikawa 2cbdd8b845 Fixed compile error without BitTorrent support 2012-12-01 21:33:25 +09:00
Tatsuhiro Tsujikawa 031ff9ae62 Updated NEWS for 1.16.0 release 2012-12-01 21:32:33 +09:00
Tatsuhiro Tsujikawa 7e59e2dbb5 mingw32: Open file using _wsopen and added --enable-mmap support
I tried CreateFile but the subsequent ReadFile fails with Access
Denied if sparse file is read on NTFS. I mostly reverted previous
changes and use _wsopen with read/write share enabled instead of
CreateFile.

This change also includes --enable-mmap support for MinGW32
build. Memory mapped file may be useful for 64-bits OS and lots of
RAM. Currently, FlushViewOfFile is not called during the download, so
it is slightly vulnerable against sudden power loss. I found lots of
read when resuming download due to page fault. So for now it is useful
for the initial download. I recommend not to use
--file-allocation=prealloc with --enable-mmap for MinGW32, because it
triggers page faults even in the initial download. Anyway, the option
is experimental.
2012-12-01 19:38:30 +09:00
Tatsuhiro Tsujikawa b95f15b462 Use Win32 API for file I/O in AbstractDiskWriter
Now file has been opened by aria2 is now readable by other processes.
2012-11-30 01:20:49 +09:00
Tatsuhiro Tsujikawa 53dcfea6a8 Removed generated aria2.pot 2012-11-29 22:52:14 +09:00
Tatsuhiro Tsujikawa d3859f7b13 Updated translation template 2012-11-28 23:45:14 +09:00
Tatsuhiro Tsujikawa 8ce0e69c2b Removed PO files from repository
Currently, message translation is done at launchpad.  All PO files can
be exported from there. The merge process from launchpad is done when
new release. First download export file from launchpad And use
import-po script to import PO files into po directory.
2012-11-28 23:42:08 +09:00
Tatsuhiro Tsujikawa 74520b03f8 Set F_GLOBAL_NOCACHE for Mac OS X 2012-11-28 21:47:55 +09:00
Tatsuhiro Tsujikawa 506a9358e1 Refactored file open code 2012-11-28 21:46:44 +09:00
Tatsuhiro Tsujikawa 16e25ef4e1 Enabled TCP_NODELAY in SocketCore::establishConnection and acceptConnection 2012-11-28 00:20:43 +09:00
Tatsuhiro Tsujikawa e781e6eac1 Made socket non-blocking mode in SocketCore::beginListen() 2012-11-28 00:15:03 +09:00
Tatsuhiro Tsujikawa 438f95abae Made socket non-blocking mode in SocketCore::acceptConnection() 2012-11-28 00:10:32 +09:00
Tatsuhiro Tsujikawa e1c03e30dd Don't use AC_FUNC_MMAP
Don't use AC_FUNC_MMAP becaue it fails on some platforms (e.g.,
OpenWRT) which have mmap and it works in the way we use in aria2.
Instead use mmap in AC_CHECK_FUNCS list.
2012-11-25 22:50:25 +09:00
ITriskTI f52d7024d1 Update doc/manual-src/ru/aria2c.rst 2012-11-17 13:20:02 +03:00
Tatsuhiro Tsujikawa 5f04183672 Updated bash_completion 2012-11-17 15:44:08 +09:00
Tatsuhiro Tsujikawa c8e7100248 Documented --force-save option in man page 2012-11-17 15:41:37 +09:00
Tatsuhiro Tsujikawa e0dcb942b2 Added --force-save option.
--force-save option saves download with --save-session option even if
the download is completed or removed. This may be useful to save
BitTorrent seeding which is recognized as completed state.  The
default value is false.
2012-11-17 15:33:44 +09:00
Tatsuhiro Tsujikawa 2ee4361848 Removed unused static function util::parseParam 2012-11-17 14:38:55 +09:00
Tatsuhiro Tsujikawa 9c1fe4addd Use array_ptr to remove try block 2012-11-15 22:05:59 +09:00
Tatsuhiro Tsujikawa 6b2f5ab1f5 SocketCore::bind now accepts const char* host instead of std::string 2012-11-15 21:09:10 +09:00
Tatsuhiro Tsujikawa b2893f1e31 Get the correct uploaded data size
Subtract msgHdrLen_ from writtenLength to get the uploaded data size.
Without this correction, the seeder assumes it has uploaded more data
than it actually has.
2012-11-04 16:49:39 +09:00
Tatsuhiro Tsujikawa 31189b1222 Made return type of util::parse_content_disposition ssize_t 2012-11-01 22:54:32 +09:00
Tatsuhiro Tsujikawa 7db480b024 Updated bash_completion 2012-10-31 22:48:45 +09:00
Tatsuhiro Tsujikawa 08cd68ec95 Removed Socket.h from SRCS 2012-10-31 19:07:08 +09:00
ITriskTI cb5984ce52 Update doc/manual-src/ru/aria2c.rst 2012-10-31 12:47:11 +03:00
Tatsuhiro Tsujikawa bf342a2827 Fixed compile error with mingw 2012-10-31 17:10:49 +09:00
Tatsuhiro Tsujikawa f4f6ecda37 Bump up version number to 1.16.0 2012-10-31 16:47:26 +09:00
Tatsuhiro Tsujikawa d4e7b51eb9 Made --http-no-cache false by default 2012-10-31 16:44:28 +09:00
Tatsuhiro Tsujikawa eacbd50e75 Added makerelease script
makerelease script creates distribution packages including source tar
ball, mingw 32 and 64 bit and android binary packages.
2012-10-31 16:39:06 +09:00
Tatsuhiro Tsujikawa 4d6c1a8748 Added .gitignore in doc/manual-src 2012-10-31 16:36:45 +09:00
Tatsuhiro Tsujikawa 49e9f66c16 Use len formal parameter of util::parse_content_disposition 2012-10-31 01:24:10 +09:00
Tatsuhiro Tsujikawa 5dfd1a5af7 Fixed memory leak 2012-10-29 23:43:35 +09:00
Tatsuhiro Tsujikawa 00e3151110 Initialized member 2012-10-29 23:42:58 +09:00
Tatsuhiro Tsujikawa f60b956a48 Removed always-true condition 2012-10-29 23:42:58 +09:00
Tatsuhiro Tsujikawa 39da18f156 Removed dead code 2012-10-29 23:42:58 +09:00
Tatsuhiro Tsujikawa 2676bbe9c6 Initialized scalar members 2012-10-29 23:42:58 +09:00
Tatsuhiro Tsujikawa feb548e174 Removed unused members 2012-10-29 23:42:58 +09:00
Tatsuhiro Tsujikawa 6fddbc845c Removed dead code 2012-10-29 23:42:58 +09:00
Tatsuhiro Tsujikawa f42199b46d Fixed resource leak 2012-10-29 23:42:58 +09:00
Tatsuhiro Tsujikawa 8566d050ff Reset stream format state 2012-10-29 22:39:09 +09:00