Commit Graph

392 Commits

Author SHA1 Message Date
Jordan Lee 4ecf0d36d1 (trunk libT) use tr_malloc() instead of malloc() in tr_loadFile() and in the fallback code for tr_valloc() 2011-04-27 16:12:17 +00:00
Jordan Lee f37da42a8c (trunk libT) fix ABR error when parsing a URL with no path and no trailing slash after the host. Error reported by livings124 2011-04-05 22:21:18 +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 a2ee9f8d50 (trunk libT) avoid an unnecessary malloc/free in tr_urlIsValidTracker() and tr_urlIsValid() 2011-04-01 03:23:55 +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
Jordan Lee 1650a4730c (trunk libT) copyediting: yes, removing more unnecessary #includes 2011-03-25 06:20:12 +00:00
Jordan Lee 1b825079be (trunk libT) API cleanup of the tr_address functions to make them more consistent.
This is loosely related to #2910, but only in the sense of laying the groundwork for #2910's fix...
2011-03-25 05:34:26 +00:00
Jordan Lee 1304aa0079 (trunk libT) still fiddling around with #includes -- this time removing unncecessary libT includes from libT .c files 2011-03-25 01:41:57 +00:00
Jordan Lee 375694eda9 (trunk) copyediting: remove some unneeded #includes, and annotate some needed ones 2011-03-24 21:49:42 +00:00
Jordan Lee 48212fa0b9 (trunk libT) tr_strtruncd() is only used in one place, so make it a private function there instead of leaving it public in utils.h 2011-03-22 23:46:31 +00:00
Jordan Lee 14277760d7 (trunk libT) tr_set_compare() is only used in one place, so make it a private function there instead of leaving it public in utils.h 2011-03-22 23:42:25 +00:00
Jordan Lee b4d36aeb54 (trunk) #4138 "use stdbool.h instead of tr_bool" -- done. 2011-03-22 15:19:54 +00:00
Jordan Lee a9f1c9a5a6 (trunk libT) tweak comments to fix inconsistent capitalization 2011-03-20 15:56:32 +00:00
Jordan Lee b16458e038 (trunk libT) #117 "UDP tracker support" -- fix add-UDP-tracker-URL-via-RPC bug reported by johnea @ https://trac.transmissionbt.com/ticket/117#comment:79 2011-03-20 15:42:54 +00:00
Jordan Lee 6ae220dee0 (trunk libT) tr_udpParse(): default to port 80 for URLs with a udp scheme and no explicit port. 2011-03-17 21:22:58 +00:00
Jordan Lee 374ed10f3b (trunk) it's bad form to #include so many system headers in libtransmission/utils.h... 2011-03-16 18:04:23 +00:00
Jordan Lee 4fc6c1ada2 (trunk libT) add attribution for the fallback tr_htonll() and tr_ntohll() code 2011-03-13 20:39:08 +00:00
Jordan Lee 58c084fbda (trunk libT) better implementation of tr_htonll() and tr_ntohll() 2011-03-13 20:23:23 +00:00
Jordan Lee 075a0a8b86 (trunk libT) use libevent's portability wrapper for strcasecmp() 2011-03-13 08:21:55 +00:00
Jordan Lee 7a24257d00 (trunk libT) tweaks by werehamster 2011-03-13 05:45:34 +00:00
Jordan Lee 3cfef5eded (trunk libT) #117 "UDP tracker protocol support" -- working implementation; needs testing and valgrinding and review. 2011-03-13 00:18:11 +00:00
Jordan Lee 020bde5ce6 (trunk libT) a bit of futzing: remove a few more unnecessary casts from void* 2011-03-03 21:51:11 +00:00
Jordan Lee 2b8124d3ad (trunk) #4019 "Minor patch, kill useless casts in transmission source." -- fixed. patch by jlouis
jlouis used Coccinelle to scan transmission's source for redundant code that casts a type to its own type.
2011-02-12 17:27:47 +00:00
Jordan Lee 392df7ceb8 (trunk libT) #3969 "tr_base64_encode() has unnecessary overhead with linefeeds" -- fixed.
Don't add linefeeds to base64-encoded data. We don't need it and it just increases the length of the string, which is typically sent over the network to an RPC client.
2011-01-31 22:47:07 +00:00
Jordan Lee f2f08f5469 (trunk libT) more NULL ptr safeguards 2011-01-27 18:54:25 +00:00
Jordan Lee 35515ee424 (trunk libT) NULL ptr safeguard 2011-01-27 05:00:09 +00:00
Jordan Lee 53f7fbb039 (trunk libT) #3927 "Use of libevent2 evbuffer_write on files..."
evbuffer_write() is intended for sockets. It works for files on Unix, but not on Windows, so we can't portably use it on files. Instead, use evbuffer_pullup() + write().
2011-01-22 13:33:05 +00:00
Jordan Lee 06884387da (trunk) #3914 "strlsize() passes variable of incompatible type to the tr_formatter_size_B()" -- fixed. 2011-01-19 18:14:01 +00:00
Jordan Lee 879a2afcbd Update the copyright year in the source code comments.
The Berne Convention says that the copyright year is moot, so instead of adding another year to each file as in previous years, I've removed the year altogether from the source code comments in libtransmission, gtk, qt, utils, daemon, and cli.

