1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-26 17:47:37 +00:00
Commit graph

10706 commits

Author SHA1 Message Date
Jordan Lee
d233ea82e7 (trunk gtk) more heap pruning: avoid unnecessary malloc() + free() calls in gtr_get_host_from_url() 2011-04-04 16:54:09 +00:00
Jordan Lee
94e11008b9 (trunk libT) more heap pruning: avoid an unnecessary malloc() + free() when encrypting outbound messages 2011-04-04 16:53:15 +00:00
Jordan Lee
40b2ad63d9 (trunk libT) avoid an unnecessary malloc() + free() call when we finish downloading a block.
Pre-libevent2, this free() was useful in helping keep the peer's incoming piece data buffer from growing too large because that could be a significant amount of wasted space given enough peers. However now that we're using the libevent2 code, that piece data buffer gets handed off to the block cache, so most of the time we're freeing an evbuffer that doesn't have any inernal chains allocated anyway.
2011-04-04 05:15:54 +00:00
Jordan Lee
525d854016 (trunk libT) when reading piece data in from a socket, avoid two unnecessary calls to memcpy() 2011-04-04 04:45:41 +00:00
Mitchell Livingston
3e451b2bf9 small cleanup when determining if two announce URLs differ only by scheme 2011-04-03 03:25:13 +00:00
Jordan Lee
5bee93361b (trunk libT) fix UMR bug reported by wereHamster 2011-04-02 23:33:51 +00:00
Juliusz Chroboczek
232075f547 Reinstate including tcp.h in net.c.
Removed in r12225, this broke netSetCongestionControl.
2011-04-02 16:43:17 +00:00
Jordan Lee
4a47e3c869 (trunk libT) don't bother calling rechokeUploads() and rechokeDownloads() on torrents which have no peers. 2011-04-02 08:35:47 +00:00
Jordan Lee
616bde8c5b (trunk libT) #4138 "use stdbool.h instead of tr_bool" -- fix watch.c error reported by zebulon501 in trac. :) 2011-04-02 07:46:37 +00:00
Jordan Lee
11c4194da8 (trunk libT) better multiscrape 2011-04-02 07:44:19 +00:00
Jordan Lee
0245703634 (trunk libT) tr_torrentGetFileMTime() used to require two stat() calls.. now it only requires one. 2011-04-02 07:36:34 +00:00
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