Richard Nyberg
3273c5c1b2
Change options to: '-4' => Ipv4 only, '-6' => IPv6 only.
преди 16 години
Richard Nyberg
5aaf5be2ef
Better start from scratch on udp tracker support.
преди 16 години
Richard Nyberg
438881f16f
Improve the torrent stop and btpd shutdown sequences.
Torrents are now considered stopped and may be restarted even if
the stop event haven't been sent the trackers yet. The same holds
for the del and add commands.
A btpd process in shutdown mode that only have stopped torrents,
but is still sending the stop event to trackers, will release
resources that would block a new btpd to start. It will the
silently exit when it's finished with the trackers.
This also makes the timeout parameter for shutdown unnecessary.
преди 16 години
Richard Nyberg
50b69abbcd
More files to ignore.
преди 16 години
Richard Nyberg
7708f42ebc
Use the correct macro to make automake happy.
Reported by <bsdfan666@cyberdude.com>.
преди 16 години
Richard Nyberg
3857831f8a
Fix a typo in an error message.
преди 16 години
Richard Nyberg
33f309c204
Print the result of, and not the address of, getpid().
преди 16 години
Richard Nyberg
7ba163fe5a
Rethink the tracker client code somewhat.
btpd now uses all tiers in parallel, so a torrent with two tiers will
essentially be treated by btpd as a torrent with two trackers to send
each event to. This is not quite what the multitrackes standard says,
but it's much easier to implement reasonable behaviour this way.
btpd is going to report the number of good trackers for a torrent
instead of the number of errors, but for now just report zero errors.
преди 16 години
Richard Nyberg
eb22256aa5
git clean is a better way to clean the tree.
преди 16 години
Richard Nyberg
05329268d5
Add IPv6 support.
Btpd can now use both ipv4 and ipv6. The new options -4 and -6 toggles
use of ip v4 and v6 respectively. They are both used by default.
Remove restrictions on the --ip option since the spec allows to be a
dns name. Ultimately this option may need to be changed on a per
tracker/torrent basis.
преди 16 години
Richard Nyberg
273e38e667
Added macros for checking supported compiler flags.
преди 16 години
Richard Nyberg
5d0272a9a2
Start previously active torrents after log file setup.
преди 16 години
Richard Nyberg
ba9895e7a5
Test for working snprintf at startup.
преди 16 години
Richard Nyberg
5a6ac5189f
Let the initial process linger until the daemon is initialized.
This enables us to report errors in the btpd init sequence to the
shell by non zero exit code.
Changed from flock to lockf because of solaris troubles. I may
be confused though.
преди 16 години
Richard Nyberg
c8285d9b31
Don't use the bsd err and warn family of functions. Solaris doesn't have them.
преди 16 години
Richard Nyberg
7b8644dcc1
Provide own implementation of asprintf if it's missing.
преди 16 години
Richard Nyberg
b50a306ca3
Lots of autofoo magic for threads and different libs.
преди 16 години
Richard Nyberg
8a150a2fb3
pid_t is long on some systems. solaris is one.
преди 16 години
Richard Nyberg
df5fc31ea8
Remove unnecessary include.
преди 16 години
Richard Nyberg
06bd2a1a21
On solaris bcopy and some other useful functions are declared in strings.h.
преди 16 години
Richard Nyberg
b47b55b3bc
Use the more compatible -R flag instead of -rpath when linking.
преди 16 години
Richard Nyberg
b854501973
Fix for missing AI_ADDRCONFIG.
преди 16 години
Richard Nyberg
3df0820c8e
Indicate that btpd has moved past 0.13.
преди 16 години
Richard Nyberg
2947896074
Test that the clock is working at start and test for evloop errors.
преди 16 години
Richard Nyberg
50a313570f
Update build scripts for recent btpd changes. Also use only one makefile.
преди 16 години
Richard Nyberg
36076a1466
Remove libevent. Btpd no longer uses it.
преди 16 години
Richard Nyberg
eb421cc586
Btpd now uses evloop, it's own event loop, instead of libevent.
преди 16 години
Richard Nyberg
59905999ce
Add evloop, btpd's new event loop. This will replace libevent.
преди 16 години
Richard Nyberg
4457c1268a
Let btpd remove torrent data by itself instead of calling rm.
преди 16 години
Richard Nyberg
b5d78b066a
Make the http client independent of events and use my iobuf.
преди 16 години
Richard Nyberg
3af2b0c0ac
Make iobuf more useful for io and use better names in its api.
преди 16 години
Richard Nyberg
186113e4ee
Add the function memfind. It'll be used by iobuf.
преди 16 години
Richard Nyberg
b4be0683e6
Add code to connect to host given by its hostname.
преди 16 години
Richard Nyberg
a34d4da755
Add a thread for performing asynchronous getaddrinfo's.
преди 16 години
Richard Nyberg
42c2605dcb
Bring back the old thread callback code.
преди 16 години
Richard Nyberg
eb0f4388f8
More autotool files to ignore.
преди 16 години
Richard Nyberg
d8e1d6a492
Tell git to ignore files generated by autotools.
преди 16 години
Richard Nyberg
1a10f0fb76
Fix type mismatches in a couple of printf statements.
преди 16 години
Richard Nyberg
19b7e785f5
Turn off warnings for pointer sign mismatches.
преди 16 години
Richard Nyberg
340fbf4737
The "Host" HTTP header should be placed as early as possible and also include
the port number.
преди 17 години
Richard Nyberg
1758597e3e
Recognize both the CRLF sequence and single LF characters as line terminators.
преди 17 години
Richard Nyberg
ff76e2bf6c
Add libraries in the correct place.
преди 17 години
Richard Nyberg
9a08fda26e
Create the peer id and random seed based on the host name, port and
the time of the initialization in seconds and microseconds.
преди 17 години
Richard Nyberg
46fb0c2419
Fix the '--topdir' option for single file torrents without a top directory.
Such torrents were saved as 'name/name' instead of 'name'. The option broke
in rev253.
Patch from borg@uu3.net .
преди 17 години
Richard Nyberg
8f4fde49ee
Fix bug in benc_length. benc_first shouldn't be used here since it returns
NULL on empty lists or dictionaries. This could cause crashes.
Reported by Robert Jonsson.
преди 17 години
Richard Nyberg
2886768d30
Clean up the #include sections in the btpd files. Most common headers and
all btpd headers are included through btpd.h.
преди 17 години
Richard Nyberg
e8a5b6cf28
Added some more info to CHANGES and version information to README.
преди 17 години
Richard Nyberg
24c2c1cd4a
#include order.
преди 17 години
Richard Nyberg
7c2b7b656e
Fix problem introduced in r345. A call to http_get could cause the
callback to be called before http_get returned.
преди 17 години
Richard Nyberg
630f11d18b
I had missed a check for tracker errors. When a torrent is stopping it's
supposed to stop if it can't contact the tracker in STOP_ERRORS tries.
преди 17 години