Juliusz's copyright notice in tr-dht and Johannes' copyright notice in tr-lpd have been left alone; it didn't seem appropriate to modify them.
2011-01-19 13:48:47 +00:00
Jordan Lee cc428376e9 (trunk libT) in deep logging, use evbuffer_write() instead of fwrite() 2011-01-06 02:33:39 +00:00
Jordan Lee 35cf5e4a32 (trunk libT) Fix posix_memalign() unused result warning. inspired by ijuxda's 08b0c5b 2011-01-06 02:17:22 +00:00
Charles Kerr b223a33b73 (trunk libT) fix crash reported by KyleK 2011-01-03 03:01:12 +00:00
Charles Kerr 21ca9e7770 (trunk libT) since messageLevel is a global variable, giving it a unique "tr_" prefix is a nice safeguard 2010-12-31 01:30:35 +00:00
Charles Kerr e5bb3205a1 (trunk) Join the 21st century and use only 1 space at the end sentences. This commit is nearly as important as the semi-annual ones that remove trailing spaces from the ends of lines of code... :) 2010-12-27 19:18:17 +00:00
Charles Kerr 81cb2276c8 (trunk gtk) #3844 "error popup when adding a relative path" -- fixed. initial patch by ijuxda. 2010-12-22 07:04:11 +00:00
Charles Kerr 345b14adbc (trunk) #3836 "libevent2 support" -- bump libevent2 requirement to 2.0.10. This will break the Mac build for a minute intil BMW applies his Mac patch 2010-12-20 02:07:51 +00:00
Charles Kerr a16fb94756 (trunk libT) #3813 "libtransmission doesn't build on Solaris 10 because of strsep call()" -- fixed. 2010-12-08 14:57:34 +00:00
Charles Kerr 9335e02e6d (trunk libT) add some new bugs to the code so that it will crash when vraa tries to use it 2010-11-11 15:31:11 +00:00
Charles Kerr 5725b7c922 (trunk) #3663 "clang warnings in 2.11" -- fixed. 2010-10-24 05:52:38 +00:00
Charles Kerr 2ee5b08e94 (trunk libT) #3521 "rounding issue in tr_truncd()" -- try yet again to work out all the fringe cases :) 2010-10-21 23:47:23 +00:00
Charles Kerr f3460eaea0 (trunk libT) #3521 "rounding issue in tr_truncd()" -- this time for sure... 2010-10-17 18:27:42 +00:00
Charles Kerr 8d15c48a3f (trunk libT) #3617 "1000+ warnings of 'inlining failed' in libtransmission when compiled with gcc 4.4.4" -- fixed. 2010-10-11 15:41:27 +00:00
Charles Kerr de4ab85030 (trunk libT) #3521 "rounding issue in tr_truncd()" -- fixed. 2010-10-11 15:05:24 +00:00
Charles Kerr b63d64e0e3 (trunk libT) #3521 "rounding issue in tr_truncd()" -- fixed. 2010-09-22 16:09:36 +00:00
Charles Kerr 599c5a8cc4 (trunk daemon) #3511, part 2 of 2: get rid of the TR_DEBUG environment variable 2010-09-22 15:17:16 +00:00
Charles Kerr 4d7046fd67 (trunk) #3547 "Wrong speed display in web UI" -- fixed 2010-09-18 23:06:03 +00:00
Daniel Lee ac53f4792f switch trackerRemove and trackerReplace rpc calls to use tracker id instead of announce urls as identifiers 2010-09-14 06:23:48 +00:00
Charles Kerr 2d5ac5b150 (trunk libT) add a string length argument to tr_urlIsValid() 2010-08-21 12:47:28 +00:00
Charles Kerr 230193053e (trunk libT) #3449 "overflow error in tr_truncd()" -- fixed. 2010-07-24 17:09:39 +00:00
Charles Kerr 9ea1cff367 (trunk libT) disable some more unnecessary debug messages 2010-07-17 22:37:13 +00:00
Charles Kerr 38c25a5890 (trunk libT) fix minor "comparison between signed and unsigned" warning in tr_moveFile() 2010-07-13 13:23:51 +00:00
Charles Kerr 6f5c9dcafb (trunk libt) rename tr_date() as tr_time_msec() for clarity 2010-07-11 20:49:19 +00:00
Charles Kerr 71cadc02b6 (trunk web) #3413 "download speed bad format in web interface" -- fixed. 2010-07-10 02:05:25 +00:00
Charles Kerr 52c04a0d06 (trunk) some units formatter cleanup. 2010-07-09 20:53:38 +00:00
Charles Kerr 098117c987 (trunk libT) use the Mac client's speed formatter 2010-07-08 03:20:07 +00:00
Charles Kerr 91d8cbc383 (2.0x trunk) #3397 "checksum errors when downloading files whose names are encoded in iso-8859-1" -- fixed 2010-07-07 16:48:23 +00:00
Charles Kerr 88c61f8cc2 (trunk) #3045 fix oops from last commit 2010-07-06 20:52:54 +00:00
Charles Kerr 610061f79a (trunk T) #3045 "units" -- modify the formatter functions based on feedback from BMW 2010-07-06 20:25:54 +00:00
Charles Kerr 6e5af03d78 (trunk) #3045 "speed units" -- change the public API of libtransmission based on feedback from livings 2010-07-04 06:07:21 +00:00
Charles Kerr cdcc4705aa (trunk) #3045 "make libtransmission's API byte-oriented instead of KiB-oriented." -- implemented. This is a largish commit and will break the mac build for a little while. 2010-07-03 00:25:22 +00:00
Charles Kerr 5a8c94cfe4 (trunk libT) #3382 "2.01+ (10919) hangs after launch" -- fixed. 2010-07-01 16:09:47 +00:00
Charles Kerr a5a1f38393 (trunk libT) fix more issues found by -Wconversion 2010-07-01 05:14:34 +00:00
Charles Kerr 4a9e36e842 (trunk libT) #3381 "replace calls to usleep() with calls to nanosleep()" -- done. 2010-07-01 03:59:06 +00:00
Charles Kerr 254a1f15cb (trunk libT) down the rabbit hole: various minor type correctness changes unearthed by -Wconversion 2010-06-30 16:40:19 +00:00
Charles Kerr 77a2cf02f1 (trunk libT) fix a couple of minor warnings found by -Wfloat-equal 2010-06-30 15:05:43 +00:00
Charles Kerr d9e4ca49b5 (trunk) avoid a few unnecessary type conversions. remove a few unnecessary mutex locks. 2010-06-30 06:03:55 +00:00
Charles Kerr 1f3ead026d (trunk) #3311 "MingW build of Transmission" -- modify tr_strip_positional_args() to strip out the ' printf flag. Platforms not supporting $ tend to not support ' either 2010-06-25 01:13:35 +00:00
Charles Kerr bcb53a8937 (2.0x) #3340 "tr_moveFile() can be faster" -- fixed for 2.01 2010-06-24 17:34:56 +00:00
Charles Kerr 075169b409 (trunk libT) formatter_get_size_str() -- we don't need decimal places when displaying bytes :) 2010-06-23 20:14:30 +00:00
Daniel Lee bbe9e9843a #3298:Prettier formating of percentages 2010-06-22 22:30:58 +00:00
Charles Kerr e6cf296a68 (trunk libT) add an accessor for the formatter unit strings 2010-06-22 13:34:46 +00:00
Charles Kerr 1d63aa4cda (trunk) add tr_formatter_size() and tr_formatter_speed() so that all the client apps don't have to reinvent the wheel 2010-06-22 04:34:16 +00:00
Charles Kerr 08628333d1 (trunk libT) part of rb07's win32 portability patches from ticket #3311 2010-06-21 16:44:35 +00:00
Charles Kerr eda211e5ce (trunk) #2983: add command-line utilities for creating .torrent files, for editing passkeys, for adding/removing trackers, etc. 2010-06-16 14:27:24 +00:00
Charles Kerr 0ad06c50e8 (trunk) #3262 "problems with '.' as the first character in a .torrent's filename" -- fixed in trunk for 2.00 2010-06-07 14:25:31 +00:00
Mitchell Livingston af2ae0eac4 reverting r9177: pow() is a basic math function and should be used instead of a hack 2010-05-31 13:43:33 +00:00
Charles Kerr fe3d9ed95a (trunk) one of the least interesting commits ever: remove trailing spaces from source code lines... 2010-03-17 17:07:40 +00:00
Charles Kerr 7d7529eb94 (trunk libT) make tr_updateTime() inlined 2010-03-12 19:24:45 +00:00
Charles Kerr 3e79f4b3fe (trunk libT) fix BSD build issue 2010-03-06 19:33:04 +00:00
Charles Kerr 6d639f354b (trunk libT) use tr_valloc() in a couple of places where we allocate largish, short-term buffers 2010-02-23 07:29:21 +00:00
Charles Kerr 5667b80ba6 (trunk libT) try to make the posix_memalign() #includes work right on Darwin too 2010-02-23 06:15:47 +00:00
Charles Kerr c615514944 (trunk libT) add a wrapper function tr_valloc() to try posix_memalign(), getpagesize(), valloc() etc 2010-02-23 06:06:45 +00:00
Charles Kerr 5a9a07b71e (trunk) #2938 "crash when adding a torrent by URL from an ftp source over RPC" -- fixed in trunk for 1.91 2010-02-20 15:57:05 +00:00
Charles Kerr 0ea501355e (trunk daemon) #2877 "Don't let the daemon launch if settings.json is corrupt" -- implemented in trunk for 1.90 2010-02-07 22:17:42 +00:00
Mitchell Livingston 205b21dca3 add a convenience function for determining if an address is an IP address, and when picking a favicon in the Mac UI's tracker tab, use the full IP address when applicable 2010-02-01 23:52:46 +00:00
Charles Kerr 70e3e7156c (trunk libT) #2833 "LP64 bug on OpenBSD" -- fixed in trunk for 1.90 2010-01-29 18:07:21 +00:00
Charles Kerr e26a1783c6 (trunk libT) #2777 "some magnet links get misparsed" -- fixed in trunk for 1.81 2010-01-21 05:10:00 +00:00
Charles Kerr 182cbb8b90 (trunk) one of the less-interesting commits in a while: remove trailing spaces from lines 2010-01-05 23:47:50 +00:00
Charles Kerr 5c26afdb52 happy new year! 2010-01-04 21:00:47 +00:00
Charles Kerr 283b6d6a36 (trunk libT) rename tr_wait() tr_wait_msec() 2010-01-01 22:30:36 +00:00
Charles Kerr 6b8fb48d64 (trunk libT) replace the TR_INLINE macro with the standard "inline" keyword, since we require inline functions anyway 2010-01-01 22:26:35 +00:00
Charles Kerr ac202f13bb (trunk libT) remove dead code -- tr_assert() 2009-12-28 23:11:26 +00:00
Charles Kerr ed1df8beac (trunk libT) removed dead code: tr_isTimeval(), tr_timevalMsec(), tr_timevalSet() 2009-12-12 01:05:29 +00:00
Charles Kerr 0f14f62ac1 (trunk libT) new utility function tr_timerAddMsec() 2009-12-10 19:04:10 +00:00
Charles Kerr cd0de2ebe5 (trunk libT) fix errors in tr_httpParseURL() 2009-12-10 09:13:08 +00:00
Charles Kerr f73f223540 (trunk libT) #2653 "transmission-remote-dotnet makes transmission-daemon segfault" -- fixed for 1.80 2009-12-09 12:44:23 +00:00
Charles Kerr 78ead8c3dd (trunk) update the copyright notices 2009-12-05 02:19:24 +00:00
Mitchell Livingston 5fb643431e decrease the size of the buffer for logging 2009-12-05 01:28:42 +00:00
Mitchell Livingston 8efe3f7cce remove a redundant level check in tr_msg() 2009-12-05 01:02:37 +00:00