static const struct tr_option options[] =
{
- { 'a', "allowed", "Allowed IP addresses. (Default: " TR_DEFAULT_RPC_WHITELIST ")", "a", 1, "<list>" },
+ { 'a', "allowed", "Allowed IP addresses. (Default: " TR_DEFAULT_RPC_WHITELIST ")", "a", 1, "<list>" },
{ 'b', "blocklist", "Enable peer blocklists", "b", 0, NULL },
{ 'B', "no-blocklist", "Disable peer blocklists", "B", 0, NULL },
{ 'c', "watch-dir", "Where to watch for new .torrent files", "c", 1, "<directory>" },
{ 'U', "no-uplimit", "Disable max upload speed for the current torrent(s) or globally", "U", 0, NULL },
{ 'v', "verify", "Verify the current torrent(s)", "v", 0, NULL },
{ 'V', "version", "Show version number and exit", "V", 0, NULL },
- { 'w', "download-dir", "When adding a new torrent, set its download folder. Otherwise, set the default download folder", "w", 1, "<path>" },
+ { 'w', "download-dir", "When adding a new torrent, set its download folder. Otherwise, set the default download folder", "w", 1, "<path>" },
{ 'x', "pex", "Enable peer exchange (PEX)", "x", 0, NULL },
{ 'X', "no-pex", "Disable peer exchange (PEX)", "X", 0, NULL },
{ 'y', "lpd", "Enable local peer discovery (LPD)", "y", 0, NULL },
status |= processResponse( rpcurl, (const char*) evbuffer_pullup( buf, -1 ), evbuffer_get_length( buf ) );
break;
case 409:
- /* session id failed. our curl header func has already
- * pulled the new session id from this response's headers,
- * build a new CURL* and try again */
+ /* Session id failed. Our curl header func has already
+ * pulled the new session id from this response's headers,
+ * build a new CURL* and try again */
curl_easy_cleanup( curl );
curl = NULL;
flush( rpcurl, benc );
/*
* This file Copyright (C) 2009-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2007-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2007-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2008-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2008-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2007-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2007-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2007-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
if( (priority!=old_priority) || (enabled!=old_enabled) || (have!=old_have) || (prog!=old_prog) )
{
/* Changing a value in the sort column can trigger a resort
- * which breaks this foreach() call. (See #3529)
+ * which breaks this foreach() call. (See #3529)
* As a workaround: if that's about to happen, temporarily disable
* sorting until we finish walking the tree. */
if( !refresh_data->resort_needed )
/*
* This file Copyright (C) 2009-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
g_object_steal_data( o, DIRTY_KEY );
- /* walk through all the torrents, tallying how many matches there are
- * for the various categories. also make a sorted list of all tracker
+ /* Walk through all the torrents, tallying how many matches there are
+ * for the various categories. Also make a sorted list of all tracker
* hosts s.t. we can merge it with the existing list */
if( gtk_tree_model_get_iter_first( tmodel, &iter )) do
{
/*
* This file Copyright (C) 2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2007-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2007-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
"The OS X client, CLI client, and parts of libtransmission are licensed under the terms of the MIT license.\n\n"
"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"
"1. The MIT-licensed portions of Transmission listed above are exempt from GPLv2 clause 2(b) and may retain their MIT license.\n\n"
-"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.";
+"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.";
#endif
struct cbdata
{
case SIGINT:
case SIGTERM:
- g_message( _( "Got signal %d; trying to shut down cleanly. Do it again if it gets stuck." ), sig );
+ g_message( _( "Got signal %d; trying to shut down cleanly. Do it again if it gets stuck." ), sig );
gtr_actions_handler( "quit", sighandler_cbdata );
break;
/* Both libcurl and GNOME have hooks for proxy support.
* If someone has set the http_proxy environment variable,
- * don't apply the GNOME settings here. That way libcurl can override GNOME. */
+ * don't apply the GNOME settings here. That way libcurl can override GNOME. */
if( !env_checked ) {
const char * str = g_getenv( "http_proxy" );
env_set = str && *str;
* so tell it to present its window to the user */
err = NULL;
if( !gtr_dbus_present_window( ) )
- err = g_strdup( _( "Transmission is already running, but is not responding. To start a new session, you must first close the existing Transmission process." ) );
+ err = g_strdup( _( "Transmission is already running, but is not responding. To start a new session, you must first close the existing Transmission process." ) );
}
if( didlock && ( didinit || cf_init( configDir, &err ) ) )
GTK_MESSAGE_INFO,
GTK_BUTTONS_NONE,
"%s",
- _( "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." ) );
+ _( "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." ) );
gtk_dialog_add_button( GTK_DIALOG( w ), GTK_STOCK_QUIT, GTK_RESPONSE_REJECT );
gtk_dialog_add_button( GTK_DIALOG( w ), _( "I _Accept" ), GTK_RESPONSE_ACCEPT );
gtk_dialog_set_default_response( GTK_DIALOG( w ), GTK_RESPONSE_ACCEPT );
/*
* This file Copyright (C) 2007-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2007-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2008-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
case COL_SEQUENCE:
title = _( "Time" ); break;
- /* noun. column title for a list */
+ /* noun. column title for a list */
case COL_NAME:
title = _( "Name" ); break;
- /* noun. column title for a list */
+ /* noun. column title for a list */
case COL_MESSAGE:
title = _( "Message" ); break;
/*
* This file Copyright (C) 2008-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2008-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2008-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2009-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2009-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2007-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
if( response == TR_RESPONSE_RESET )
{
const char * primary = _( "Reset your statistics?" );
- const char * secondary = _( "These statistics are for your information only. "
+ const char * secondary = _( "These statistics are for your information only. "
"Resetting them doesn't affect the statistics logged by your BitTorrent trackers." );
const int flags = GTK_DIALOG_DESTROY_WITH_PARENT
| GTK_DIALOG_MODAL;
/*
* This file Copyright (C) 2007-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2007-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
GtkCellRenderer * icon_renderer;
int bar_height;
- /* use this instead of tr_stat.pieceUploadSpeed so that the model can
- control when the speed displays get updated. this is done to keep
+ /* Use this instead of tr_stat.pieceUploadSpeed so that the model can
+ control when the speed displays get updated. This is done to keep
the individual torrents' speeds and the status bar's overall speed
in sync even if they refresh at slightly different times */
double upload_speed_KBps;
/*
* This file Copyright (C) 2007-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2007-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2007-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2007-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2007-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
{
g_object_set( p->renderer, "compact", gtr_pref_flag_get( key ), NULL );
/* since the cell size has changed, we need gtktreeview to revalidate
- * its fixed-height mode values. Unfortunately there's not an API call
+ * its fixed-height mode values. Unfortunately there's not an API call
* for that, but it *does* revalidate when it thinks the style's been tweaked */
g_signal_emit_by_name( p->view, "style-set", NULL, NULL );
}
tr_sessionGetStats( session, &stats );
tr_strlsize( up, stats.uploadedBytes, sizeof( up ) );
tr_strlsize( down, stats.downloadedBytes, sizeof( down ) );
- /* Translators: "size|" is here for disambiguation. Please remove it from your translation.
+ /* Translators: "size|" is here for disambiguation. Please remove it from your translation.
%1$s is the size of the data we've downloaded
%2$s is the size of the data we've uploaded */
g_snprintf( buf, sizeof( buf ), Q_(
tr_sessionGetCumulativeStats( session, &stats );
tr_strlsize( up, stats.uploadedBytes, sizeof( up ) );
tr_strlsize( down, stats.downloadedBytes, sizeof( down ) );
- /* Translators: "size|" is here for disambiguation. Please remove it from your translation.
+ /* Translators: "size|" is here for disambiguation. Please remove it from your translation.
%1$s is the size of the data we've downloaded
%2$s is the size of the data we've uploaded */
g_snprintf( buf, sizeof( buf ), Q_(
.It Ev TRANSMISSION_HOME
Sets the default config-dir.
.It Ev http_proxy
-libcurl uses this environment variable when performing tracker announces. If set, this overrides the GNOME proxy preferences.
+libcurl uses this environment variable when performing tracker announces. If set, this overrides the GNOME proxy preferences.
.El
.Sh FILES
.Bl -tag -width Ds -compact
/*
* This file Copyright (C) 2008-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
if( gtr_is_magnet_link( url ) && ( strstr( url, xt ) == NULL ) )
{
g_string_append_printf( gstr, "\n \n" );
- 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 );
+ 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 );
}
gtk_message_dialog_format_secondary_text( GTK_MESSAGE_DIALOG( w ), "%s", gstr->str );
/*
* This file Copyright (C) 2008-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* Once the bits are split out into bytes of UTF-8, this is a mask OR-ed
- * into the first byte, depending on how many bytes follow. There are
+ * into the first byte, depending on how many bytes follow. There are
* as many entries in this table as there are UTF-8 sequence types.
* (I.e., one byte sequence, two byte... etc.). Remember that sequencs
* for *legal* UTF-8 will be 4 or fewer bytes total.
* length = trailingBytesForUTF8[*source]+1;
* and the sequence is illegal right away if there aren't that many bytes
* available.
- * If presented with a length > 4, this returns false. The Unicode
+ * If presented with a length > 4, this returns false. The Unicode
* definition of UTF-8 goes up to 4-byte sequences.
*/
Note A.
The fall-through switches in UTF-8 reading code save a
- temp variable, some decrements & conditionals. The switches
+ temp variable, some decrements & conditionals. The switches
are equivalent to the following loop:
{
int tmpBytesToRead = extraBytesToRead+1;
/* ---------------------------------------------------------------------
- Conversions between UTF32, UTF-16, and UTF-8. Header file.
+ Conversions between UTF32, UTF-16, and UTF-8. Header file.
Several funtions are included here, forming a complete set of
- conversions between the three formats. UTF-7 is not included
+ conversions between the three formats. UTF-7 is not included
here, but is handled in a separate source file.
Each of these routines takes pointers to input buffers and output
- buffers. The input buffers are const.
+ buffers. The input buffers are const.
Each routine converts the text between *sourceStart and sourceEnd,
putting the result into the buffer between *targetStart and
These conversion functions take a ConversionFlags argument. When this
flag is set to strict, both irregular sequences and isolated surrogates
- will cause an error. When the flag is set to lenient, both irregular
+ will cause an error. When the flag is set to lenient, both irregular
sequences and isolated surrogates are converted.
Whether the flag is strict or lenient, all illegal sequences will cause
Output parameters:
The value "sourceIllegal" is returned from some routines if the input
- sequence is malformed. When "sourceIllegal" is returned, the source
+ sequence is malformed. When "sourceIllegal" is returned, the source
value will point to the illegal value that caused the problem. E.g.,
in UTF-8 when a sequence is malformed, it points to the start of the
- malformed sequence.
+ malformed sequence.
Author: Mark E. Davis, 1994.
Rev History: Rick McGowan, fixes & updates May 2001.
/*! \brief JSON parser callback
\param ctx The pointer passed to new_JSON_parser.
- \param type An element of JSON_type but not JSON_T_NONE.
+ \param type An element of JSON_type but not JSON_T_NONE.
\param value A representation of the parsed value. This parameter is NULL for
JSON_T_ARRAY_BEGIN, JSON_T_ARRAY_END, JSON_T_OBJECT_BEGIN, JSON_T_OBJECT_END,
JSON_T_NULL, JSON_T_TRUE, and SON_T_FALSE. String values are always returned
/*
* This file Copyright (C) 2009-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
and once over IPv6.
To be safe, we should do both: add the "ipv6=" parameter and
- announce twice. At any rate, we're already computing our IPv6
+ announce twice. At any rate, we're already computing our IPv6
address (for the LTEP handshake), so this comes for free. */
ipv6 = tr_globalIPv6( );
else if( ( responseCode == 404 ) || ( 500 <= responseCode && responseCode <= 599 ) )
{
/* 404: The requested resource could not be found but may be
- * available again in the future. Subsequent requests by
+ * available again in the future. Subsequent requests by
* the client are permissible. */
/* 5xx: indicate cases in which the server is aware that it
int rc;
rc = tr_dhtAnnounce(tor, AF_INET, 1);
if(rc == 0)
- /* The DHT is not ready yet. Try again soon. */
+ /* The DHT is not ready yet. Try again soon. */
tor->dhtAnnounceAt = now + 5 + tr_cryptoWeakRandInt( 5 );
else
/* We should announce at least once every 30 minutes. */
/*
* This file Copyright (C) 2009-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
const uint8_t * compact;
int compactLen;
- /* [0...100] for probability a peer is a seed. calculated by the leecher/seeder ratio */
+ /* [0...100] for probability a peer is a seed. calculated by the leecher/seeder ratio */
int8_t seedProbability;
}
tr_tracker_event;
/*
* This file Copyright (C) 2008-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
int peerCount = tr_ptrArraySize( peerArray );
struct tr_peerIo ** peers = (struct tr_peerIo**) tr_ptrArrayBase( peerArray );
- /* First phase of IO. Tries to distribute bandwidth fairly to keep faster
- * peers from starving the others. Loop through the peers, giving each a
- * small chunk of bandwidth. Keep looping until we run out of bandwidth
+ /* First phase of IO. Tries to distribute bandwidth fairly to keep faster
+ * peers from starving the others. Loop through the peers, giving each a
+ * small chunk of bandwidth. Keep looping until we run out of bandwidth
* and/or peers that can use it */
n = peerCount;
dbgmsg( "%d peers to go round-robin for %s", n, (dir==TR_UP?"upload":"download") );
}
}
- /* First phase of IO. Tries to distribute bandwidth fairly to keep faster
- * peers from starving the others. Loop through the peers, giving each a
- * small chunk of bandwidth. Keep looping until we run out of bandwidth
+ /* First phase of IO. Tries to distribute bandwidth fairly to keep faster
+ * peers from starving the others. Loop through the peers, giving each a
+ * small chunk of bandwidth. Keep looping until we run out of bandwidth
* and/or peers that can use it */
phaseOne( &high, dir );
phaseOne( &normal, dir );
phaseOne( &low, dir );
- /* Second phase of IO. To help us scale in high bandwidth situations,
+ /* Second phase of IO. To help us scale in high bandwidth situations,
* enable on-demand IO for peers with bandwidth left to burn.
* This on-demand IO is enabled until (1) the peer runs out of bandwidth,
* or (2) the next tr_bandwidthAllocate() call, when we start over again. */
/*
* This file Copyright (C) 2008-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
* Underneath those are per-peer bandwidth objects owned by tr_peer.
*
* tr_session also owns a tr_handshake's bandwidths, so that the handshake
- * I/O can be counted in the global raw totals. When the handshake is done,
+ * I/O can be counted in the global raw totals. When the handshake is done,
* the bandwidth's ownership passes to a tr_peer.
*
* MEASURING
*
* When you ask a bandwidth object for its speed, it gives the speed of the
- * subtree underneath it as well. So you can get Transmission's overall
+ * subtree underneath it as well. So you can get Transmission's overall
* speed by quering tr_session's bandwidth, per-torrent speeds by asking
* tr_torrent's bandwidth, and per-peer speeds by asking tr_peer's bandwidth.
*
* CONSTRAINING
*
- * Call tr_bandwidthAllocate() periodically. tr_bandwidth knows its current
+ * Call tr_bandwidthAllocate() periodically. tr_bandwidth knows its current
* speed and will decide how many bytes to make available over the
* user-specified period to reach the user-specified desired speed.
* If appropriate, it notifies its peer-ios that new bandwidth is available.
/*
* This file Copyright (C) 2008-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2008-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
* An object that acts like a union for
* integers, strings, lists, dictionaries, booleans, and floating-point numbers.
* The structure is named tr_benc due to the historical reason that it was
- * originally tightly coupled with bencoded data. It currently supports
+ * originally tightly coupled with bencoded data. It currently supports
* being parsed from, and serialized to, both bencoded notation and json notation.
*
* @{
***
**/
-/* this is only quasi-supported. don't rely on it too heavily outside of libT */
+/* this is only quasi-supported. don't rely on it too heavily outside of libT */
void tr_bencMergeDicts( tr_benc * target, const tr_benc * source );
/* @} */
/*
* This file Copyright (C) 2009-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2009-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
tr_bitfield* tr_bitfieldOr( tr_bitfield*, const tr_bitfield* );
/** A stripped-down version of bitfieldHas to be used
- for speed when you're looping quickly. This version
+ for speed when you're looping quickly. This version
has none of tr_bitfieldHas()'s safety checks, so you
need to call tr_bitfieldTestFast() first before you
start looping. */
/*
* This file Copyright (C) 2009-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2008-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2008-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2008-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2009-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2009-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2009-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/* * This file Copyright (C) 2007-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2007-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
* 1. Enable readahead for reasons described above w/POSIX_FADV_SEQUENTIAL.
*
* 2. Disable OS-level caching due to user reports of adverse effects of
- * excessive inactive memory. However this is experimental because
+ * excessive inactive memory. However this is experimental because
* previous attempts at this have *also* had adverse effects (see r8198)
*
* It's okay for this to fail silently, so don't let it affect errno
break;
}
- dbgmsg( "it's not already open. looking for an open slot or an old file." );
+ dbgmsg( "it's not already open. looking for an open slot or an old file." );
while( winner < 0 )
{
time_t date = tr_time( ) + 1;
/*
* This file Copyright (C) 2007-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2007-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
handshake->haveReadAnythingFromPeer = TRUE;
- pstrlen = evbuffer_pullup( inbuf, 1 )[0]; /* peek, don't read. We may be
+ pstrlen = evbuffer_pullup( inbuf, 1 )[0]; /* peek, don't read. We may be
handing inbuf to AWAITING_YA */
if( pstrlen == 19 ) /* unencrypted */
/*
* This file Copyright (C) 2007-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2007-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2008-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2008-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2008-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
#endif
/** @ingroup tr_benc */
-int tr_jsonParse( const char * source, /* such as a filename. only when logging an error */
+int tr_jsonParse( const char * source, /* Such as a filename. Only when logging an error */
const void * vbuf,
size_t len,
struct tr_benc * setme_benc,
/*
* This file Copyright (C) 2007-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2007-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
* @brief remove the list's node that compares equal to "b" when compared with "compare_func"
* @param list pointer to the list
* @param b the comparison key
- * @param compare_func the comparison function. The arguments passed to it will be the list's pointers and the comparison key "b"
+ * @param compare_func the comparison function. The arguments passed to it will be the list's pointers and the comparison key "b"
* @return the removed data pointer, or NULL if no match was found
*/
void* tr_list_remove( tr_list ** list,
* @brief find the list node whose data that compares equal to "b" when compared with "compare_func"
* @param list pointer to the list
* @param b the comparison key
- * @param compare_func the comparison function. The arguments passed to it will be the list's pointers and the comparison key "b"
+ * @param compare_func the comparison function. The arguments passed to it will be the list's pointers and the comparison key "b"
* @return the matching list node, or NULL if not match was found
*/
tr_list* tr_list_find( tr_list * list,
/*
* This file Copyright (C) 2009-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
***/
/* this base32 code converted from code by Robert Kaye and Gordon Mohr
- * and is public domain. see http://bitzi.com/publicdomain for more info */
+ * and is public domain. see http://bitzi.com/publicdomain for more info */
static const int base32Lookup[] =
{
/*
* This file Copyright (C) 2009-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2007-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2007-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2009-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
* If the text immediately following that '/' isn't 'announce'
* it will be taken as a sign that that tracker doesn't support
* the scrape convention. If it does, substitute 'scrape' for
- * 'announce' to find the scrape page. */
+ * 'announce' to find the scrape page. */
if( ( ( s = strrchr( announce, '/' ) ) ) && !strncmp( ++s, "announce", 8 ) )
{
const char * prefix = announce;
/*
* This file Copyright (C) 2009-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2007-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
else
tr_ndbg(
getKey( ),
- "%s failed. natpmp returned %d (%s); errno is %d (%s)",
+ "%s failed. Natpmp returned %d (%s); errno is %d (%s)",
func, ret, strnatpmperr( ret ), errno, tr_strerror( errno ) );
}
/*
* This file Copyright (C) 2007-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
Please feel free to copy them into your software if it can help
unbreaking the double-stack Internet. */
-/* Get the source address used for a given destination address. Since
+/* Get the source address used for a given destination address. Since
there is no official interface to get this information, we create
a connected UDP socket (connected UDP... hmm...) and check its source
address. */
(memcmp(address, zeroes, 15) == 0 &&
(address[15] == 0 || address[15] == 1)) ||
/* Addresses outside of 2000::/3 are currently reserved,
- but might be allocated at some future time. Since
+ but might be allocated at some future time. Since
there are a lot of buggy peers pushing around such
addresses over PEX, we reject them until the end of
the 13th Baktun. */
/*
* This file Copyright (C) 2008-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2007-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2007-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2007-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/**
* Peer information that should be kept even before we've connected and
- * after we've disconnected. These are kept in a pool of peer_atoms to decide
+ * after we've disconnected. These are kept in a pool of peer_atoms to decide
* which ones would make good candidates for connecting to, and to watch out
* for banned peers.
*
deleteTimers( manager );
- /* free the handshakes. Abort invokes handshakeDoneCB(), which removes
+ /* free the handshakes. Abort invokes handshakeDoneCB(), which removes
* the item from manager->handshakes, so this is a little roundabout... */
while( !tr_ptrArrayEmpty( &manager->incomingHandshakes ) )
tr_handshakeAbort( tr_ptrArrayNth( &manager->incomingHandshakes, 0 ) );
*** for too long and (b) avoiding duplicate requests before endgame.
***
*** 2. Torrent::pieces, an array of "struct weighted_piece" which lists the
-*** pieces that we want to request. It's used to decide which blocks to
+*** pieces that we want to request. It's used to decide which blocks to
*** return next when tr_peerMgrGetBlockRequests() is called.
**/
tr_file_index_t fileIndex;
/* only add this to downloadedCur if we got it from a peer --
- * webseeds shouldn't count against our ratio. As one tracker
+ * webseeds shouldn't count against our ratio. As one tracker
* admin put it, "Those pieces are downloaded directly from the
* content distributor, not the peers, it is the tracker's job
* to manage the swarms, not the web server and does not fit
peerDestructor( t, tr_ptrArrayNth( &t->peers, i ) );
tr_ptrArrayClear( &t->peers );
- /* disconnect the handshakes. handshakeAbort calls handshakeDoneCB(),
+ /* disconnect the handshakes. handshakeAbort calls handshakeDoneCB(),
* which removes the handshake from t->outgoingHandshakes... */
while( !tr_ptrArrayEmpty( &t->outgoingHandshakes ) )
tr_handshakeAbort( tr_ptrArrayNth( &t->outgoingHandshakes, 0 ) );
atom = peer->atom;
/* if we transferred piece data, then they might be good peers,
- so reset their `numFails' weight to zero. otherwise we connected
+ so reset their `numFails' weight to zero. otherwise we connected
to them fruitlessly, so mark it as another fail */
if( atom->piece_data_time ) {
tordbg( t, "resetting atom %s numFails to 0", tr_atomAddrStr(atom) );
if( atomIsSeed( atom ) || ( atom->uploadOnly == UPLOAD_ONLY_YES ) )
return FALSE;
- /* not if we've already got a connection to them... */
+ /* not if we've already got a connection to them... */
if( peerIsInUse( tor->torrentPeers, atom ) )
return FALSE;
/*
* This file Copyright (C) 2007-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2007-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
struct tr_incoming incoming;
/* if the peer supports the Extension Protocol in BEP 10 and
- supplied a reqq argument, it's stored here. otherwise the
+ supplied a reqq argument, it's stored here. Otherwise, the
value is zero and should be ignored. */
int64_t reqq;
iovec[0].iov_len = req.length;
evbuffer_commit_space( out, iovec, 1 );
+ /* if we couldn't load a piece we thought we could load... */
+ if( err )
+ tr_torrentSetLocalError( msgs->torrent, _( "Couldn't read piece #%zu from disk! Please Verify Local Data." ), (size_t)req.index );
+
/* check the piece if it needs checking... */
if( !err && tr_torrentPieceNeedsCheck( msgs->torrent, req.index ) )
if(( err = !tr_torrentCheckPiece( msgs->torrent, req.index )))
- tr_torrentSetLocalError( msgs->torrent, _( "Piece #%zu is corrupt! Please Verify Local Data." ), (size_t)req.index );
+ tr_torrentSetLocalError( msgs->torrent, _( "Piece #%zu is corrupt! Please Verify Local Data." ), (size_t)req.index );
if( err )
{
/*
* This file Copyright (C) 2007-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2008-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2009-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2008-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
break;
case TR_PORT_ERROR:
- /* some kind of an error. wait 60 seconds and retry */
+ /* some kind of an error. wait 60 seconds and retry */
sec = 60;
break;
default:
- /* in progress. pulse frequently. */
+ /* in progress. pulse frequently. */
msec = 333000;
break;
}
/*
* This file Copyright (C) 2008-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2008-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2008-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2008-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
{
tr_tordbg(
tor,
- "Couldn't load DND flags. dnd list (%p) has %zu children; torrent has %d files",
+ "Couldn't load DND flags. DND list (%p) has %zu children; torrent has %d files",
list, tr_bencListSize( list ), (int)n );
}
/*
* This file Copyright (C) 2008-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2008-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
"<p>Unauthorized IP Address.</p>"
"<p>Either disable the IP address whitelist or add your address to it.</p>"
"<p>If you're editing settings.json, see the 'rpc-whitelist' and 'rpc-whitelist-enabled' entries.</p>"
- "<p>If you're still using ACLs, use a whitelist instead. See the transmission-daemon manpage for details.</p>" );
+ "<p>If you're still using ACLs, use a whitelist instead. See the transmission-daemon manpage for details.</p>" );
}
else if( server->isPasswordEnabled
&& ( !pass || !user || strcmp( server->username, user )
/*
* This file Copyright (C) 2008-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2008-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
tr_torrentPeersFree( peers, peerCount );
}
-/* faster-than-strcmp() optimization. this is kind of clumsy,
+/* faster-than-strcmp() optimization. This is kind of clumsy,
but addField() was in the profiler's top 10 list, and this
makes it 4x faster... */
#define tr_streq(a,alen,b) ((alen+1==sizeof(b)) && !memcmp(a,b,alen))
/*
* This file Copyright (C) 2008-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2008-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/**
* Periodically save the .resume files of any torrents whose
- * status has recently changed. This prevents loss of metadata
+ * status has recently changed. This prevents loss of metadata
* in the case of a crash, unclean shutdown, clumsy user, etc.
*/
static void
tr_sharedClose( session );
tr_rpcClose( &session->rpcServer );
- /* close the torrents. get the most active ones first so that
+ /* Close the torrents. Get the most active ones first so that
* if we can't get them all closed in a reasonable amount of time,
* at least we get the most important ones first. */
tor = NULL;
/*
* This file Copyright (C) 2008-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2007-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2007-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2007-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2009-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2009-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2009-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
static void torrentStart( tr_torrent * tor );
/**
- * Decide on a block size. constraints:
+ * Decide on a block size. Constraints:
* (1) most clients decline requests over 16 KiB
* (2) pieceSize must be a multiple of block size
*/
if( disappeared )
{
tr_tordbg( tor, "%s", "[LAZY] uh oh, the files disappeared" );
- 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." ) );
+ 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." ) );
}
return disappeared;
/*
* This file Copyright (C) 2009-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
}
/* Our DHT code is able to take up to 9 nodes in a row without
- dropping any. After that, it takes some time to split buckets.
+ dropping any. After that, it takes some time to split buckets.
So ping the first 8 nodes quickly, then slow down. */
if(i < 8)
nap(2);
int one = 1;
/* We currently have no way to enable or disable IPv6 once the DHT has
- been initialised. Oh, well. */
+ been initialised. Oh, well. */
if(ipv6 == NULL || (!force && dht6_socket < 0)) {
if(last_bound) {
free(last_bound);
#ifdef IPV6_V6ONLY
/* Since we always open an IPv4 socket on the same port, this
- shouldn't matter. But I'm superstitious. */
+ shouldn't matter. But I'm superstitious. */
setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY, &one, sizeof(one));
#endif
}
}
- /* Only do this once in a while. Counting rather than measuring time
+ /* Only do this once in a while. Counting rather than measuring time
avoids a system call. */
count++;
if(count >= 20) {
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
/*
* This file Copyright (C) 2008-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2008-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* @file tr-lpd.c
*
* This module implements the Local Peer Discovery (LPD) protocol as supported by the
-* uTorrent client application. A typical LPD datagram is 119 bytes long.
+* uTorrent client application. A typical LPD datagram is 119 bytes long.
*
* $Id$
*/
* @return Returns TRUE on success
*
* Send a query for torrent t out to the LPD multicast group (or the LAN, for that
-* matter). A listening client on the same network might react by adding us to his
+* matter). A listening client on the same network might react by adding us to his
* peer pool for torrent t.
*/
tr_bool tr_lpdSendAnnounce( const tr_torrent* t )
* the peer in/out parameter.
*
* @note The port information gets added to the peer structure if tr_lpdConsiderAnnounce
-* is able to extract the necessary information from the announce message. That is, if
+* is able to extract the necessary information from the announce message. That is, if
* return != 0, the caller may retrieve the value from the passed structure.
*/
static int tr_lpdConsiderAnnounce( tr_pex* peer, const char* const msg )
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
*
* A libtransmission session is created by calling tr_sessionInit().
* libtransmission creates a thread for itself so that it can operate
- * independently of the caller's event loop. The session will continue
+ * independently of the caller's event loop. The session will continue
* until tr_sessionClose() is called.
*
* @{
* @brief Return the session's configuration directory.
*
* This is where transmission stores its .torrent files, .resume files,
- * blocklists, etc. It's set in tr_transmissionInit() and is immutable
+ * blocklists, etc. It's set in tr_transmissionInit() and is immutable
* during the session.
*/
const char * tr_sessionGetConfigDir( const tr_session * );
* @brief Specify a whitelist for remote RPC access
*
* The whitelist is a comma-separated list of dotted-quad IP addresses
- * to be allowed. Wildmat notation is supported, meaning that
+ * to be allowed. Wildmat notation is supported, meaning that
* '?' is interpreted as a single-character wildcard and
* '*' is interprted as a multi-character wildcard.
*/
TR_RPC_OK = 0,
/* indicates to the caller that the client will take care of
- * removing the torrent itself. For example the client may
+ * removing the torrent itself. For example the client may
* need to keep the torrent alive long enough to cleanly close
* some resources in another thread. */
TR_RPC_NOREMOVE = ( 1 << 1 )
@{
Instantiating a tr_torrent had gotten more complicated as features were
- added. At one point there were four functions to check metainfo and five
+ added. At one point there were four functions to check metainfo and five
to create tr_torrent.
To remedy this, a Torrent Constructor (struct tr_ctor) has been introduced:
an error number, or zero if no error occurred.
You must call one of the SetMetainfo() functions before creating
- a torrent with a tr_ctor. The other functions are optional.
+ a torrent with a tr_ctor. The other functions are optional.
You can reuse a single tr_ctor to create a batch of torrents --
just call one of the SetMetainfo() functions between each
struct tr_benc;
/** @brief Create a new torrent constructor object used to instantiate a tr_torrent
- @param session the tr_session. NULL is allowed if you're only calling tr_torrentParse() rather than tr_torrentNew()
+ @param session the tr_session. NULL is allowed if you're only calling tr_torrentParse() rather than tr_torrentNew()
@see tr_torrentNew(), tr_torrentParse() */
tr_ctor* tr_ctorNew( const tr_session * session_or_NULL );
@{ */
/** @brief Frees memory allocated by tr_torrentNew().
- Running torrents are stopped first. */
+ Running torrents are stopped first. */
void tr_torrentFree( tr_torrent * torrent );
typedef int tr_fileFunc( const char * filename );
* @brief Returns this torrent's unique ID.
*
* IDs are good as simple lookup keys, but are not persistent
- * between sessions. If you need that, use tr_info.hash or
+ * between sessions. If you need that, use tr_info.hash or
* tr_info.hashString.
*/
int tr_torrentId( const tr_torrent * torrent );
/**
* Returns the root directory of where the torrent is.
*
- * This will usually be the downloadDir. However if the torrent
+ * This will usually be the downloadDir. However if the torrent
* has an incompleteDir enabled and hasn't finished downloading
* yet, that will be returned instead.
*/
/**
* Register to be notified whenever a torrent's "completeness"
- * changes. This will be called, for example, when a torrent
+ * changes. This will be called, for example, when a torrent
* finishes downloading and changes from TR_LEECH to
* either TR_SEED or TR_PARTIAL_SEED.
*
/** When tr_stat.activity is TR_STATUS_CHECK or TR_STATUS_CHECK_WAIT,
this is the percentage of how much of the files has been
- verified. When it gets to 1, the verify process is done.
+ verified. When it gets to 1, the verify process is done.
Range is [0..1]
@see tr_stat.activity */
double recheckProgress;
Range is [0..1] */
double metadataPercentComplete;
- /** How much has been downloaded of the files the user wants. This differs
+ /** How much has been downloaded of the files the user wants. This differs
from percentComplete if the user wants only some of the torrent's files.
Range is [0..1]
@see tr_stat.leftUntilDone */
int webseedsSendingToUs;
/** Byte count of all the piece data we'll have downloaded when we're done,
- whether or not we have it yet. This may be less than tr_info.totalSize
+ whether or not we have it yet. This may be less than tr_info.totalSize
if only some of the torrent's files are wanted.
[0...tr_info.totalSize] */
uint64_t sizeWhenDone;
/** Byte count of how much data is left to be downloaded until we've got
- all the pieces that we want. [0...tr_info.sizeWhenDone] */
+ all the pieces that we want. [0...tr_info.sizeWhenDone] */
uint64_t leftUntilDone;
/** Byte count of all the piece data we want and don't have yet,
uint64_t desiredAvailable;
/** Byte count of all the corrupt data you've ever downloaded for
- this torrent. If you're on a poisoned torrent, this number can
+ this torrent. If you're on a poisoned torrent, this number can
grow very large. */
uint64_t corruptEver;
uint64_t uploadedEver;
/** Byte count of all the non-corrupt data you've ever downloaded
- for this torrent. If you deleted the files and downloaded a second
+ for this torrent. If you deleted the files and downloaded a second
time, this will be 2*totalSize.. */
uint64_t downloadedEver;
tr_stat;
/** Return a pointer to an tr_stat structure with updated information
- on the torrent. This is typically called by the GUI clients every
+ on the torrent. This is typically called by the GUI clients every
second or so to get a new snapshot of the torrent's status. */
const tr_stat * tr_torrentStat( tr_torrent * torrent );
/** Like tr_torrentStat(), but only recalculates the statistics if it's
- been longer than a second since they were last calculated. This can
+ been longer than a second since they were last calculated. This can
reduce the CPU load if you're calling tr_torrentStat() frequently. */
const tr_stat * tr_torrentStatCached( tr_torrent * torrent );
/*
* This file Copyright (C) 2007-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2007-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2007-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
handle->isMapped = !err;
}
tr_ninf( getKey( ),
- _(
- "Port forwarding through \"%s\", service \"%s\". (local address: %s:%d)" ),
+ _( "Port forwarding through \"%s\", service \"%s\". (local address: %s:%d)" ),
handle->urls.controlURL, handle->data.first.servicetype,
handle->lanaddr, port );
if( handle->isMapped )
/*
* This file Copyright (C) 2007-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
const int pos = tr_lowerBound( &i, A, N, sizeof(int), compareInts, &exact );
#if 0
- fprintf( stderr, "searching for %d. ", i );
+ fprintf( stderr, "searching for %d. ", i );
fprintf( stderr, "result: index = %d, ", pos );
if( pos != N )
fprintf( stderr, "A[%d] == %d\n", pos, A[pos] );
/*
* This file Copyright (C) 2009-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
}
va_end( vl );
- /* terminate the string. if nonempty, eat the unwanted trailing slash */
+ /* terminate the string. if nonempty, eat the unwanted trailing slash */
if( pch != buf )
--pch;
*pch++ = '\0';
}
/*
- * Copy src to string dst of size siz. At most siz-1 characters
- * will be copied. Always NUL terminates (unless siz == 0).
+ * Copy src to string dst of size siz. At most siz-1 characters
+ * will be copied. Always NUL terminates (unless siz == 0).
* Returns strlen(src); if retval >= siz, truncation occurred.
*/
size_t
-tr_strlcpy( char * dst,
- const void * src,
- size_t siz )
+tr_strlcpy( char * dst, const void * src, size_t siz )
{
#ifdef HAVE_STRLCPY
return strlcpy( dst, src, siz );
/*
* This file Copyright (C) 2009-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
* @brief make a copy of 'str' whose non-utf8 content has been corrected or stripped
* @return a newly-allocated string that must be freed with tr_free()
* @param str the string to make a clean copy of
- * @param len the length of the string to copy. If -1, the entire string is used.
+ * @param len the length of the string to copy. If -1, the entire string is used.
*/
char* tr_utf8clean( const char * str, int len ) TR_GNUC_MALLOC;
/**
* @brief make a newly-allocated copy of a substring
* @param in is a void* so that callers can pass in both signed & unsigned without a cast
- * @param len length of the substring to copy. if a length less than zero is passed in, strlen( len ) is used
+ * @param len length of the substring to copy. if a length less than zero is passed in, strlen( len ) is used
* @return a newly-allocated copy of `in' that can be freed with tr_free()
*/
char* tr_strndup( const void * in, int len ) TR_GNUC_MALLOC;
* This function returns a second counter that is updated once per second.
* If something blocks the libtransmission thread for more than a second,
* that counter may be thrown off, so this function is not guaranteed
- * to always be accurate. However, it is *much* faster when 100% accuracy
+ * to always be accurate. However, it is *much* faster when 100% accuracy
* isn't needed
*/
static inline time_t tr_time( void ) { return transmission_now; }
/*
* This file Copyright (C) 2007-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/* stopwatch */
end = tr_time( );
- tr_tordbg( tor, "Verification is done. It took %d seconds to verify %"PRIu64" bytes (%"PRIu64" bytes per second)",
+ tr_tordbg( tor, "Verification is done. It took %d seconds to verify %"PRIu64" bytes (%"PRIu64" bytes per second)",
(int)(end-begin), tor->info.totalSize,
(uint64_t)(tor->info.totalSize/(1+(end-begin))) );
/*
* This file Copyright (C) 2007-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2008-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2008-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2008-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
/*
* This file Copyright (C) 2008-2010 Mnemosyne LLC
*
- * This file is licensed by the GPL version 2. Works owned by the
+ * This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
**
** Do shell-style pattern matching for ?, \, [], and * characters.
** Might not be robust in face of malformed patterns; e.g., "foo[a-"
-** could cause a segmentation violation. It is 8bit clean.
+** could cause a segmentation violation. It is 8bit clean.
**
** Written by Rich $alz, mirror!rs, Wed Nov 26 19:03:17 EST 1986.
** Rich $alz is now <rsalz@bbn.com>.
** for the star character.
**
** Special thanks to Lars Mathiesen <thorinn@diku.dk> for the ABORT code.
-** This can greatly speed up failing wildcard patterns. For example:
+** This can greatly speed up failing wildcard patterns. For example:
** pattern: -*-*-*-*-*-*-12-*-*-*-m-*-*-*
** text 1: -adobe-courier-bold-o-normal--12-120-75-75-m-70-iso8859-1
** text 2: -adobe-courier-bold-o-normal--12-120-75-75-X-70-iso8859-1
-** Text 1 matches with 51 calls, while text 2 fails with 54 calls. Without
-** the ABORT, then it takes 22310 calls to fail. Ugh. The following
+** Text 1 matches with 51 calls, while text 2 fails with 54 calls. Without
+** the ABORT, then it takes 22310 calls to fail. Ugh. The following
** explanation is from Lars:
** The precondition that must be fulfilled is that DoMatch will consume
-** at least one character in text. This is true if *p is neither '*' nor
+** at least one character in text. This is true if *p is neither '*' nor
** '\0'.) The last return has ABORT instead of FALSE to avoid quadratic
-** behaviour in cases like pattern "*a*b*c*d" with text "abcxxxxx". With
+** behaviour in cases like pattern "*a*b*c*d" with text "abcxxxxx". With
** FALSE, each star-loop has to run to the end of the text; with ABORT
** only the last one does.
**
** Once the control of one instance of DoMatch enters the star-loop, that
** instance will return either TRUE or ABORT, and any calling instance
** will therefore return immediately after (without calling recursively
-** again). In effect, only one star-loop is ever active. It would be
+** again). In effect, only one star-loop is ever active. It would be
** possible to modify the code to maintain this context explicitly,
** eliminating all recursive calls at the cost of some complication and
** loss of clarity (and the ABORT stuff seems to be unclear enough by
-** itself). I think it would be unwise to try to get this into a
+** itself). I think it would be unwise to try to get this into a
** released version unless you have a good test data base to try it out
** on.
*/
/*
-** User-level routine. Returns TRUE or FALSE.
+** User-level routine. Returns TRUE or FALSE.
*/
int
tr_wildmat(const char * text, const char * p )