Commit Graph

2233 Commits

Author SHA1 Message Date
Charles Kerr 6681107c00 (trunk libT) remove a small memory leak in the request-list unit test s.t. valgrind will be happy 2009-01-04 17:46:27 +00:00
Charles Kerr ca6dd89e10 (trunk libT) minor tr_ptrArray API cleanup 2009-01-04 16:59:15 +00:00
Charles Kerr cf79c87d7e (trunk libT) forgot to "svn add" request-list-test.c before committing... 2009-01-04 16:58:09 +00:00
Charles Kerr 6d21e557f5 (trunk libT) fix r7610 bug reported by BentMyWookie 2009-01-04 16:48:31 +00:00
Charles Kerr 51e68d6e56 (trunk libT) new peer request fifo queue with log(N) search time. new unit tests for the queue. new utility tr_lowerBound() 2009-01-04 16:29:44 +00:00
Charles Kerr a0390c6111 (trunk libT) remove unnecessary prototype 2009-01-04 04:37:47 +00:00
Charles Kerr 2b38f6f81a (trunk libT) don't use void* when doing pointer math. 2009-01-04 04:37:26 +00:00
Charles Kerr 8690d83ba4 (trunk libT) minor improvement to testing to see if two requests are equal 2009-01-04 02:49:30 +00:00
Charles Kerr f2c9d270b0 (trunk libT) do scrape paused torrents. 2009-01-04 02:05:17 +00:00
Charles Kerr 422d1b0f97 (trunk libT) don't scrape paused torrents. 2009-01-04 02:01:57 +00:00
Charles Kerr ead8254b85 (trunk libT) tr_torrentStat() speedups 2009-01-03 23:11:29 +00:00
Mitchell Livingston cc8e16ed20 only increment the tier count for valid tiers 2009-01-03 21:27:48 +00:00
Charles Kerr 78cf80d3c0 (trunk libT) experimental code to get more peers faster 2009-01-03 07:23:26 +00:00
Charles Kerr 7fcad8a45b (trunk libT) fix r7594 typo 2009-01-03 05:07:45 +00:00
Charles Kerr 5afd327b15 (trunk libT) use ssize_t where appropriate in tr_peerIoFlush() 2009-01-03 04:57:40 +00:00
Charles Kerr 1e77d1313e (trunk libT) oh ffs 2009-01-03 03:58:35 +00:00
Charles Kerr dfa0622a6c (trunk libT) add "deep log" message to help track down freeze reported by the|Navigator. also, small + cheap speedup in tr_deepLoggingIsActive() 2009-01-03 02:43:17 +00:00
Charles Kerr 0d2d375125 (trunk libT) inline a few more torrent methods 2009-01-03 00:25:27 +00:00
Charles Kerr cee6610ebb (trunk libT) inline the tr_bencIs*() utility functions 2009-01-03 00:11:31 +00:00
Charles Kerr c86780de8b (trunk libT) avoid unnecessary duplicate calls to tr_date() in tr_bandwidthUsed() 2009-01-02 23:48:51 +00:00
Charles Kerr 49f46dcddb (trunk libT) revert r7548, which broke very low speed download limits.. the simplified peer-msgs parsing didn't distinguish between piece & raw data until the piece was done downloading. 2009-01-02 23:28:57 +00:00
Charles Kerr 4addf02246 (trunk libT) fix a typo that made jhujhiti giggle 2009-01-02 22:06:11 +00:00
Charles Kerr d756d6b58f (trunk libT) commit some debugging messages that were added to trackdown the multicast filter issue 2009-01-02 21:50:51 +00:00
Erick Turnquist 5086cbe47c (trunk libT) use IN_MULTICAST macro 2009-01-02 21:45:55 +00:00
Charles Kerr 86d3e70121 (trunk libT) avoid some unnecessary memory fragmentation... for composited objects that have a tr_ratecontrol, contain the it directly rather than a pointer to one allocated elsewhere on the heap. 2009-01-02 20:42:35 +00:00
Charles Kerr d202c5ecea (trunk libT) inline the ptrarray one-liners 2009-01-02 20:19:10 +00:00
Charles Kerr 5e9af46612 (trunk libT) make the tr_bandwidth macros into safer inline funcs. inline utils' one-liners. 2009-01-02 20:12:23 +00:00
Charles Kerr b41cf9f231 (trunk libT) avoid some unnecessary memory fragmentation... for composited objects that have a tr_bandwidth, contain the it directly rather than a pointer to one allocated elsewhere on the heap. 2009-01-02 19:56:06 +00:00
Charles Kerr 73f500e5be (trunk libT) inline parts of peer-io and bandwidth, too 2009-01-02 17:46:22 +00:00
Charles Kerr 199e38dd66 (trunk libT) avoid some unnecessary memory fragmentation... for composited objects that have a tr_completion, contain the it directly rather than a pointer to one allocated elsewhere on the heap. 2009-01-02 17:01:55 +00:00
Charles Kerr d6b4db4a78 (trunk libT) add "inline" hint to several one-liner functions 2009-01-02 06:28:22 +00:00
Charles Kerr 5e806dc816 * add autoconf test AC_C_INLINE to do the Right Thing for "inline", "__inline__", and "__inline".
* make tr_isAddress(), tr_isDirection(), and a bunch of the tr_torrent() macro functions into true inline functions
2009-01-02 05:11:50 +00:00
Charles Kerr 0cd572a0da (trunk libT) make tr_isAddress() and tr_isDirection() inline 2009-01-02 04:47:37 +00:00
Charles Kerr 8eda177838 (trunk libT) very minor style cleanup in tr_bandwidthAllocate() 2009-01-02 04:46:38 +00:00
Charles Kerr 2eb2dacd50 (trunk libT) Fix sparse warnings: symbol 'XXX' shadows an earlier one 2009-01-01 18:38:49 +00:00
Charles Kerr 82c5aca513 (trunk libT) Remove UNUSED attribute, the function argument is being used 2009-01-01 18:36:58 +00:00
Charles Kerr e5fc032d9c (trunk libT) Remove unused field: struct tr_peermsgs::peerSentBitfield 2009-01-01 18:35:21 +00:00
Erick Turnquist e9f32d7523 (trunk libT) < Rolcol> For example: I have a lot of addresses in the message
log as "funny looking address" as something like ::ffff:192.168.1.1

