1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-27 01:57:52 +00:00
Commit graph

160 commits

Author SHA1 Message Date
Charles Kerr
2eb2dacd50 (trunk libT) Fix sparse warnings: symbol 'XXX' shadows an earlier one 2009-01-01 18:38:49 +00:00
Charles Kerr
6bec82d0a6 (trunk libT) have tr_bencSaveAsJSON() use an evbuffer 2008-12-30 22:07:39 +00:00
Charles Kerr
ad69a937ef (trunk libT) have a pool of reusable evbuffers 2008-12-30 20:32:00 +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
9594112d27 updated email address 2008-12-16 00:20:44 +00:00
Charles Kerr
6b0d98a695 (trunk) #1559: Simplify tr_sessionInitFull 2008-12-13 23:17:36 +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
bc51d19c0d (libT) #1491: json floats decimal separator depends on language settings 2008-11-27 18:35:26 +00:00
Charles Kerr
84dcaab5f4 remove dead code 2008-10-22 13:57:30 +00:00
Charles Kerr
ef5bc3f150 (libT) more win32 work copied from spry's code:
(1) add #define for {read,write,strncasecmp} -> {_read,_write,_strnicmp}
(2) fix a couple more variadic macros that didn't get fixed in the last commit
(3) use evutil_strtoll() instead of strtoll()
2008-10-14 01:00:15 +00:00
Charles Kerr
b824c704b7 first batch of portability changes based on spry's winport:
(1) added tr_getcwd(), a simple portability wrapper for getcwd()
(2) cli: show the help page if no command-line arguments are provided
(3) daemon: use tr_wait() intead of sleep()
(4) daemon: SIGQUIT, SIGPIPE, SIGHUP aren't defined on windows
(5) libtransmission: a couple of small cleanups to bencode.c, list.c, web.c
(6) libtransmission: win32 portability fixes to platform.c
2008-10-13 22:26:02 +00:00
Charles Kerr
7249493759 (libT) #1318: transmission daemon eats all resources 2008-10-06 01:52:29 +00:00
Charles Kerr
4fab4c9e9b (libT) finish killing tr_errno. 2008-10-03 04:49:06 +00:00
Charles Kerr
cc89872dd4 run libT, cli, daemon, gtk through the source-code formatter "uncrustify" as promised/threatened 2008-09-23 19:11:04 +00:00
Charles Kerr
419242e36f (libT) change benc's integral type from int to size_t, squashing a couple of minor warnings 2008-09-04 14:42:32 +00:00
Charles Kerr
f661504d66 (libT) say goodbye to the last `ii' variable in libT 2008-08-22 15:13:01 +00:00
Charles Kerr
2d2d173275 (libT) avoid an unnecessary memory alloc 2008-08-21 18:40:40 +00:00
Charles Kerr
3f25d101e0 fix metainfo bug from earlier today. (m1b, andersos) 2008-08-21 17:03:44 +00:00
Charles Kerr
58881d45be more metainfo/bencode cleanup 2008-08-21 16:12:17 +00:00
Charles Kerr
dcecf09d96 bencode cleanup: remove unused functions and unnecessary #includes 2008-08-21 14:57:59 +00:00
Charles Kerr
3b7499a79b make tr_bencDictFindType() private. 2008-08-20 18:42:45 +00:00
Charles Kerr
6e23743c33 (libT) do proper JSON escaping 2008-08-19 23:11:35 +00:00
Charles Kerr
812b6a1218 roll back the last two diffs (r6582 and r6583) in favor of a simpler/cleaner/better fix 2008-08-18 03:44:09 +00:00
Charles Kerr
0396d9691f (libT) better handling of non-ascii characters when parsing JSON files 2008-08-18 03:10:59 +00:00
Mukund Sivaraman
e44f96c88c Send UTF-8 characters straight out in the JSON without encoding further
The code still handles escaping of control characters and double quotes.

Bugs #1089, #1169 and #1190 may be fixed by this commit.
2008-08-17 21:53:24 +00:00
Charles Kerr
51aff87443 lots of C correctness tweaks suggested by sparse/cgcc 2008-08-11 19:05:02 +00:00
Charles Kerr
17cde72891 (libT) #1176: memory leaks in libtransmission 2008-08-11 17:00:23 +00:00
Charles Kerr
2e6443a53d #1168: reading past the end of KTorrent's pex added.f strings 2008-08-10 14:58:11 +00:00
Charles Kerr
b860119cd3 minor text cleanup 2008-08-01 16:43:22 +00:00
Charles Kerr
d6ede8d09e (libT) make the licensing consistent across all the files which only contain my code 2008-07-22 23:28:28 +00:00
Charles Kerr
2f239319b0 add a portability wrapper ``tr_snprintf()'' around snprintf() 2008-07-15 17:16:57 +00:00
Charles Kerr
8dd3e46450 minor bencode cleanup: (1) remove unused BENC_NULL (2) make tr_bencInit() a private static function in bencode.c 2008-06-19 02:53:57 +00:00
Charles Kerr
71c2cdd1ea #966: allow blocklist support in the daemon. add extra info in the man page explaining how to add blocklists. 2008-06-11 20:09:36 +00:00
Charles Kerr
e3e3bee8b5 #800 initial support for GetRight-style fetching of data through http and ftp servers specified in the .torrent's "url-list" tag 2008-06-07 21:26:41 +00:00
Charles Kerr
f6dd06c367 r5987 tweak: silence a couple of console debugging messages that snuck into the commit 2008-06-01 01:55:05 +00:00
Charles Kerr
07c1b28e9e #838 (Adding trackers to existing torrents): add a backend API for this (tr_torrentSetAnnounceList) and implement a GUI for it in the gtk+ client. 2008-06-01 01:40:32 +00:00
Charles Kerr
0ab37e45d5 (rpc)
1. fix #968: 'transmission-remote -r' deletes all
2. fix error in escaping control characters when serializing tr_benc to JSON
3. fix small memory leak in rpc command parsing
2008-05-24 18:22:16 +00:00
Charles Kerr
90e151cd4d (rpc) make our generated JSON more human-readable. 2008-05-22 16:41:16 +00:00
Charles Kerr
2c79888a93 RPC/IPC redesign 2008-05-18 16:44:30 +00:00
Charles Kerr
6aaa2fd39e fix bug in the benc-to-json converter.
add rison-to-json converter so we can pass commands to transmission in a uri.
add unit tests for the new code.
2008-05-13 12:52:58 +00:00
Charles Kerr
911bce88c9 add benc-to-json conversion + unit tests. 2008-05-12 17:54:57 +00:00
Charles Kerr
e607f26893 add json-to-benc parser 2008-05-11 22:42:53 +00:00
Charles Kerr
73d77f8418 add a couple of benc utility functions 2008-05-08 03:25:21 +00:00
Charles Kerr
1b901ca9df minor tweaks: dead code removal, make functions static, etc 2008-04-22 20:51:15 +00:00
Charles Kerr
c88aa6135d benc cleanup 2008-04-18 16:23:59 +00:00
Charles Kerr
87a77ea331 more hacking on the bencoded resume files 2008-04-15 17:00:44 +00:00
Charles Kerr
7f89ee3db2 silence a couple of annoying dbg messages 2008-04-14 20:06:37 +00:00
Charles Kerr
afde752dc0 'resume' cleanup 2008-04-14 11:52:50 +00:00
Charles Kerr
4843187f6c #394: resume files should use original name instead of hash name 2008-04-13 22:31:07 +00:00
Charles Kerr
0080f1abe8 ipc/daemon cleanup 2008-04-04 17:19:44 +00:00
Charles Kerr
fd0e71c00a hack on IPC a bit because it's been too long since I broke it 2008-04-03 21:38:32 +00:00
Charles Kerr
a331582ec0 string folding 2008-03-30 13:52:55 +00:00
Charles Kerr
7200b27a18 lots more i18n string work -- making strings more consistent, folding redundant strings together, etc. 2008-03-07 20:48:36 +00:00
Charles Kerr
0e10715b5e new function: tr_bencSaveAsSerializedPHP() 2008-03-04 19:29:51 +00:00
Charles Kerr
84a8592d1d first cut at adding i18n hooks into libtransmission. 2008-03-04 02:02:25 +00:00
Charles Kerr
6b1001600b remove scaffolding that was accidentally committed in r5183 a few minutes ago 2008-03-02 19:55:04 +00:00
Charles Kerr
d712545433 don't crash in makemeta when trying to build a torrent from files you don't have read access to. (wereHamster) 2008-03-02 19:42:45 +00:00
Charles Kerr
8cc587a66f more housekeeping: benc_val_t --> tr_benc 2008-02-26 21:58:58 +00:00
Charles Kerr
beb7cc0b92 minor code cleanup 2008-02-02 16:23:49 +00:00
Charles Kerr
3334ea8401 fix the 1.04 bencode errors reported in the forums this morning. add regression tests. 2008-02-01 15:50:17 +00:00
Charles Kerr
606d548514 clarity tweaks to variable & function names 2008-02-01 01:54:04 +00:00
Charles Kerr
375949551b more graceful handling of bad inputs to tr_bencFree(), tr_bencSave(), and tr_bencPrint(). 2008-01-31 15:20:42 +00:00
Charles Kerr
b5e119f1ea bencode tweaks. 2008-01-31 06:00:57 +00:00
Charles Kerr
784e0babda fix off-by-one that was uncovered by the new benc's stricter parsing. 2008-01-31 03:09:27 +00:00
Charles Kerr
df9bd1f713 #667: remote crash exploit in bencode parser 2008-01-31 02:24:43 +00:00
Charles Kerr
410dffd211 part 1 of the bencode exploit fix:
- better error checking for int & string parsing
 - add automated unit tests
2008-01-30 15:39:41 +00:00
Charles Kerr
ce6c33b7bf set copyright info to 2008 2008-01-01 17:20:20 +00:00
Charles Kerr
287975caf5 the torrent ctor is here. 2007-12-21 22:18:40 +00:00
Charles Kerr
91e672d428 some progress on the overall statistics, though probably not visible to end users yet 2007-11-21 20:03:53 +00:00
Charles Kerr
787d2b800c fix benocde crash reported by Gimp_ 2007-11-16 06:37:01 +00:00
Charles Kerr
b6b339e25a fix bencode crash reported earlier today by Gimp_, and possibly also by tiennou 2007-11-16 03:32:42 +00:00
Charles Kerr
815fb89b91 fix torrent metafile creation error introduced in trunk in r3735 and reported by tiennou in ticket #478 2007-11-15 15:07:05 +00:00
Charles Kerr
fd430fde90 undoing the r3773-r3774 experiment. 2007-11-09 20:07:52 +00:00
Charles Kerr
67b719c2de on Darwin, use NSCParameterAssert() instead of assert(). 2007-11-09 19:50:40 +00:00
Charles Kerr
71f4efcbad update our #includes now that libevent has cleaned up event.h 2007-11-07 18:26:19 +00:00
Charles Kerr
b43bb1483d fix libevent #include quirk reported by SoftwareElves 2007-11-07 03:13:04 +00:00
Charles Kerr
229102a196 more libevent fun. good thing the mac build is broken or I'd've been getting bug reports on this instead :) 2007-11-06 23:23:47 +00:00
Charles Kerr
60aab6c433 remove libtransmission code that duplicates functionality in libevent 2007-11-06 21:14:30 +00:00
Charles Kerr
e3764e732b fix possible benc leak reported by MishaS (#441) 2007-11-01 18:44:37 +00:00
Mitchell Livingston
76da1185ca merge encryption branch to trunk (xcode project is still out of date) 2007-09-20 16:32:01 +00:00
Charles Kerr
d209052051 add portability wrapper for in_port_t... 2007-07-30 18:04:10 +00:00
Charles Kerr
e07d0220a9 this looks bug but it's not: just janitorial cleanup, moving #includes from headers into source file 2007-07-29 18:11:21 +00:00
Charles Kerr
e8fb29ea44 fix compiler warnings reported by wereHamster 2007-07-25 17:27:19 +00:00
Charles Kerr
790476ac23 clean up #includes a bit. 2007-07-12 17:51:45 +00:00
Charles Kerr
b79beeff66 clean up #includes a bit. 2007-07-09 20:10:42 +00:00
Charles Kerr
a62302d709 Better handling of malformed bencoded strings. Thanks to cluthi81 for reporting this. 2007-07-06 20:43:17 +00:00
Charles Kerr
3d7f38fa68 get the bencoded text compliant with the bittorrent spec w.r.t. dictionaries: "keys must be strings and appear in sorted order (sorted as raw strings, not alphanumerics)." 2007-06-29 02:27:00 +00:00
Charles Kerr
5128d0a434 fix terribly nasty bencode corruption bug from r2024 regarding the sorting of dictionary keys in tr_bencDictAdd(). this corrupts all the pointers that are already floating out there to existing values in the dictionary... if BitTornado really needs these to be sorted, then we should sort a temporary copy in tr_bencSave(), not here in our internal structures. 2007-06-19 03:01:57 +00:00
Charles Kerr
64ce2edbfb * makemeta: don't add dotfiles to the torrents
* bencode: trying to chase down a memory leak
2007-06-19 01:49:56 +00:00
Eric Petit
ba5bb320ca Bencoded dictionaries are now sorted alphabetically, this should fix
compatibility with some clients, incl. BitTornado-based ones.
(Reported by roee88 from LH-ABC)
2007-06-10 15:38:58 +00:00
Josh Elsasser
a3ca76cced Don't bencode signed integers as unsigned. 2007-05-09 07:00:08 +00:00
Josh Elsasser
6f1c25a22e Don't use uninitialized variables. 2007-04-18 16:41:37 +00:00
Josh Elsasser
bb6f766112 Escape nonprintable characters in TYPE_STR values in tr_bencPrint output. 2007-04-15 06:21:12 +00:00
Josh Elsasser
7d67c4b457 Fix benc list allocations for like the fourth time.
Hopefully this time it actually works.
2007-04-03 00:51:22 +00:00
Josh Elsasser
574902b461 Fix benc list/dict allocation. 2007-04-02 21:19:53 +00:00
Josh Elsasser
ebcc73121b Remove tr_bencListIter(), it was a stupid idea. 2007-03-31 17:40:28 +00:00
Josh Elsasser
978b5cec11 Add iterator function for bencoded lists. 2007-03-30 00:12:39 +00:00
Josh Elsasser
0c1c57a62a Eliminate an error-prone varargs function. 2007-03-29 21:02:59 +00:00
Josh Elsasser
09c87aad84 Merge PEX branch, I hope this works. 2007-03-23 08:28:01 +00:00