Changeset 11599
- Timestamp:
- Dec 27, 2010, 7:18:17 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 130 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/daemon/daemon.c
r11590 r11599 87 87 { 88 88 89 { 'a', "allowed", "Allowed IP addresses. 89 { 'a', "allowed", "Allowed IP addresses. (Default: " TR_DEFAULT_RPC_WHITELIST ")", "a", 1, "<list>" }, 90 90 { 'b', "blocklist", "Enable peer blocklists", "b", 0, NULL }, 91 91 { 'B', "no-blocklist", "Disable peer blocklists", "B", 0, NULL }, -
trunk/daemon/remote.c
r11598 r11599 298 298 { 'v', "verify", "Verify the current torrent(s)", "v", 0, NULL }, 299 299 { 'V', "version", "Show version number and exit", "V", 0, NULL }, 300 { 'w', "download-dir", "When adding a new torrent, set its download folder. 300 { 'w', "download-dir", "When adding a new torrent, set its download folder. Otherwise, set the default download folder", "w", 1, "<path>" }, 301 301 { 'x', "pex", "Enable peer exchange (PEX)", "x", 0, NULL }, 302 302 { 'X', "no-pex", "Disable peer exchange (PEX)", "X", 0, NULL }, … … 1733 1733 break; 1734 1734 case 409: 1735 /* session id failed. our curl header func has already1736 * pulled the new session id from this response's headers,1737 * build a new CURL* and try again */1735 /* Session id failed. Our curl header func has already 1736 * pulled the new session id from this response's headers, 1737 * build a new CURL* and try again */ 1738 1738 curl_easy_cleanup( curl ); 1739 1739 curl = NULL; -
trunk/daemon/watch.h
r9868 r11599 5 5 * This file Copyright (C) 2009-2010 Mnemosyne LLC 6 6 * 7 * This file is licensed by the GPL version 2. 7 * This file is licensed by the GPL version 2. Works owned by the 8 8 * Transmission project are granted a special exemption to clause 2(b) 9 9 * so that the bulk of its code can remain under the MIT license. -
trunk/gtk/actions.c
r11572 r11599 2 2 * This file Copyright (C) 2007-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/gtk/actions.h
r11563 r11599 2 2 * This file Copyright (C) 2007-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/gtk/add-dialog.c
r11596 r11599 2 2 * This file Copyright (C) 2008-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/gtk/add-dialog.h
r11563 r11599 2 2 * This file Copyright (C) 2008-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/gtk/details.c
r11572 r11599 2 2 * This file Copyright (C) 2007-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/gtk/details.h
r11563 r11599 2 2 * This file Copyright (C) 2007-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/gtk/favicon.c
r10512 r11599 2 2 * This file Copyright (C) 2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/gtk/favicon.h
r10512 r11599 2 2 * This file Copyright (C) 2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/gtk/file-list.c
r11572 r11599 2 2 * This file Copyright (C) 2007-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. … … 127 127 { 128 128 /* Changing a value in the sort column can trigger a resort 129 * which breaks this foreach() call. 129 * which breaks this foreach() call. (See #3529) 130 130 * As a workaround: if that's about to happen, temporarily disable 131 131 * sorting until we finish walking the tree. */ -
trunk/gtk/file-list.h
r11572 r11599 2 2 * This file Copyright (C) 2009-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/gtk/filter.c
r11519 r11599 2 2 * This file Copyright (C) 2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. … … 138 138 g_object_steal_data( o, DIRTY_KEY ); 139 139 140 /* walk through all the torrents, tallying how many matches there are141 * for the various categories. also make a sorted list of all tracker140 /* Walk through all the torrents, tallying how many matches there are 141 * for the various categories. Also make a sorted list of all tracker 142 142 * hosts s.t. we can merge it with the existing list */ 143 143 if( gtk_tree_model_get_iter_first( tmodel, &iter )) do -
trunk/gtk/filter.h
r10388 r11599 2 2 * This file Copyright (C) 2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/gtk/hig.c
r11562 r11599 2 2 * This file Copyright (C) 2007-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/gtk/hig.h
r11563 r11599 2 2 * This file Copyright (C) 2007-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/gtk/main.c
r11589 r11599 77 77 "The Transmission daemon, GTK+ client, Qt client, Web client, and most of libtransmission are licensed under the terms of the GNU GPL version 2, with two special exceptions:\n\n" 78 78 "1. The MIT-licensed portions of Transmission listed above are exempt from GPLv2 clause 2(b) and may retain their MIT license.\n\n" 79 "2. Permission is granted to link the code in this release with the OpenSSL project's 'OpenSSL' library and to distribute the linked executables. 79 "2. Permission is granted to link the code in this release with the OpenSSL project's 'OpenSSL' library and to distribute the linked executables. Works derived from Transmission may, at their authors' discretion, keep or delete this exception."; 80 80 #endif 81 81 … … 438 438 case SIGINT: 439 439 case SIGTERM: 440 g_message( _( "Got signal %d; trying to shut down cleanly. 440 g_message( _( "Got signal %d; trying to shut down cleanly. Do it again if it gets stuck." ), sig ); 441 441 gtr_actions_handler( "quit", sighandler_cbdata ); 442 442 break; … … 589 589 /* Both libcurl and GNOME have hooks for proxy support. 590 590 * If someone has set the http_proxy environment variable, 591 * don't apply the GNOME settings here. 591 * don't apply the GNOME settings here. That way libcurl can override GNOME. */ 592 592 if( !env_checked ) { 593 593 const char * str = g_getenv( "http_proxy" ); … … 808 808 err = NULL; 809 809 if( !gtr_dbus_present_window( ) ) 810 err = g_strdup( _( "Transmission is already running, but is not responding. 810 err = g_strdup( _( "Transmission is already running, but is not responding. To start a new session, you must first close the existing Transmission process." ) ); 811 811 } 812 812 … … 946 946 GTK_BUTTONS_NONE, 947 947 "%s", 948 _( "Transmission is a file-sharing program. When you run a torrent, its data will be made available to others by means of upload.You and you alone are fully responsible for exercising proper judgement and abiding by your local laws." ) );948 _( "Transmission is a file-sharing program. When you run a torrent, its data will be made available to others by means of upload. You and you alone are fully responsible for exercising proper judgement and abiding by your local laws." ) ); 949 949 gtk_dialog_add_button( GTK_DIALOG( w ), GTK_STOCK_QUIT, GTK_RESPONSE_REJECT ); 950 950 gtk_dialog_add_button( GTK_DIALOG( w ), _( "I _Accept" ), GTK_RESPONSE_ACCEPT ); -
trunk/gtk/makemeta-ui.c
r11596 r11599 2 2 * This file Copyright (C) 2007-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/gtk/makemeta-ui.h
r11563 r11599 2 2 * This file Copyright (C) 2007-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/gtk/msgwin.c
r11572 r11599 2 2 * This file Copyright (C) 2008-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. … … 233 233 title = _( "Time" ); break; 234 234 235 /* noun. 235 /* noun. column title for a list */ 236 236 case COL_NAME: 237 237 title = _( "Name" ); break; 238 238 239 /* noun. 239 /* noun. column title for a list */ 240 240 case COL_MESSAGE: 241 241 title = _( "Message" ); break; -
trunk/gtk/msgwin.h
r11572 r11599 2 2 * This file Copyright (C) 2008-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/gtk/notify.c
r11572 r11599 2 2 * This file Copyright (C) 2008-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/gtk/notify.h
r11563 r11599 2 2 * This file Copyright (C) 2008-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/gtk/relocate.c
r11596 r11599 2 2 * This file Copyright (C) 2009-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/gtk/relocate.h
r11280 r11599 2 2 * This file Copyright (C) 2009-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/gtk/stats.c
r11596 r11599 2 2 * This file Copyright (C) 2007-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. … … 106 106 { 107 107 const char * primary = _( "Reset your statistics?" ); 108 const char * secondary = _( "These statistics are for your information only. 108 const char * secondary = _( "These statistics are for your information only. " 109 109 "Resetting them doesn't affect the statistics logged by your BitTorrent trackers." ); 110 110 const int flags = GTK_DIALOG_DESTROY_WITH_PARENT -
trunk/gtk/stats.h
r11563 r11599 2 2 * This file Copyright (C) 2007-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/gtk/torrent-cell-renderer.c
r11589 r11599 2 2 * This file Copyright (C) 2007-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. … … 333 333 int bar_height; 334 334 335 /* use this instead of tr_stat.pieceUploadSpeed so that the model can336 control when the speed displays get updated. this is done to keep335 /* Use this instead of tr_stat.pieceUploadSpeed so that the model can 336 control when the speed displays get updated. This is done to keep 337 337 the individual torrents' speeds and the status bar's overall speed 338 338 in sync even if they refresh at slightly different times */ -
trunk/gtk/torrent-cell-renderer.h
r11563 r11599 2 2 * This file Copyright (C) 2007-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/gtk/tr-icon.c
r11563 r11599 2 2 * This file Copyright (C) 2007-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/gtk/tr-icon.h
r11563 r11599 2 2 * This file Copyright (C) 2007-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/gtk/tr-prefs.c
r11572 r11599 2 2 * This file Copyright (C) 2007-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/gtk/tr-prefs.h
r11563 r11599 2 2 * This file Copyright (C) 2007-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/gtk/tr-window.c
r11589 r11599 176 176 g_object_set( p->renderer, "compact", gtr_pref_flag_get( key ), NULL ); 177 177 /* since the cell size has changed, we need gtktreeview to revalidate 178 * its fixed-height mode values. 178 * its fixed-height mode values. Unfortunately there's not an API call 179 179 * for that, but it *does* revalidate when it thinks the style's been tweaked */ 180 180 g_signal_emit_by_name( p->view, "style-set", NULL, NULL ); … … 785 785 tr_strlsize( up, stats.uploadedBytes, sizeof( up ) ); 786 786 tr_strlsize( down, stats.downloadedBytes, sizeof( down ) ); 787 /* Translators: "size|" is here for disambiguation. 787 /* Translators: "size|" is here for disambiguation. Please remove it from your translation. 788 788 %1$s is the size of the data we've downloaded 789 789 %2$s is the size of the data we've uploaded */ … … 796 796 tr_strlsize( up, stats.uploadedBytes, sizeof( up ) ); 797 797 tr_strlsize( down, stats.downloadedBytes, sizeof( down ) ); 798 /* Translators: "size|" is here for disambiguation. 798 /* Translators: "size|" is here for disambiguation. Please remove it from your translation. 799 799 %1$s is the size of the data we've downloaded 800 800 %2$s is the size of the data we've uploaded */ -
trunk/gtk/transmission-gtk.1
r11541 r11599 63 63 Sets the default config-dir. 64 64 .It Ev http_proxy 65 libcurl uses this environment variable when performing tracker announces. 65 libcurl uses this environment variable when performing tracker announces. If set, this overrides the GNOME proxy preferences. 66 66 .El 67 67 .Sh FILES -
trunk/gtk/util.c
r11591 r11599 2 2 * This file Copyright (C) 2008-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. … … 906 906 { 907 907 g_string_append_printf( gstr, "\n \n" ); 908 g_string_append_printf( gstr, _( "This magnet link appears to be intended for something other than BitTorrent. 908 g_string_append_printf( gstr, _( "This magnet link appears to be intended for something other than BitTorrent. BitTorrent magnet links have a section containing \"%s\"." ), xt ); 909 909 } 910 910 -
trunk/gtk/util.h
r11589 r11599 2 2 * This file Copyright (C) 2008-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/libtransmission/ConvertUTF.c
r8391 r11599 194 194 /* 195 195 * Once the bits are split out into bytes of UTF-8, this is a mask OR-ed 196 * into the first byte, depending on how many bytes follow. 196 * into the first byte, depending on how many bytes follow. There are 197 197 * as many entries in this table as there are UTF-8 sequence types. 198 198 * (I.e., one byte sequence, two byte... etc.). Remember that sequencs … … 290 290 * and the sequence is illegal right away if there aren't that many bytes 291 291 * available. 292 * If presented with a length > 4, this returns false. 292 * If presented with a length > 4, this returns false. The Unicode 293 293 * definition of UTF-8 goes up to 4-byte sequences. 294 294 */ … … 588 588 Note A. 589 589 The fall-through switches in UTF-8 reading code save a 590 temp variable, some decrements & conditionals. 590 temp variable, some decrements & conditionals. The switches 591 591 are equivalent to the following loop: 592 592 { -
trunk/libtransmission/ConvertUTF.h
r7748 r11599 30 30 /* --------------------------------------------------------------------- 31 31 32 Conversions between UTF32, UTF-16, and UTF-8. 32 Conversions between UTF32, UTF-16, and UTF-8. Header file. 33 33 34 34 Several funtions are included here, forming a complete set of 35 conversions between the three formats. 35 conversions between the three formats. UTF-7 is not included 36 36 here, but is handled in a separate source file. 37 37 38 38 Each of these routines takes pointers to input buffers and output 39 buffers. 39 buffers. The input buffers are const. 40 40 41 41 Each routine converts the text between *sourceStart and sourceEnd, … … 62 62 These conversion functions take a ConversionFlags argument. When this 63 63 flag is set to strict, both irregular sequences and isolated surrogates 64 will cause an error. 64 will cause an error. When the flag is set to lenient, both irregular 65 65 sequences and isolated surrogates are converted. 66 66 … … 76 76 Output parameters: 77 77 The value "sourceIllegal" is returned from some routines if the input 78 sequence is malformed. 78 sequence is malformed. When "sourceIllegal" is returned, the source 79 79 value will point to the illegal value that caused the problem. E.g., 80 80 in UTF-8 when a sequence is malformed, it points to the start of the 81 malformed sequence. 81 malformed sequence. 82 82 83 83 Author: Mark E. Davis, 1994. -
trunk/libtransmission/JSON_parser.h
r10814 r11599 66 66 67 67 \param ctx The pointer passed to new_JSON_parser. 68 \param type An element of JSON_type but not JSON_T_NONE. 68 \param type An element of JSON_type but not JSON_T_NONE. 69 69 \param value A representation of the parsed value. This parameter is NULL for 70 70 JSON_T_ARRAY_BEGIN, JSON_T_ARRAY_END, JSON_T_OBJECT_BEGIN, JSON_T_OBJECT_END, -
trunk/libtransmission/announcer.c
r11588 r11599 2 2 * This file Copyright (C) 2009-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. … … 772 772 773 773 To be safe, we should do both: add the "ipv6=" parameter and 774 announce twice. 774 announce twice. At any rate, we're already computing our IPv6 775 775 address (for the LTEP handshake), so this comes for free. */ 776 776 … … 1452 1452 { 1453 1453 /* 404: The requested resource could not be found but may be 1454 * available again in the future. 1454 * available again in the future. Subsequent requests by 1455 1455 * the client are permissible. */ 1456 1456 … … 1890 1890 rc = tr_dhtAnnounce(tor, AF_INET, 1); 1891 1891 if(rc == 0) 1892 /* The DHT is not ready yet. 1892 /* The DHT is not ready yet. Try again soon. */ 1893 1893 tor->dhtAnnounceAt = now + 5 + tr_cryptoWeakRandInt( 5 ); 1894 1894 else -
trunk/libtransmission/announcer.h
r11280 r11599 2 2 * This file Copyright (C) 2009-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. … … 50 50 int compactLen; 51 51 52 /* [0...100] for probability a peer is a seed. 52 /* [0...100] for probability a peer is a seed. calculated by the leecher/seeder ratio */ 53 53 int8_t seedProbability; 54 54 } -
trunk/libtransmission/bandwidth.c
r11349 r11599 2 2 * This file Copyright (C) 2008-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. … … 206 206 struct tr_peerIo ** peers = (struct tr_peerIo**) tr_ptrArrayBase( peerArray ); 207 207 208 /* First phase of IO. 209 * peers from starving the others. 210 * small chunk of bandwidth. 208 /* First phase of IO. Tries to distribute bandwidth fairly to keep faster 209 * peers from starving the others. Loop through the peers, giving each a 210 * small chunk of bandwidth. Keep looping until we run out of bandwidth 211 211 * and/or peers that can use it */ 212 212 n = peerCount; … … 268 268 } 269 269 270 /* First phase of IO. 271 * peers from starving the others. 272 * small chunk of bandwidth. 270 /* First phase of IO. Tries to distribute bandwidth fairly to keep faster 271 * peers from starving the others. Loop through the peers, giving each a 272 * small chunk of bandwidth. Keep looping until we run out of bandwidth 273 273 * and/or peers that can use it */ 274 274 phaseOne( &high, dir ); … … 276 276 phaseOne( &low, dir ); 277 277 278 /* Second phase of IO. 278 /* Second phase of IO. To help us scale in high bandwidth situations, 279 279 * enable on-demand IO for peers with bandwidth left to burn. 280 280 * This on-demand IO is enabled until (1) the peer runs out of bandwidth, -
trunk/libtransmission/bandwidth.h
r11349 r11599 2 2 * This file Copyright (C) 2008-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. … … 75 75 * 76 76 * tr_session also owns a tr_handshake's bandwidths, so that the handshake 77 * I/O can be counted in the global raw totals. 77 * I/O can be counted in the global raw totals. When the handshake is done, 78 78 * the bandwidth's ownership passes to a tr_peer. 79 79 * … … 81 81 * 82 82 * When you ask a bandwidth object for its speed, it gives the speed of the 83 * subtree underneath it as well. 83 * subtree underneath it as well. So you can get Transmission's overall 84 84 * speed by quering tr_session's bandwidth, per-torrent speeds by asking 85 85 * tr_torrent's bandwidth, and per-peer speeds by asking tr_peer's bandwidth. … … 87 87 * CONSTRAINING 88 88 * 89 * Call tr_bandwidthAllocate() periodically. 89 * Call tr_bandwidthAllocate() periodically. tr_bandwidth knows its current 90 90 * speed and will decide how many bytes to make available over the 91 91 * user-specified period to reach the user-specified desired speed. -
trunk/libtransmission/bencode.c
r11564 r11599 2 2 * This file Copyright (C) 2008-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/libtransmission/bencode.h
r10783 r11599 2 2 * This file Copyright (C) 2008-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. … … 28 28 * integers, strings, lists, dictionaries, booleans, and floating-point numbers. 29 29 * The structure is named tr_benc due to the historical reason that it was 30 * originally tightly coupled with bencoded data. 30 * originally tightly coupled with bencoded data. It currently supports 31 31 * being parsed from, and serialized to, both bencoded notation and json notation. 32 32 * … … 249 249 **/ 250 250 251 /* this is only quasi-supported. 251 /* this is only quasi-supported. don't rely on it too heavily outside of libT */ 252 252 void tr_bencMergeDicts( tr_benc * target, const tr_benc * source ); 253 253 -
trunk/libtransmission/bitfield.c
r11299 r11599 2 2 * This file Copyright (C) 2009-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/libtransmission/bitfield.h
r11280 r11599 2 2 * This file Copyright (C) 2009-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. … … 65 65 66 66 /** A stripped-down version of bitfieldHas to be used 67 for speed when you're looping quickly. 67 for speed when you're looping quickly. This version 68 68 has none of tr_bitfieldHas()'s safety checks, so you 69 69 need to call tr_bitfieldTestFast() first before you -
trunk/libtransmission/bitset.h
r11299 r11599 2 2 * This file Copyright (C) 2009-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/libtransmission/blocklist.c
r11398 r11599 2 2 * This file Copyright (C) 2008-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/libtransmission/blocklist.h
r10920 r11599 2 2 * This file Copyright (C) 2008-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/libtransmission/cache.c
r11398 r11599 2 2 * This file Copyright (C) 2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/libtransmission/cache.h
r11090 r11599 2 2 * This file Copyright (C) 2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/libtransmission/clients.c
r10930 r11599 2 2 * This file Copyright (C) 2008-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/libtransmission/clients.h
r9965 r11599 2 2 * This file Copyright (C) 2009-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/libtransmission/completion.c
r10912 r11599 2 2 * This file Copyright (C) 2009-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/libtransmission/completion.h
r11013 r11599 2 2 * This file Copyright (C) 2009-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/libtransmission/crypto.c
r11333 r11599 1 1 /* * This file Copyright (C) 2007-2010 Mnemosyne LLC 2 2 * 3 * This file is licensed by the GPL version 2. 3 * This file is licensed by the GPL version 2. Works owned by the 4 4 * Transmission project are granted a special exemption to clause 2(b) 5 5 * so that the bulk of its code can remain under the MIT license. -
trunk/libtransmission/crypto.h
r9965 r11599 2 2 * This file Copyright (C) 2007-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/libtransmission/fdlimit.c
r11544 r11599 2 2 * This file Copyright (C) 2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. … … 426 426 * 427 427 * 2. Disable OS-level caching due to user reports of adverse effects of 428 * excessive inactive memory. 428 * excessive inactive memory. However this is experimental because 429 429 * previous attempts at this have *also* had adverse effects (see r8198) 430 430 * … … 551 551 } 552 552 553 dbgmsg( "it's not already open. 553 dbgmsg( "it's not already open. looking for an open slot or an old file." ); 554 554 while( winner < 0 ) 555 555 { -
trunk/libtransmission/fdlimit.h
r11544 r11599 2 2 * This file Copyright (C) 2007-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/libtransmission/handshake.c
r11588 r11599 2 2 * This file Copyright (C) 2007-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. … … 616 616 handshake->haveReadAnythingFromPeer = TRUE; 617 617 618 pstrlen = evbuffer_pullup( inbuf, 1 )[0]; /* peek, don't read. 618 pstrlen = evbuffer_pullup( inbuf, 1 )[0]; /* peek, don't read. We may be 619 619 handing inbuf to AWAITING_YA */ 620 620 -
trunk/libtransmission/handshake.h
r10500 r11599 2 2 * This file Copyright (C) 2007-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/libtransmission/history.c
r11542 r11599 2 2 * This file Copyright (C) 2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/libtransmission/history.h
r11522 r11599 2 2 * This file Copyright (C) 2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/libtransmission/inout.c
r11313 r11599 2 2 * This file Copyright (C) 2007-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/libtransmission/inout.h
r10273 r11599 2 2 * This file Copyright (C) 2008-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/libtransmission/json.c
r10662 r11599 2 2 * This file Copyright (C) 2008-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/libtransmission/json.h
r9868 r11599 2 2 * This file Copyright (C) 2008-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. … … 18 18 19 19 /** @ingroup tr_benc */ 20 int tr_jsonParse( const char * source, /* such as a filename. only when logging an error */20 int tr_jsonParse( const char * source, /* Such as a filename. Only when logging an error */ 21 21 const void * vbuf, 22 22 size_t len, -
trunk/libtransmission/list.c
r11023 r11599 2 2 * This file Copyright (C) 2007-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/libtransmission/list.h
r11522 r11599 2 2 * This file Copyright (C) 2007-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. … … 83 83 * @param list pointer to the list 84 84 * @param b the comparison key 85 * @param compare_func the comparison function. 85 * @param compare_func the comparison function. The arguments passed to it will be the list's pointers and the comparison key "b" 86 86 * @return the removed data pointer, or NULL if no match was found 87 87 */ … … 94 94 * @param list pointer to the list 95 95 * @param b the comparison key 96 * @param compare_func the comparison function. 96 * @param compare_func the comparison function. The arguments passed to it will be the list's pointers and the comparison key "b" 97 97 * @return the matching list node, or NULL if not match was found 98 98 */ -
trunk/libtransmission/magnet.c
r11350 r11599 2 2 * This file Copyright (C) 2009-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. … … 25 25 26 26 /* this base32 code converted from code by Robert Kaye and Gordon Mohr 27 * and is public domain. 27 * and is public domain. see http://bitzi.com/publicdomain for more info */ 28 28 29 29 static const int base32Lookup[] = -
trunk/libtransmission/magnet.h
r11280 r11599 2 2 * This file Copyright (C) 2009-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/libtransmission/makemeta.c
r11490 r11599 2 2 * This file Copyright (C) 2007-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/libtransmission/makemeta.h
r10970 r11599 2 2 * This file Copyright (C) 2007-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/libtransmission/metainfo.c
r11548 r11599 2 2 * This file Copyright (C) 2009-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. … … 256 256 * it will be taken as a sign that that tracker doesn't support 257 257 * the scrape convention. If it does, substitute 'scrape' for 258 * 'announce' to find the scrape page. 258 * 'announce' to find the scrape page. */ 259 259 if( ( ( s = strrchr( announce, '/' ) ) ) && !strncmp( ++s, "announce", 8 ) ) 260 260 { -
trunk/libtransmission/metainfo.h
r10774 r11599 2 2 * This file Copyright (C) 2009-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/libtransmission/natpmp.c
r11391 r11599 2 2 * This file Copyright (C) 2007-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. … … 72 72 tr_ndbg( 73 73 getKey( ), 74 "%s failed. natpmp returned %d (%s); errno is %d (%s)",74 "%s failed. Natpmp returned %d (%s); errno is %d (%s)", 75 75 func, ret, strnatpmperr( ret ), errno, tr_strerror( errno ) ); 76 76 } -
trunk/libtransmission/natpmp.h
r10945 r11599 2 2 * This file Copyright (C) 2007-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/libtransmission/net.c
r11588 r11599 484 484 unbreaking the double-stack Internet. */ 485 485 486 /* Get the source address used for a given destination address. 486 /* Get the source address used for a given destination address. Since 487 487 there is no official interface to get this information, we create 488 488 a connected UDP socket (connected UDP... hmm...) and check its source … … 669 669 (address[15] == 0 || address[15] == 1)) || 670 670 /* Addresses outside of 2000::/3 are currently reserved, 671 but might be allocated at some future time. 671 but might be allocated at some future time. Since 672 672 there are a lot of buggy peers pushing around such 673 673 addresses over PEX, we reject them until the end of -
trunk/libtransmission/peer-common.h
r11522 r11599 2 2 * This file Copyright (C) 2008-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/libtransmission/peer-io.c
r11588 r11599 2 2 * This file Copyright (C) 2007-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/libtransmission/peer-io.h
r11548 r11599 2 2 * This file Copyright (C) 2007-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/libtransmission/peer-mgr.c
r11588 r11599 2 2 * This file Copyright (C) 2007-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. … … 113 113 /** 114 114 * Peer information that should be kept even before we've connected and 115 * after we've disconnected. 115 * after we've disconnected. These are kept in a pool of peer_atoms to decide 116 116 * which ones would make good candidates for connecting to, and to watch out 117 117 * for banned peers. … … 525 525 deleteTimers( manager ); 526 526 527 /* free the handshakes. 527 /* free the handshakes. Abort invokes handshakeDoneCB(), which removes 528 528 * the item from manager->handshakes, so this is a little roundabout... */ 529 529 while( !tr_ptrArrayEmpty( &manager->incomingHandshakes ) ) … … 641 641 *** 642 642 *** 2. Torrent::pieces, an array of "struct weighted_piece" which lists the 643 *** pieces that we want to request. 643 *** pieces that we want to request. It's used to decide which blocks to 644 644 *** return next when tr_peerMgrGetBlockRequests() is called. 645 645 **/ … … 1478 1478 1479 1479 /* only add this to downloadedCur if we got it from a peer -- 1480 * webseeds shouldn't count against our ratio. 1480 * webseeds shouldn't count against our ratio. As one tracker 1481 1481 * admin put it, "Those pieces are downloaded directly from the 1482 1482 * content distributor, not the peers, it is the tracker's job … … 2095 2095 tr_ptrArrayClear( &t->peers ); 2096 2096 2097 /* disconnect the handshakes. 2097 /* disconnect the handshakes. handshakeAbort calls handshakeDoneCB(), 2098 2098 * which removes the handshake from t->outgoingHandshakes... */ 2099 2099 while( !tr_ptrArrayEmpty( &t->outgoingHandshakes ) ) … … 2961 2961 2962 2962 /* if we transferred piece data, then they might be good peers, 2963 so reset their `numFails' weight to zero. 2963 so reset their `numFails' weight to zero. otherwise we connected 2964 2964 to them fruitlessly, so mark it as another fail */ 2965 2965 if( atom->piece_data_time ) { … … 3375 3375 return FALSE; 3376 3376 3377 /* not if we've already got a connection to them... 3377 /* not if we've already got a connection to them... */ 3378 3378 if( peerIsInUse( tor->torrentPeers, atom ) ) 3379 3379 return FALSE; -
trunk/libtransmission/peer-mgr.h
r11532 r11599 2 2 * This file Copyright (C) 2007-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/libtransmission/peer-msgs.c
r11588 r11599 2 2 * This file Copyright (C) 2007-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. … … 225 225 226 226 /* if the peer supports the Extension Protocol in BEP 10 and 227 supplied a reqq argument, it's stored here. otherwisethe227 supplied a reqq argument, it's stored here. Otherwise, the 228 228 value is zero and should be ignored. */ 229 229 int64_t reqq; … … 1908 1908 evbuffer_commit_space( out, iovec, 1 ); 1909 1909 1910 /* if we couldn't load a piece we thought we could load... */ 1911 if( err ) 1912 tr_torrentSetLocalError( msgs->torrent, _( "Couldn't read piece #%zu from disk! Please Verify Local Data." ), (size_t)req.index ); 1913 1910 1914 /* check the piece if it needs checking... */ 1911 1915 if( !err && tr_torrentPieceNeedsCheck( msgs->torrent, req.index ) ) 1912 1916 if(( err = !tr_torrentCheckPiece( msgs->torrent, req.index ))) 1913 tr_torrentSetLocalError( msgs->torrent, _( "Piece #%zu is corrupt! 1917 tr_torrentSetLocalError( msgs->torrent, _( "Piece #%zu is corrupt! Please Verify Local Data." ), (size_t)req.index ); 1914 1918 1915 1919 if( err ) -
trunk/libtransmission/peer-msgs.h
r10800 r11599 2 2 * This file Copyright (C) 2007-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/libtransmission/platform.c
r11227 r11599 2 2 * This file Copyright (C) 2008-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/libtransmission/platform.h
r11126 r11599 2 2 * This file Copyright (C) 2009-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/libtransmission/port-forwarding.c
r11588 r11599 2 2 * This file Copyright (C) 2008-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. … … 112 112 113 113 case TR_PORT_ERROR: 114 /* some kind of an error. 114 /* some kind of an error. wait 60 seconds and retry */ 115 115 sec = 60; 116 116 break; 117 117 118 118 default: 119 /* in progress. 119 /* in progress. pulse frequently. */ 120 120 msec = 333000; 121 121 break; -
trunk/libtransmission/port-forwarding.h
r9868 r11599 2 2 * This file Copyright (C) 2008-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/libtransmission/ptrarray.c
r11398 r11599 2 2 * This file Copyright (C) 2008-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/libtransmission/ptrarray.h
r10798 r11599 2 2 * This file Copyright (C) 2008-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/libtransmission/resume.c
r11583 r11599 2 2 * This file Copyright (C) 2008-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. … … 222 222 tr_tordbg( 223 223 tor, 224 "Couldn't load DND flags. dndlist (%p) has %zu children; torrent has %d files",224 "Couldn't load DND flags. DND list (%p) has %zu children; torrent has %d files", 225 225 list, tr_bencListSize( list ), (int)n ); 226 226 } -
trunk/libtransmission/resume.h
r11583 r11599 2 2 * This file Copyright (C) 2008-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/libtransmission/rpc-server.c
r11588 r11599 2 2 * This file Copyright (C) 2008-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. … … 617 617 "<p>Either disable the IP address whitelist or add your address to it.</p>" 618 618 "<p>If you're editing settings.json, see the 'rpc-whitelist' and 'rpc-whitelist-enabled' entries.</p>" 619 "<p>If you're still using ACLs, use a whitelist instead. 619 "<p>If you're still using ACLs, use a whitelist instead. See the transmission-daemon manpage for details.</p>" ); 620 620 } 621 621 else if( server->isPasswordEnabled -
trunk/libtransmission/rpc-server.h
r11524 r11599 2 2 * This file Copyright (C) 2008-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/libtransmission/rpcimpl.c
r11588 r11599 2 2 * This file Copyright (C) 2008-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. … … 456 456 } 457 457 458 /* faster-than-strcmp() optimization. this is kind of clumsy,458 /* faster-than-strcmp() optimization. This is kind of clumsy, 459 459 but addField() was in the profiler's top 10 list, and this 460 460 makes it 4x faster... */ -
trunk/libtransmission/rpcimpl.h
r11548 r11599 2 2 * This file Copyright (C) 2008-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/libtransmission/session.c
r11588 r11599 2 2 * This file Copyright (C) 2008-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. … … 458 458 /** 459 459 * Periodically save the .resume files of any torrents whose 460 * status has recently changed. 460 * status has recently changed. This prevents loss of metadata 461 461 * in the case of a crash, unclean shutdown, clumsy user, etc. 462 462 */ … … 1677 1677 tr_rpcClose( &session->rpcServer ); 1678 1678 1679 /* close the torrents. get the most active ones first so that1679 /* Close the torrents. Get the most active ones first so that 1680 1680 * if we can't get them all closed in a reasonable amount of time, 1681 1681 * at least we get the most important ones first. */ -
trunk/libtransmission/session.h
r11588 r11599 2 2 * This file Copyright (C) 2008-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/libtransmission/stats.c
r9973 r11599 2 2 * This file Copyright (C) 2007-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/libtransmission/stats.h
r9868 r11599 2 2 * This file Copyright (C) 2007-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/libtransmission/torrent-ctor.c
r10531 r11599 2 2 * This file Copyright (C) 2007-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/libtransmission/torrent-magnet.c
r11548 r11599 2 2 * This file Copyright (C) 2009-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/libtransmission/torrent-magnet.h
r11280 r11599 2 2 * This file Copyright (C) 2009-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/libtransmission/torrent.c
r11588 r11599 2 2 * This file Copyright (C) 2009-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. … … 653 653 654 654 /** 655 * Decide on a block size. constraints:655 * Decide on a block size. Constraints: 656 656 * (1) most clients decline requests over 16 KiB 657 657 * (2) pieceSize must be a multiple of block size … … 766 766 { 767 767 tr_tordbg( tor, "%s", "[LAZY] uh oh, the files disappeared" ); 768 tr_torrentSetLocalError( tor, "%s", _( "No data found! Ensure your drives are connected or use \"Set Location\".To re-download, remove the torrent and re-add it." ) );768 tr_torrentSetLocalError( tor, "%s", _( "No data found! Ensure your drives are connected or use \"Set Location\". To re-download, remove the torrent and re-add it." ) ); 769 769 } 770 770 -
trunk/libtransmission/torrent.h
r11583 r11599 2 2 * This file Copyright (C) 2009-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/libtransmission/tr-dht.c
r11588 r11599 14 14 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 15 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 16 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 17 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 18 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, … … 183 183 184 184 /* Our DHT code is able to take up to 9 nodes in a row without 185 dropping any. 185 dropping any. After that, it takes some time to split buckets. 186 186 So ping the first 8 nodes quickly, then slow down. */ 187 187 if(i < 8) … … 266 266 267 267 /* We currently have no way to enable or disable IPv6 once the DHT has 268 been initialised. 268 been initialised. Oh, well. */ 269 269 if(ipv6 == NULL || (!force && dht6_socket < 0)) { 270 270 if(last_bound) { … … 284 284 #ifdef IPV6_V6ONLY 285 285 /* Since we always open an IPv4 socket on the same port, this 286 shouldn't matter. 286 shouldn't matter. But I'm superstitious. */ 287 287 setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY, &one, sizeof(one)); 288 288 #endif … … 711 711 } 712 712 713 /* Only do this once in a while. 713 /* Only do this once in a while. Counting rather than measuring time 714 714 avoids a system call. */ 715 715 count++; -
trunk/libtransmission/tr-dht.h
r11284 r11599 14 14 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 15 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 16 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 17 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 18 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -
trunk/libtransmission/tr-getopt.c
r11522 r11599 2 2 * This file Copyright (C) 2008-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/libtransmission/tr-getopt.h
r9931 r11599 2 2 * This file Copyright (C) 2008-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/libtransmission/tr-lpd.c
r11588 r11599 14 14 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 15 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 16 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 17 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 18 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, … … 62 62 * 63 63 * This module implements the Local Peer Discovery (LPD) protocol as supported by the 64 * uTorrent client application. 64 * uTorrent client application. A typical LPD datagram is 119 bytes long. 65 65 * 66 66 * $Id$ … … 415 415 * 416 416 * Send a query for torrent t out to the LPD multicast group (or the LAN, for that 417 * matter). 417 * matter). A listening client on the same network might react by adding us to his 418 418 * peer pool for torrent t. 419 419 */ … … 472 472 * 473 473 * @note The port information gets added to the peer structure if tr_lpdConsiderAnnounce 474 * is able to extract the necessary information from the announce message. 474 * is able to extract the necessary information from the announce message. That is, if 475 475 * return != 0, the caller may retrieve the value from the passed structure. 476 476 */ -
trunk/libtransmission/tr-lpd.h
r11257 r11599 14 14 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 15 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 16 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 17 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 18 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -
trunk/libtransmission/transmission.h
r11583 r11599 109 109 * A libtransmission session is created by calling tr_sessionInit(). 110 110 * libtransmission creates a thread for itself so that it can operate 111 * independently of the caller's event loop. 111 * independently of the caller's event loop. The session will continue 112 112 * until tr_sessionClose() is called. 113 113 * … … 318 318 * 319 319 * This is where transmission stores its .torrent files, .resume files, 320 * blocklists, etc. 320 * blocklists, etc. It's set in tr_transmissionInit() and is immutable 321 321 * during the session. 322 322 */ … … 446 446 * 447 447 * The whitelist is a comma-separated list of dotted-quad IP addresses 448 * to be allowed. 448 * to be allowed. Wildmat notation is supported, meaning that 449 449 * '?' is interpreted as a single-character wildcard and 450 450 * '*' is interprted as a multi-character wildcard. … … 504 504 505 505 /* indicates to the caller that the client will take care of 506 * removing the torrent itself. 506 * removing the torrent itself. For example the client may 507 507 * need to keep the torrent alive long enough to cleanly close 508 508 * some resources in another thread. */ … … 842 842 843 843 Instantiating a tr_torrent had gotten more complicated as features were 844 added. 844 added. At one point there were four functions to check metainfo and five 845 845 to create tr_torrent. 846 846 … … 855 855 856 856 You must call one of the SetMetainfo() functions before creating 857 a torrent with a tr_ctor. 857 a torrent with a tr_ctor. The other functions are optional. 858 858 859 859 You can reuse a single tr_ctor to create a batch of torrents -- … … 877 877 878 878 /** @brief Create a new torrent constructor object used to instantiate a tr_torrent 879 @param session the tr_session. 879 @param session the tr_session. NULL is allowed if you're only calling tr_torrentParse() rather than tr_torrentNew() 880 880 @see tr_torrentNew(), tr_torrentParse() */ 881 881 tr_ctor* tr_ctorNew( const tr_session * session_or_NULL ); … … 1029 1029 1030 1030 /** @brief Frees memory allocated by tr_torrentNew(). 1031 Running torrents are stopped first. 1031 Running torrents are stopped first. */ 1032 1032 void tr_torrentFree( tr_torrent * torrent ); 1033 1033 … … 1072 1072 * 1073 1073 * IDs are good as simple lookup keys, but are not persistent 1074 * between sessions. 1074 * between sessions. If you need that, use tr_info.hash or 1075 1075 * tr_info.hashString. 1076 1076 */ … … 1220 1220 * Returns the root directory of where the torrent is. 1221 1221 * 1222 * This will usually be the downloadDir. 1222 * This will usually be the downloadDir. However if the torrent 1223 1223 * has an incompleteDir enabled and hasn't finished downloading 1224 1224 * yet, that will be returned instead. … … 1297 1297 /** 1298 1298 * Register to be notified whenever a torrent's "completeness" 1299 * changes. 1299 * changes. This will be called, for example, when a torrent 1300 1300 * finishes downloading and changes from TR_LEECH to 1301 1301 * either TR_SEED or TR_PARTIAL_SEED. … … 1743 1743 /** When tr_stat.activity is TR_STATUS_CHECK or TR_STATUS_CHECK_WAIT, 1744 1744 this is the percentage of how much of the files has been 1745 verified. 1745 verified. When it gets to 1, the verify process is done. 1746 1746 Range is [0..1] 1747 1747 @see tr_stat.activity */ … … 1758 1758 double metadataPercentComplete; 1759 1759 1760 /** How much has been downloaded of the files the user wants. 1760 /** How much has been downloaded of the files the user wants. This differs 1761 1761 from percentComplete if the user wants only some of the torrent's files. 1762 1762 Range is [0..1] … … 1813 1813 1814 1814 /** Byte count of all the piece data we'll have downloaded when we're done, 1815 whether or not we have it yet. 1815 whether or not we have it yet. This may be less than tr_info.totalSize 1816 1816 if only some of the torrent's files are wanted. 1817 1817 [0...tr_info.totalSize] */ … … 1819 1819 1820 1820 /** Byte count of how much data is left to be downloaded until we've got 1821 all the pieces that we want. 1821 all the pieces that we want. [0...tr_info.sizeWhenDone] */ 1822 1822 uint64_t leftUntilDone; 1823 1823 … … 1827 1827 1828 1828 /** Byte count of all the corrupt data you've ever downloaded for 1829 this torrent. 1829 this torrent. If you're on a poisoned torrent, this number can 1830 1830 grow very large. */ 1831 1831 uint64_t corruptEver; … … 1835 1835 1836 1836 /** Byte count of all the non-corrupt data you've ever downloaded 1837 for this torrent. 1837 for this torrent. If you deleted the files and downloaded a second 1838 1838 time, this will be 2*totalSize.. */ 1839 1839 uint64_t downloadedEver; … … 1887 1887 1888 1888 /** Return a pointer to an tr_stat structure with updated information 1889 on the torrent. 1889 on the torrent. This is typically called by the GUI clients every 1890 1890 second or so to get a new snapshot of the torrent's status. */ 1891 1891 const tr_stat * tr_torrentStat( tr_torrent * torrent ); 1892 1892 1893 1893 /** Like tr_torrentStat(), but only recalculates the statistics if it's 1894 been longer than a second since they were last calculated. 1894 been longer than a second since they were last calculated. This can 1895 1895 reduce the CPU load if you're calling tr_torrentStat() frequently. */ 1896 1896 const tr_stat * tr_torrentStatCached( tr_torrent * torrent ); -
trunk/libtransmission/trevent.c
r11588 r11599 2 2 * This file Copyright (C) 2007-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/libtransmission/trevent.h
r11588 r11599 2 2 * This file Copyright (C) 2007-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/libtransmission/upnp.c
r10900 r11599 2 2 * This file Copyright (C) 2007-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. … … 197 197 } 198 198 tr_ninf( getKey( ), 199 _( 200 "Port forwarding through \"%s\", service \"%s\". (local address: %s:%d)" ), 199 _( "Port forwarding through \"%s\", service \"%s\". (local address: %s:%d)" ), 201 200 handle->urls.controlURL, handle->data.first.servicetype, 202 201 handle->lanaddr, port ); -
trunk/libtransmission/upnp.h
r9868 r11599 2 2 * This file Copyright (C) 2007-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/libtransmission/utils-test.c
r11345 r11599 271 271 272 272 #if 0 273 fprintf( stderr, "searching for %d. 273 fprintf( stderr, "searching for %d. ", i ); 274 274 fprintf( stderr, "result: index = %d, ", pos ); 275 275 if( pos != N ) -
trunk/libtransmission/utils.c
r11574 r11599 2 2 * This file Copyright (C) 2009-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. … … 679 679 va_end( vl ); 680 680 681 /* terminate the string. 681 /* terminate the string. if nonempty, eat the unwanted trailing slash */ 682 682 if( pch != buf ) 683 683 --pch; … … 900 900 901 901 /* 902 * Copy src to string dst of size siz. 903 * will be copied. 902 * Copy src to string dst of size siz. At most siz-1 characters 903 * will be copied. Always NUL terminates (unless siz == 0). 904 904 * Returns strlen(src); if retval >= siz, truncation occurred. 905 905 */ 906 906 size_t 907 tr_strlcpy( char * dst, 908 const void * src, 909 size_t siz ) 907 tr_strlcpy( char * dst, const void * src, size_t siz ) 910 908 { 911 909 #ifdef HAVE_STRLCPY -
trunk/libtransmission/utils.h
r11574 r11599 2 2 * This file Copyright (C) 2009-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. … … 273 273 * @return a newly-allocated string that must be freed with tr_free() 274 274 * @param str the string to make a clean copy of 275 * @param len the length of the string to copy. 275 * @param len the length of the string to copy. If -1, the entire string is used. 276 276 */ 277 277 char* tr_utf8clean( const char * str, int len ) TR_GNUC_MALLOC; … … 332 332 * @brief make a newly-allocated copy of a substring 333 333 * @param in is a void* so that callers can pass in both signed & unsigned without a cast 334 * @param len length of the substring to copy. 334 * @param len length of the substring to copy. if a length less than zero is passed in, strlen( len ) is used 335 335 * @return a newly-allocated copy of `in' that can be freed with tr_free() 336 336 */ … … 541 541 * If something blocks the libtransmission thread for more than a second, 542 542 * that counter may be thrown off, so this function is not guaranteed 543 * to always be accurate. 543 * to always be accurate. However, it is *much* faster when 100% accuracy 544 544 * isn't needed 545 545 */ -
trunk/libtransmission/verify.c
r11565 r11599 2 2 * This file Copyright (C) 2007-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. … … 148 148 /* stopwatch */ 149 149 end = tr_time( ); 150 tr_tordbg( tor, "Verification is done. 150 tr_tordbg( tor, "Verification is done. It took %d seconds to verify %"PRIu64" bytes (%"PRIu64" bytes per second)", 151 151 (int)(end-begin), tor->info.totalSize, 152 152 (uint64_t)(tor->info.totalSize/(1+(end-begin))) ); -
trunk/libtransmission/verify.h
r10904 r11599 2 2 * This file Copyright (C) 2007-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/libtransmission/web.c
r11548 r11599 2 2 * This file Copyright (C) 2008-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/libtransmission/web.h
r11514 r11599 2 2 * This file Copyright (C) 2008-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/libtransmission/webseed.c
r11548 r11599 2 2 * This file Copyright (C) 2008-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/libtransmission/webseed.h
r10931 r11599 2 2 * This file Copyright (C) 2008-2010 Mnemosyne LLC 3 3 * 4 * This file is licensed by the GPL version 2. 4 * This file is licensed by the GPL version 2. Works owned by the 5 5 * Transmission project are granted a special exemption to clause 2(b) 6 6 * so that the bulk of its code can remain under the MIT license. -
trunk/libtransmission/wildmat.c
r10521 r11599 4 4 ** Do shell-style pattern matching for ?, \, [], and * characters. 5 5 ** Might not be robust in face of malformed patterns; e.g., "foo[a-" 6 ** could cause a segmentation violation. 6 ** could cause a segmentation violation. It is 8bit clean. 7 7 ** 8 8 ** Written by Rich $alz, mirror!rs, Wed Nov 26 19:03:17 EST 1986. … … 12 12 ** 13 13 ** Special thanks to Lars Mathiesen <thorinn@diku.dk> for the ABORT code. 14 ** This can greatly speed up failing wildcard patterns. 14 ** This can greatly speed up failing wildcard patterns. For example: 15 15 ** pattern: -*-*-*-*-*-*-12-*-*-*-m-*-*-* 16 16 ** text 1: -adobe-courier-bold-o-normal--12-120-75-75-m-70-iso8859-1 17 17 ** text 2: -adobe-courier-bold-o-normal--12-120-75-75-X-70-iso8859-1 18 ** Text 1 matches with 51 calls, while text 2 fails with 54 calls. 19 ** the ABORT, then it takes 22310 calls to fail. Ugh.The following18 ** Text 1 matches with 51 calls, while text 2 fails with 54 calls. Without 19 ** the ABORT, then it takes 22310 calls to fail. Ugh. The following 20 20 ** explanation is from Lars: 21 21 ** The precondition that must be fulfilled is that DoMatch will consume 22 ** at least one character in text. 22 ** at least one character in text. This is true if *p is neither '*' nor 23 23 ** '\0'.) The last return has ABORT instead of FALSE to avoid quadratic 24 ** behaviour in cases like pattern "*a*b*c*d" with text "abcxxxxx". 24 ** behaviour in cases like pattern "*a*b*c*d" with text "abcxxxxx". With 25 25 ** FALSE, each star-loop has to run to the end of the text; with ABORT 26 26 ** only the last one does. … … 29 29 ** instance will return either TRUE or ABORT, and any calling instance 30 30 ** will therefore return immediately after (without calling recursively 31 ** again). In effect, only one star-loop is ever active.It would be31 ** again). In effect, only one star-loop is ever active. It would be 32 32 ** possible to modify the code to maintain this context explicitly, 33 33 ** eliminating all recursive calls at the cost of some complication and 34 34 ** loss of clarity (and the ABORT stuff seems to be unclear enough by 35 ** itself). 35 ** itself). I think it would be unwise to try to get this into a 36 36 ** released version unless you have a good test data base to try it out 37 37 ** on. … … 111 111 112 112 /* 113 ** User-level routine. 113 ** User-level routine. Returns TRUE or FALSE. 114 114 */ 115 115 int
Note: See TracChangeset
for help on using the changeset viewer.