These were coming from pex6. Apparently there is a client out there that sends
us IPv4 peers in mapped form. It's valid, but a little strange...
2009-01-01 00:34:44 +00:00
Erick Turnquist bd5463a37e (trunk libT) fix another endian oops 2009-01-01 00:23:09 +00:00
Erick Turnquist 37ac4b3fbf (trunk libT) fix endian oops in tr_suspectAddress() 2009-01-01 00:15:15 +00:00
Erick Turnquist 50d73a884f (trunk libT) Stop trying to connect to multicast addresses. Also, bump "funny
looking address" messages from tr_dbg to tr_err so I can get bug reports with
the message for once!
2008-12-31 21:25:52 +00:00
Charles Kerr 618949aded (trunk libT) take the timeout condition out of tr_bandwidthAllocate(). This may have the short-term effect of adding 1.41's `freeze' behavior into trunk for a bit. Yay! 2008-12-31 21:15:22 +00:00
Charles Kerr 5381e20e9b (trunk libT) improve piece verification speed by providing a larger buffer, and add a mechanism to reuse it when verifying an entire torrent at once. 2008-12-31 18:08:13 +00:00
Charles Kerr 2ea88f30f5 (trunk libT) make the evbuffer pool threadsafe 2008-12-31 14:29:28 +00:00
Charles Kerr 217d3d3c91 (trunk libT) this diff has held #1631 at bay for 18 hours now... is it finally fixed? :) 2008-12-31 14:28:20 +00:00
Charles Kerr 1bcc998694 (trunk libT) fix a couple of minor memory leaks 2008-12-30 22:19:52 +00:00
Charles Kerr 6bec82d0a6 (trunk libT) have tr_bencSaveAsJSON() use an evbuffer 2008-12-30 22:07:39 +00:00
Charles Kerr 71864c18e2 (trunk libT) blockIteratorNew() was overallocating much more memory than it used. 2008-12-30 21:18:30 +00:00
Charles Kerr 20e1222078 (trunk libT) patch from wereHamster to recycle the zlib deflate stream s.t. we don't have to keep reallocating it 2008-12-30 20:40:48 +00:00
Charles Kerr ad69a937ef (trunk libT) have a pool of reusable evbuffers 2008-12-30 20:32:00 +00:00
Charles Kerr 53b25c7b49 (trunk libT) patch from wereHamster to simplify BT message parsing 2008-12-30 19:44:49 +00:00
Charles Kerr 694a980348 (trunk daemon) #1618: patch from er13 to make transmission-daemon's encryption, port, and peer limit command-line arguments similar to transmission-remote's 2008-12-30 18:18:34 +00:00
Charles Kerr 56d04f76ad (trunk libT) use a static buffer for fillOutputBuffer() 2008-12-30 08:25:39 +00:00
Charles Kerr 2b4193b200 (trunk libT) remove obsolete tr_peerMgr.c's getConnectedPeers() 2008-12-30 08:20:16 +00:00
Charles Kerr f2d9179b64 (trunk libT) #1632: bandwidth.c: 428: tr_bandwidthUsed: Assertion `tr_isBandwidth( b )' failed 2008-12-30 03:45:12 +00:00
Charles Kerr d463cdb509 (trunk libT) eliminate a couple more unnecessary malloc() + free() pairs 2008-12-30 03:29:09 +00:00
Charles Kerr 1c71e622e1 (trunk libT) minor cleanup: use symbolic name instead of magic numbers; use tr_bool instead of int 2008-12-30 02:43:51 +00:00
Charles Kerr 640c952ce8 (trunk libT) fix r7535 bug reported by Rolcol 2008-12-30 02:42:45 +00:00
Charles Kerr cad0ec892c (trunk libT) avoid an unnecessary evbuffer_new() + evbuffer_free() pair in message logging 2008-12-30 02:36:17 +00:00
Charles Kerr 68ad6f452c (trunk libT) probable fix for #1631 2008-12-30 01:02:53 +00:00
Charles Kerr f761311018 (trunk libT) avoid a few more unnecessary malloc() + free() pairs 2008-12-30 00:56:10 +00:00
Charles Kerr 246efcbca2 (trunk libT) fix obsolete `iobuf' reference. (wereHamster) 2008-12-29 21:19:31 +00:00
Charles Kerr a8e15578f3 (trunk libT) use torrent's unique ID as the torrent's lookup key 2008-12-29 21:17:48 +00:00
Charles Kerr eff510da18 (trunk libT) simplify web.c's remove_finished_tasks() a bit 2008-12-29 19:02:12 +00:00
Charles Kerr 798bac0fcb (trunk libT) omit unnecessary malloc/free calls in peer-io 2008-12-29 19:01:47 +00:00
Charles Kerr 9ea0489471 this should've been in r7529 2008-12-29 18:12:25 +00:00
Charles Kerr 415f04059f (trunk libT) wrap tr_inf(), tr_msg(), tr_dbg() calls inside a check to see if that debugging level is active. That way that function calls in the vararg list won't be invoked unless that level of verbosity is actually turned on. 2008-12-29 18:11:56 +00:00
Charles Kerr c52d9fedab (trunk libT) avoid some unnecessary memory fragmentation... for composited objects that have a tr_publisher, contain the it directly rather than a pointer to one allocated elsewhere on the heap. 2008-12-29 18:10:07 +00:00
Charles Kerr 3a01d2e619 (trunk libT) recycle the tr_list nodes when possible 2008-12-29 17:28:14 +00:00
Charles Kerr e7ffb4da03 Add "SD" to the clients list as Xunlei as reported by malucas72 in the forums. 2008-12-29 16:34:59 +00:00
Charles Kerr 7a4002dd3a (trunk libT) avoid some unnecessary memory fragmentation... for composited objects that have a tr_bitfield, contain it directly rather than a pointer to one allocated elsewhere on the heap. 2008-12-29 09:51:54 +00:00
Charles Kerr 427f639664 (trunk libT) avoid some unnecessary memory fragmentation... for composited objects that have a tr_ptrArray, contain the tr_ptrArray directly rather than a pointer to one allocated elsewhere on the heap. 2008-12-29 08:54:36 +00:00
Charles Kerr db381a5e40 (trunk libT) revert #7517 since it didn't do any good. disable http connection reuse. 2008-12-29 07:51:09 +00:00
Charles Kerr 1582135e3c (trunk libT) experimental test for #1631 in web.c::setsock() 2008-12-26 20:14:47 +00:00
Charles Kerr f0efd7fea8 (trunk libT) #1627: OSX mutex lockup in 141 and up to 7490 2008-12-24 17:45:27 +00:00
Charles Kerr 6f8e5352ab (trunk libT) fix connectivity error reported by Stargazer. Also, add more debug statements to track down errors like this in the future 2008-12-24 02:50:08 +00:00
Charles Kerr 460f862dbc (trunk libT) add yet another ACL diagnostic message 2008-12-23 21:34:07 +00:00
Charles Kerr dfcc9173e5 (trunk libT) #include "session.h" cleanup from wereHamster 2008-12-23 17:27:15 +00:00
Charles Kerr 82d349d221 (trunk libT) fix minor r7474 issue 2008-12-23 17:23:07 +00:00
Charles Kerr c4e11a12e3 (trunk libT) socket performance tweak by wereHamster 2008-12-23 17:11:31 +00:00
Charles Kerr 303356d110 (trunk) #1029: When removing local data only remove data from the torrent 2008-12-23 16:04:11 +00:00
Charles Kerr 5d1c109fc4 (trunk libT) speed improvments from wereHamster 2008-12-22 19:16:06 +00:00
Charles Kerr 55f263312f (trunk) patch from wereHamster to finish off tr_handle 2008-12-22 19:14:43 +00:00
Charles Kerr 94a491aefb (trunk libT) remove unused functions tr_list_insert_sorted(), tr_list_foreach(). make tr_list_find_data() private. 2008-12-22 17:35:10 +00:00
Charles Kerr d142a075c4 (trunk libT) fix a Windows portability bug reported by Alexey 2008-12-22 05:19:52 +00:00
Charles Kerr 1310fea91e (trunk libT) peer-io.c: remove dead code and get rid of a couple of GOTOs 2008-12-22 04:55:07 +00:00
Charles Kerr acdd8c860c (trunk libT) minor cleanups found while diffing for backport to 1.4x in r7455 2008-12-22 00:52:44 +00:00
Charles Kerr 32ebb868e7 (trunk libT) one more ACL warning 2008-12-21 19:35:38 +00:00
Charles Kerr d39354c306 (trunk libT) add html and console hints about whitelist status & configuration 2008-12-21 19:23:41 +00:00
Erick Turnquist 38efb62100 add some debugging stuff to track down where some bogus addresses are coming from 2008-12-21 19:13:52 +00:00
Charles Kerr 2b0ece7614 (trunk libT) remove tr_peermsgs.minActiveRequests based on wereHamster's feedback 2008-12-21 18:31:28 +00:00
Charles Kerr 8556ce653f (trunk libT) comments, tr_bool correctness, better runtime tests. 2008-12-21 18:15:00 +00:00
Charles Kerr fefa352b11 (trunk libT) remove unused PEER_PULSE_INTERVAL 2008-12-21 17:51:46 +00:00
Charles Kerr f77ae353bb (trunk) configure.ac portability tweak suggested by fulgas 2008-12-21 00:22:41 +00:00
Charles Kerr cb5d259f21 (trunk libT) fix an r7441 function pointer error reported by fulgas in #transmission 2008-12-21 00:05:54 +00:00
Charles Kerr 72ded3b272 try to rework the bandwidth code yet again s.t. it satisfies all three: (1) fairly distributes bandwidth across all peers, (2) scales well in high-bandwidth situations, (3) is good at hitting and staying at bandwidth limits/goals 2008-12-20 22:19:34 +00:00
Erick Turnquist a68764fcba (trunk libT) Don't log two "errors" we expect to see from time-to-time.
EAFNOSUPPORT: On OS X, socket() incorrectly throws EAFNOSUPPORT for certain
IP/Port combinations. There is nothing we can do about this.

ENETUNREACH: #1606 is evidence that some trackers return IPv6 peers when
contacted over IPv4. This code will silently ignore "network unreachable"
errors for IPv6 connections.
2008-12-20 08:51:32 +00:00
Erick Turnquist 49b84fb805 (trunk libT) make sure we don't block IPv6 peers, which aren't included in bluetack bocklists 2008-12-20 02:56:44 +00:00
Erick Turnquist 72ee19dcca (trunk libT) Refactor ipv6 bind socket check
This will let the RPC server use the same test mechanism eventually. Networking code belongs in net.c anyway.
2008-12-18 05:55:22 +00:00
Charles Kerr 53b730420f another test commit for vraa.. this is just an experiment; probably eats a lot of memory 2008-12-18 03:27:07 +00:00
Charles Kerr d4b4f39754 test commit for vraa 2008-12-18 03:22:08 +00:00
Charles Kerr d125ebd86a (trunk libT) turn off some testing log messages 2008-12-17 14:15:19 +00:00
Charles Kerr 3a61b0c6eb (trunk libT) tweak the new peer IO code a bit to handle EINPROGRESS 2008-12-17 13:29:03 +00:00
Charles Kerr de24179d05 (trunk libT) fix assertion error reported by Rolcol earlier today in #transmission 2008-12-17 03:38:02 +00:00
Erick Turnquist be4dc0d674 (trunk libT) use an enum tr_address_type instead of uint8_t for tr_address.type 2008-12-17 01:39:24 +00:00
Charles Kerr 1a7ab297ea (trunk libT) more runtime safety checks 2008-12-16 23:31:05 +00:00
Charles Kerr 69b8caa93b (trunk libT) yet another assertion commit 2008-12-16 22:52:04 +00:00
Charles Kerr 15ecde281b (trunk libT) fix jhujhiti's pex crash 2008-12-16 22:28:19 +00:00
Charles Kerr a94e104040 (trunk libT) really fuck up the peer i/o code. also this breaks the mac build until someone removes iobuf.c from libtransmission's list of files. 2008-12-16 22:08:17 +00:00
Erick Turnquist 2d427751d6 fix another bad assert *eyes charles* 2008-12-16 21:44:53 +00:00
Erick Turnquist 0a2c5efb65 Fix "ISO C90 forbids mixed declarations and code" 2008-12-16 21:35:14 +00:00
Erick Turnquist 86257e03f1 Fix tr_isAddress() 2008-12-16 21:28:06 +00:00
Charles Kerr 31e49df302 (trunk libT) add a similar check to the peer->addr in the place where crash is occurring 2008-12-16 21:12:14 +00:00
Charles Kerr de5228c415 (trunk libT) more runtime safety checks 2008-12-16 21:06:47 +00:00
Charles Kerr 56663b860b (trunk libT) add more startup debug messages in the RPC server 2008-12-16 16:13:21 +00:00
Charles Kerr 748a9f1c92 (trunk libT) add some assertions to tr_compareAddresses() 2008-12-16 06:46:27 +00:00
Charles Kerr 3739f5c72c (trunk libT) fix oops: accidentally committed an fprintf() debug message. hi, titer. 2008-12-16 06:35:51 +00:00
Charles Kerr 07f0efe8e1 maybe make hudson-t's trunk linux builds happy 2008-12-16 01:11:54 +00:00
Charles Kerr 48c7c65f1b (trunk libT) fix build error reported by KyleK and hudson-t 2008-12-16 00:57:24 +00:00
Charles Kerr 9594112d27 updated email address 2008-12-16 00:20:44 +00:00
Charles Kerr e813ea69ab (trunk libT) probable fix for the "greedy peer" bug 2008-12-15 21:22:08 +00:00
Charles Kerr 4e33fd5467 try to make hudson-t happy 2008-12-15 20:26:26 +00:00
Charles Kerr 41ea885946 put the consts back in to make jhjhiti happy 2008-12-15 04:37:44 +00:00
Charles Kerr 2e8d3a6b61 15:11 < jhujhiti> charles_: there are no bugs 2008-12-15 04:34:06 +00:00
Charles Kerr 54be88dec3 (trunk libT) add ipv6 support by jhujhiti. I think this is the largest user-contributed patch we've ever used... thanks jhujhiti :) 2008-12-15 00:17:08 +00:00
Charles Kerr a9f8c517a0 (trunk) fix gtk bug of not remembering users' settings for per-torrent peer limits 2008-12-14 22:57:08 +00:00
Charles Kerr 4f9ae41046 (trunk libT) fix type error reported by JhuJhiti 2008-12-14 22:48:11 +00:00
Charles Kerr 788b397ecc (trunk libT) more semantic cleanup: tr_handle->tr_session, int->tr_bool, int->tr_port 2008-12-14 11:21:11 +00:00
Charles Kerr e56643d7e7 (trunk daemon) added --dump option to dump the settings to stderr and exit. 2008-12-14 01:22:06 +00:00
Charles Kerr d52631cb67 (trunk libT) #1595: Always search in PACKAGE_DATA_DIR when serving Web files 2008-12-14 01:19:50 +00:00
Mitchell Livingston 02521f4bf8 simplify the "randomize port" text 2008-12-14 00:50:41 +00:00
Mitchell Livingston 2707962707 #1559 Simplify tr_sessionInitFull - Mac client 2008-12-14 00:31:33 +00:00
Charles Kerr 78a68337fd (trunk libT) remove unneeded key 2008-12-14 00:23:00 +00:00
Charles Kerr f1419a95c0 (trunk libT) semantic cleanup: int -> tr_bool 2008-12-13 23:39:12 +00:00
Charles Kerr 6b0d98a695 (trunk) #1559: Simplify tr_sessionInitFull 2008-12-13 23:17:36 +00:00
Charles Kerr 35f40bdfa6 (trunk libT) #1593: Setting upload to 0 kills all download 2008-12-13 22:52:15 +00:00
Charles Kerr 0272708d32 (trunk libT) remove a couple of redundant and/or unused fields from struct peer_atom and tr_peermsgs. 2008-12-12 02:44:21 +00:00
Charles Kerr 0471e6d765 (trunk libT) make tr_bencDictMerge() support limited nested merges 2008-12-12 02:26:33 +00:00
Charles Kerr 72b9845a5e (trunk libT) #1559 (partial): add tr_bencDictMerge() + unit tests. patch by KyleK and charles_ 2008-12-12 02:12:17 +00:00
Charles Kerr 451058d5cd (libT) add some documentation about the three separate peer structs and how they are related. 2008-12-11 17:02:34 +00:00
Charles Kerr 65fe66c470 (trunk libT) fix bug which caused libtransmission to hold onto nonproductive peers for longer than it should've 2008-12-11 07:04:46 +00:00
Mitchell Livingston 7b17087c70 #1157 ability to pick a random port in libtransmission; mac preference to pick a random port on launch and on button click 2008-12-11 04:41:23 +00:00
Charles Kerr 23b8321463 (trunk libT) back out the changes for #1580; closing that ticket as invalid 2008-12-11 00:39:47 +00:00
Charles Kerr 4ad84bb275 (rpc) #1584: include version in session-get response 2008-12-10 21:46:24 +00:00
Charles Kerr 7403048738 (trunk libT) #1580: use a 65K read buffer for the hash check, even for embedded systems. 2008-12-10 13:57:21 +00:00
Charles Kerr 9f1709352b (trunk libT) make the upnp description a little easier to differentiate between separate instances of Transmission 2008-12-10 06:12:04 +00:00
Charles Kerr 6e66d09fbf (trunk libT) fix minor r7266 oops that could keep us from disconnecting if we made a peer connection to ourself 2008-12-10 05:20:28 +00:00
Charles Kerr 8eecf37a54 (trunk libT) #1580: increase the read buffer for the "verify local data" reader to make it a little faster 2008-12-10 03:45:57 +00:00
Charles Kerr 0a63e94096 (trunk libT) fix r7336 oops reported by RolCol, m1b, and KyleK 2008-12-10 03:44:20 +00:00
Charles Kerr 7eee937c56 (trunk libT) experimental code to try & fix the "one torrent / one peer eats all my bandwidth" issue reported in the forums & irc 2008-12-09 22:05:45 +00:00