1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-30 19:46:56 +00:00
Commit graph

10595 commits

Author SHA1 Message Date
Jordan Lee
e5a6641bda (trunk libT) tr_torrentFindFile2(): avoid an unnecessary malloc() + free() if the file we're looking for is complete and doesn't have a ".part" suffix 2011-04-02 03:31:41 +00:00
Jordan Lee
2328456a4a (trunk libT) simplify tr_torrent's hasAnyLocalData() to be more readable, and also to avoid yet another unnecessary malloc() and free() 2011-04-01 04:33:35 +00:00
Jordan Lee
c54f469c39 (trunk libT) more malloc pruning. *yawn*
tr_metainfoGetBasename(): avoid an unnecessary malloc() + free()
getannounce(): avoid an unnecessary malloc() + free() per each tracker
2011-04-01 04:13:51 +00:00
Jordan Lee
a2ee9f8d50 (trunk libT) avoid an unnecessary malloc/free in tr_urlIsValidTracker() and tr_urlIsValid() 2011-04-01 03:23:55 +00:00
Jordan Lee
0fffd84f65 (trunk libT) copyediting in resume.c 2011-04-01 03:13:44 +00:00
Jordan Lee
2e05d830e5 (trunk libT) streamline parsing the metainfo's file list 2011-04-01 03:09:24 +00:00
Jordan Lee
cdabd1b5eb (trunk libT) since the JSON parser gives us the string's length, we can call tr_strndup() instead of tr_strdup() 2011-04-01 03:07:43 +00:00
Jordan Lee
4184f73c99 (trunk gtk) remove tr-torrent.c from POTFILES.in 2011-04-01 03:06:30 +00:00
Mitchell Livingston
8fc3bb37e7 update to 2.30b1 2011-04-01 01:21:59 +00:00
Mitchell Livingston
034d9a4964 update jQuery to 1.5.2 2011-03-31 21:52:30 +00:00
Mitchell Livingston
5488c70103 update German localization for 2.3 2011-03-31 21:43:53 +00:00
Jordan Lee
873396de2d (trunk libT) announcer.c: fold the tiers and trackers into fewer mallocs/frees 2011-03-31 20:26:43 +00:00
Jordan Lee
65f0f3effd (trunk libT) copyediting: peer-io's "EncryptionMode" type had a name too similar to tr_encryption_mode... rename it to reduce potential confusion 2011-03-31 16:41:52 +00:00
Jordan Lee
e6c0bdef6a (trunk libT) save 48 bytes per tr_torrent object. whoo! 2011-03-31 16:08:31 +00:00
Jordan Lee
1b02eb8641 (trunk libT) use aggregation for the tr_bandwidth objects owned by tr_session and tr_torrent 2011-03-31 14:53:22 +00:00
Mitchell Livingston
f481fd433a update Russian localization to 2.30 2011-03-31 12:33:26 +00:00
Jordan Lee
a680c4b6cb (trunk libT) fix never-executed code branch detected by clang static analyzer 2011-03-31 05:06:19 +00:00
Jordan Lee
c16406bf7c (trunk gtk) remove "dead nested assignment" wart detected by clang static analyzer 2011-03-31 04:58:38 +00:00
Jordan Lee
0c2dce9da7 (trunk libT) remove dead logic branch detected by clang static analyzer 2011-03-31 04:33:49 +00:00
Jordan Lee
0d593d3254 (trunk libT) fix "dangerous pointer arithmetic" warning detected by clang static analyzer 2011-03-31 04:24:57 +00:00
Jordan Lee
d8e28ec284 (trunk libT) fix minor dead store detected by clang static analyzer 2011-03-31 04:03:07 +00:00
Jordan Lee
bb561b5494 (trunk libT) fix ABR detected by clang static analyzer in tr_torrentStat.
When copying a value to s->errorString, it used memcpy(a,b,sizeof(a)) where sizeof(a) was larger than sizeof(b). Fixed by replacing the memcpy() call with tr_strlcpy().
2011-03-31 04:01:55 +00:00
Jordan Lee
5dd9b4a993 (trunk libT) fix potential UMR detected by clang static analyzer: maxPeers could be uninitialized in some pathological logic branches 2011-03-31 03:59:44 +00:00
Jordan Lee
c8bec40e3f (trunk libT) fix potential null pointer dereference in announcer.c 2011-03-31 03:37:50 +00:00
Jordan Lee
c7a43efc2b (trunk libT) fix file descriptor leak in tr-dht.c 2011-03-31 03:37:24 +00:00
Jordan Lee
38669a6c3b (trunk libT) #4153 "Protect against non-monotonic time in libutp" -- try again. 2011-03-30 23:54:39 +00:00
Jordan Lee
7aa90a3812 (trunk libT) #4153 "Protect against non-monotonic time in libutp" -- another attempt at getting it to compile on win32 2011-03-30 23:50:25 +00:00
Jordan Lee
4cf4000620 (trunk libT) #4153 "Protect against non-monotonic time in libutp" -- move UTP_GetMilliseconds() and UTP_GetMicroseconds() outside of the if-not-windows ifdef section. Based on feedback from rb07 in ticket comment 5 2011-03-30 23:26:00 +00:00
Jordan Lee
e8c22599cb (trunk daemon) fix minor text formatting bug when the ETA is being shown in seconds 2011-03-30 23:11:10 +00:00
Jordan Lee
7e21116e3c (trunk libT) #4157 "'transmission-remote -si' doesn't show alternate download speeds correctly" -- fixed. 2011-03-30 21:19:14 +00:00
Jordan Lee
98633b4145 (trunk daemon) #4156 "request: transmission-remote --session-info report whether µTP is enabled" -- added. 2011-03-30 16:24:45 +00:00
Jordan Lee
210068410d (trunk libT) merge tr_bitfieldTestFast() and tr_bitfieldTest() 2011-03-30 04:23:20 +00:00
Jordan Lee
3660c44934 (trunk libT) handle situations where we don't know the bitfield's upper bound in advance. This comes up sometimes with magnet links. 2011-03-30 04:14:57 +00:00
Juliusz Chroboczek
7b06392812 Don't explicitly protect against non-monotonic gettimeofday.
Since we're now protecting against non-monotonic time unconditionally,
there's no need for additional protection in the gettimeofday case.
2011-03-30 00:29:07 +00:00
Juliusz Chroboczek
c0ef0f50ad Protect against monotonic time being non-monotonic, take 2.
This is a better fix, suggested by ghazel.
2011-03-30 00:14:41 +00:00
Juliusz Chroboczek
74c0721a2c Protect against monotonic time being non-monotonic.
Within utp.cpp, there's a bunch of assertions that will cause us
to crash if monotonic time isn't.  While I have no idea about Windows,
under Unix we use real time instead of monotonic time if POSIX clocks
are not available, and real time can be stepped backwards.  Since the
protection is cheap, we perform it on all platforms.
2011-03-29 23:15:38 +00:00
Jordan Lee
3043893968 (trunk libT) fix endgame detection bug introduced in r12248 2011-03-29 22:02:27 +00:00
Jordan Lee
3e2aee0c02 (trunk libT) fix a crasher introduced yesterday in r12248 2011-03-29 21:10:20 +00:00
Jordan Lee
72c55fcdd8 (trunk libT) safeguard against a minor memory leak if io->sokcet couldn't be opened. 2011-03-29 21:09:37 +00:00
Jordan Lee
66d60160b3 (trunk libT) fix bitfield.c assertion failure reported by Rolcol 2011-03-29 16:39:30 +00:00
Jordan Lee
4230cd7786 (trunk libT) don't cache unininteresting peer addresses between sessions
For example, if we're both seeds, or if the peer is not connectible, don't bother caching it for the next session. If it's still alive, we'll find it up through DHT or tracker announces next time around. As with r12253, this commit's intention is to reduce the number of unproductive peer_atoms that we waste time trying to connect to.
2011-03-29 15:23:54 +00:00
Jordan Lee
9f122a021a (trunk libT) better scrape management on private trackers.
If a private tracker scrape says that there are no downloaders in the swarm, mark all the peers in the private swarm as seeds. This can greatly reduce unnecessary overhead on large seedboxes. We don't do this same trick on public torrents, since a public tracker won't know of all the peers.
2011-03-29 15:18:25 +00:00
Jordan Lee
5fcec12cfd (trunk libT) fix bitfield assertion failure due to invalid assumption in tr_bitfieldIsValid() 2011-03-29 01:47:17 +00:00
Jordan Lee
947134bbb3 (trunk libT) more completion and bitfield cleanup: (1) fix regression in tr_cpSizeWhenDone() reported by Waldorf, (2) make simple one-liner functions inlined 2011-03-29 01:17:18 +00:00
Jordan Lee
033845babc (trunk mac) delete bitset.[ch] from the xcode file. No, I don't know what I'm doing, but what's the worst that could happen, it could break the build... :) 2011-03-28 16:46:57 +00:00
Jordan Lee
7445be9a53 (trunk libT) whoops, remove 4 debugging fprintf()'s from the previous commit 2011-03-28 16:33:40 +00:00
Jordan Lee
83c0e4f011 (trunk libT) break the mac build and introduce new crashes.
This is partially to address #4145 "Downloads stuck at 100%" by refactoring the bitset, bitfield, and tr_completion; however, the ripple effect is larger than usual so things may get worse in the short term before getting better.

livings124: to fix the mac build, remove bitset.[ch] from xcode
2011-03-28 16:31:05 +00:00
Jordan Lee
1101ba8d57 (trunk libT) strip trailing whitespace 2011-03-28 13:37:46 +00:00
Jordan Lee
6c845ba5f4 (trunk libT) fix memory leak in tr_utf8clean()'s utility function to_utf8() 2011-03-28 03:45:31 +00:00
Mitchell Livingston
7a7636a872 drop two NSLogs 2011-03-27 22:10:03 +00:00