Commit Graph

10572 Commits

Author SHA1 Message Date
Jordan Lee 758da07fe9 (trunk libT) more heap pruning: avoid an unnecessary malloc() + strcmp() + free() when parsing the initial handshake string from a peer 2011-04-05 18:16:21 +00:00
Jordan Lee e02ce61d3e (trunk gtk) removed the unused MC_NAME column from the torrent GtkListStore. 2011-04-05 17:00:38 +00:00
Jordan Lee b8d1bb3f6e (trunk libT) when processing errors in peer-io.c's event_read_cb() and tr_peerIoTryRead() functions, don't call tr_net_strerror() unless logging is turned on s.t. the string will be used. 2011-04-05 16:46:13 +00:00
Jordan Lee 3ba9796f4b (trunk libT) when processing an error in tr_peerIoTryWrite(), don't call tr_net_strerror() unless logging is turned on s.t. the string will be used. 2011-04-05 16:34:49 +00:00
Jordan Lee fb2ffbc542 (trunk gtk) use GQuarks instead of strings for keys in tr-icon and tr-window 2011-04-05 16:16:06 +00:00
Jordan Lee c213d91ffd (trunk gtk) use GQuarks instead of strings for keys in the filterbar's key/value pairs 2011-04-05 15:59:41 +00:00
Jordan Lee 708838b146 (trunk gtk) more heap pruning: in the main window's torrent list, only update the case-insensitive "collated name" of a torrent when the torrent's metadata changes (such as when a magnet link's metadata finishes downloading). 2011-04-05 15:41:51 +00:00
Jordan Lee afa016704f (trunk libT) more heap pruning: use a hash, rather than an allocated string in tr-core when watching for a torrent's tracker list to change 2011-04-05 01:36:37 +00:00
Jordan Lee 46dd6f17ab (trunk libT) oops, r12313 committed the wrong version of list.c 2011-04-05 00:59:49 +00:00
Jordan Lee e0f6ade71e (trunk libT) keep a pool of reusable tr_list nodes 2011-04-05 00:56:56 +00:00
Jordan Lee 1e0f92ba78 (trunk libT) Use tr_strndup() instead of tr_strdup() in tr_urlParse() to avoid a couple of strlen() calls 2011-04-05 00:55:09 +00:00
Jordan Lee ac3ec2db39 (trunk libT) use alloca() for allocating the block array in updateBlockRequests() 2011-04-05 00:53:57 +00:00
Jordan Lee 85f853f214 (trunk libT) #4165 "crash on startup introduced in r12262" -- experimental commit 2011-04-05 00:29:42 +00:00
Jordan Lee c14b6bdf03 (trunk libT) remove redundant assert()s 2011-04-05 00:26:31 +00:00
Jordan Lee 492d208dc8 (trunk libT) remove unnecessary memmove()s from rechokeDownloads() 2011-04-05 00:24:25 +00:00
Jordan Lee 17894f258c remove unneeded include 2011-04-04 21:42:04 +00:00
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