Otherwise, some pieces may be marked as finished in the control file
though they have not yet been written to the storage file.
This should prevent data loss and corruption when resuming downloads
after an app crash.
Signed-off-by: Ali MJ Al-Nasrawy <alimjalnasrawy@gmail.com>
Use pkg-config to find cppunit, libxml2 and expat. All those libraries
provide pkg-config files, and in all of those cases the pkg-config macro
is superior to the custom macros used currently.
The advantages of pkg-config files include:
- Explicit static linking support via --static. Currently, e.g.
'xml2-config --libs' prints all libraries needed for static linking when
doing dynamic linking unnecessary, resulting in unnecessary direct deps.
- Better cross-build support. You don't have to build the additional
*-config tools for target.
- Better multilib support. Per-ABI pkgconfig directories are commonly
supported while packages usually fail to look for per-CHOST *-config
variants.
- Better override support. The current macros allow little to no
result overrides, the pkg-config macros let you pass FOO_CFLAGS
and FOO_LIBS manually.
- Cleaner version checks. The code used in libxml.m4 is really creepy.
We moved @CPPUNIT_LIBS@ to later position. This is because in my
development environment, it adds linker search directory which
contains system default openssl, while I'd like to use my custom
openssl installation. This fix is not universal, since other
libraries can do the same thing. It is a bit hard to fix this
properly because we mix -L and -l in a same variable.
If we have peer which is already used, make addAndCheckoutPeer() fail.
If peer is in unused list, first remove the old entry, and then add
new one. This would make assertion in ~DefaultPeerStorage hold.
Up until now aria2 file auto renaming worked by just appending a new
unique number to the file path, behind the file name extension, if any,
changing what most other programs consider the file extension in the
process.
Now, aria2 will attempt to insert the number before the file extension,
leaving the extension intact, so that e.g. a ".jpg" still is a ".jpg"
file and opens in your configured image viewer when clicking it.
If a file has no extension (incl. so called "dot files"), the number
will be appended to the file name as usual.
Note: This is a potentially breaking change that might break third party
scripts that rely on aria2 auto file renaming producing a certain format
for renamed files. Please fix your scripts accordingly.
Closes GH-709
This is required when DHT is used in private network, where seeder is
initially not known to all nodes. This functionality requires
--bt-external-ip is set since aria2 cannot figure out external IP
address to advertise in general.
We eliminated 1 second delay between completion of name resolution for
tracker request and time when it is actually issued. We also elimited
1 second delay after last torrent download exists and it is told to
DHTInteractionCommand.