summary refs log tree commit diff
path: root/btpd/tlib.c
AgeCommit message (Collapse)Author
2009-02-06Split peer information. Make id hash functions available.Richard Nyberg
struct peer is now peer and meta_peer. meta_peer can be used as a handle that won't be affected if a peer vanishes. The meta_peers are kept in a hash table to enable fast lookup by peer id.
2009-02-06Iterate throught the htbl instead of building an array first.Richard Nyberg
2009-02-06We must now set the ratio when creating hash tables.Richard Nyberg
2009-01-26Improve the torrent stop and btpd shutdown sequences.Richard Nyberg
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.
2009-01-11Let btpd remove torrent data by itself instead of calling rm.Richard Nyberg
2009-01-11Make iobuf more useful for io and use better names in its api.Richard Nyberg
2008-12-22Fix type mismatches in a couple of printf statements.Richard Nyberg
2007-05-20Clean up the #include sections in the btpd files. Most common headers andRichard Nyberg
all btpd headers are included through btpd.h.
2007-05-19Update the info files regularly. Before they were only updated when a torrentRichard Nyberg
stopped.
2007-05-18o Rename net_(write|read)32 to (enc|dec)_be32. Add similar functions for 64Richard Nyberg
bits as well. Implement them in libmisc instead of in btpd. o Change resume file format and related APIs. The resume files are now memory mapped.
2007-02-24Get rid of tp->relpath.Richard Nyberg
2007-02-24o Make errors when reading or writing torrent data non fatal. Instead ofRichard Nyberg
killing btpd, only the troublesome torrent will be stopped. o Some code shuffle.
2006-10-14Forgot to free some memory. Remove some broken code; it wasn't neededRichard Nyberg
yet anyway. glibc doesn't have the d_namlen field in struct dirent, so we'll have to use strlen instead.
2006-10-07Save the total amount down- and uploaded and cache the torrent size and theRichard Nyberg
amount we have in the info file.
2006-09-13btpd now has a library of torrents indexed by number and info hash.Richard Nyberg
The add and del commands adds or removes torrents from this library. The start and stop commands are used to active or deactivate torrents. Also, a mechanism for qeurying data on torrents has been added. It's only used by the btcli list and stat commands yet though. btcli has been split into different files for each command. Both btpd and btcli now use misc/btpd_if.h for all ipc definitions. Misc changes: - struct metainfo is gone. Use the new mi_* functions. - Add printf format type checking where appropriate.