diff --git a/gtk/details.c b/gtk/details.c index 90bdf76c1..a9a2d30ba 100644 --- a/gtk/details.c +++ b/gtk/details.c @@ -1390,15 +1390,16 @@ static GtkListStore* peer_store_new(void) static void initPeerRow(GtkListStore* store, GtkTreeIter* iter, char const* key, char const* torrentName, tr_peer_stat const* peer) { - int q[4]; - char collated_name[128]; - char const* client = peer->client; + g_return_if_fail(peer != NULL); + char const* client = peer->client; if (client == NULL || g_strcmp0(client, "Unknown Client") == 0) { client = ""; } + int q[4]; + char collated_name[128]; if (sscanf(peer->addr, "%d.%d.%d.%d", q, q + 1, q + 2, q + 3) != 4) { g_strlcpy(collated_name, peer->addr, sizeof(collated_name)); diff --git a/gtk/icons.c b/gtk/icons.c index efc63a332..6ea93afa2 100644 --- a/gtk/icons.c +++ b/gtk/icons.c @@ -183,20 +183,15 @@ static GdkPixbuf* _get_icon_pixbuf(GIcon* icon, int size, GtkIconTheme* theme) static GdkPixbuf* icon_cache_get_mime_type_icon(IconCache* icons, char const* mime_type) { - GIcon* icon; - char const* key = NULL; - GdkPixbuf* pixbuf; - - icon = g_content_type_get_icon(mime_type); - key = _icon_cache_get_icon_key(icon); - + GIcon* icon = g_content_type_get_icon(mime_type); + char const* key = _icon_cache_get_icon_key(icon); if (key == NULL) { key = VOID_PIXBUF_KEY; } - pixbuf = g_hash_table_lookup(icons->cache, key); - + g_return_val_if_fail(icons != NULL, NULL); + GdkPixbuf* pixbuf = g_hash_table_lookup(icons->cache, key); if (pixbuf != NULL) { g_object_ref(pixbuf); diff --git a/libtransmission/torrent.c b/libtransmission/torrent.c index c4f785bd3..408404d30 100644 --- a/libtransmission/torrent.c +++ b/libtransmission/torrent.c @@ -1830,7 +1830,6 @@ static void torrentStart(tr_torrent* tor, bool bypass_queue) case TR_STATUS_SEED: case TR_STATUS_DOWNLOAD: return; /* already started */ - break; case TR_STATUS_SEED_WAIT: case TR_STATUS_DOWNLOAD_WAIT: @@ -1847,7 +1846,6 @@ static void torrentStart(tr_torrent* tor, bool bypass_queue) * we'll know what completeness to use/announce */ tor->startAfterVerify = true; return; - break; case TR_STATUS_STOPPED: if (!bypass_queue && torrentShouldQueue(tor)) diff --git a/libtransmission/variant.c b/libtransmission/variant.c index d5f1ed1d8..7e9de8ef0 100644 --- a/libtransmission/variant.c +++ b/libtransmission/variant.c @@ -198,7 +198,11 @@ static void tr_variant_string_set_string(struct tr_variant_string* str, char con if (len < sizeof(str->str.buf)) { str->type = TR_STRING_TYPE_BUF; - memcpy(str->str.buf, bytes, len); + if (len > 0) + { + memcpy(str->str.buf, bytes, len); + } + str->str.buf[len] = '\0'; str->len = len; } @@ -1067,7 +1071,7 @@ void tr_variantMergeDicts(tr_variant* target, tr_variant const* source) { if (tr_variantIsBool(val)) { - bool boolVal; + bool boolVal = false; tr_variantGetBool(val, &boolVal); tr_variantDictAddBool(target, key, boolVal); } diff --git a/macosx/TransmissionHelp/html/FAQ.html b/macosx/TransmissionHelp/html/FAQ.html index 821a19539..777b23287 100644 --- a/macosx/TransmissionHelp/html/FAQ.html +++ b/macosx/TransmissionHelp/html/FAQ.html @@ -1,4 +1,5 @@ - + + @@ -37,15 +38,15 @@

Transmission crashed, what should I do?

-

Post the crash log on the support forums so that the issue can be fixed as quickly as possible. Crash logs are held in ~/Library/Logs/CrashReporter/. +

Post the crash log on the support forums so that the issue can be fixed as quickly as possible. Crash logs are held in ~/Library/Logs/CrashReporter/.

If your torrents' progress are incorrect when you reopen Transmission (e.g. they are starting from 0%) then you should manually recheck them. Click here for instructions.

What do the colors mean in the pieces box?

-

Blue: we have this piece - lighter shades of blue (progress only) indicate incomplete pieces
- Green: connected peers have this piece (available only) - the darker the green, the more there are
- White: no connected peers have this piece (available) or we do not have any of this piece (progress)
+

Blue: we have this piece - lighter shades of blue (progress only) indicate incomplete pieces
+ Green: connected peers have this piece (available only) - the darker the green, the more there are
+ White: no connected peers have this piece (available) or we do not have any of this piece (progress)

@@ -65,11 +66,11 @@

What do the stats in the Activity tab of the Inspector mean?

-

Have is the sum of verified and unverified data. The Verified amount, in brackets, is how much checksum-verified data you have downloaded.
- Downloaded is all the data you have downloaded.
- Uploaded is all of the data you have uploaded.
- Failed DL is data that failed our checksum test and needs to be downloaded again.
- Ratio is the ratio of download data to uploaded data. +

Have is the sum of verified and unverified data. The Verified amount, in brackets, is how much checksum-verified data you have downloaded.
+ Downloaded is all the data you have downloaded.
+ Uploaded is all of the data you have uploaded.
+ Failed DL is data that failed our checksum test and needs to be downloaded again.
+ Ratio is the ratio of download data to uploaded data.

What does the 'Tracker' tab mean in the Inspector?

diff --git a/macosx/TransmissionHelp/html/Index2.html b/macosx/TransmissionHelp/html/Index2.html index a83dac543..bbdf556f0 100644 --- a/macosx/TransmissionHelp/html/Index2.html +++ b/macosx/TransmissionHelp/html/Index2.html @@ -23,7 +23,7 @@
- Index + Index
diff --git a/macosx/TransmissionHelp/html/Speed.html b/macosx/TransmissionHelp/html/Speed.html index 8c4f085f7..143c213b0 100644 --- a/macosx/TransmissionHelp/html/Speed.html +++ b/macosx/TransmissionHelp/html/Speed.html @@ -1,4 +1,5 @@ - + + @@ -28,7 +29,7 @@
  • Make sure you cap your upload speed, so that it isn't flooded. A good rule of thumb is about 60-70% of your maximum upload bandwidth. This can be adjusted in Preferences -> Bandwidth, or in real time using the Action menu.
    -

    eg. If your upload connection is 256 Kilobits/sec, then you should cap it at 21 KB/sec ((256 / 8) * 0.66 = 21). +

    eg. If your upload connection is 256 Kilobits/sec, then you should cap it at 21 KB/sec ((256 / 8) * 0.66 = 21).

  • @@ -37,7 +38,7 @@ To avoid spreading your upload too thinly, a good rule of thumb is to have at least 128 KBit/sec of upload bandwidth for every torrent you wish to run simultaneously.
    -

    eg. If your upload bandwidth is 256 KBit/sec, then you should only have two (256/128 = 2) downloading transfers in the queue. +

    eg. If your upload bandwidth is 256 KBit/sec, then you should only have two (256/128 = 2) downloading transfers in the queue.

    @@ -46,4 +47,4 @@
    - \ No newline at end of file + diff --git a/macosx/TransmissionHelp/html/check.html b/macosx/TransmissionHelp/html/check.html index f45ab4602..4cc9630f6 100644 --- a/macosx/TransmissionHelp/html/check.html +++ b/macosx/TransmissionHelp/html/check.html @@ -1,4 +1,5 @@ - + + @@ -33,4 +34,4 @@
    - \ No newline at end of file + diff --git a/macosx/TransmissionHelp/html/gettingstarted.html b/macosx/TransmissionHelp/html/gettingstarted.html index 696af42ae..fe10e1241 100644 --- a/macosx/TransmissionHelp/html/gettingstarted.html +++ b/macosx/TransmissionHelp/html/gettingstarted.html @@ -1,4 +1,5 @@ - + + @@ -159,4 +160,4 @@ - \ No newline at end of file + diff --git a/macosx/TransmissionHelp/html/network.html b/macosx/TransmissionHelp/html/network.html index 448cb8516..de509f473 100644 --- a/macosx/TransmissionHelp/html/network.html +++ b/macosx/TransmissionHelp/html/network.html @@ -1,4 +1,5 @@ - + + @@ -31,4 +32,4 @@ - \ No newline at end of file + diff --git a/macosx/TransmissionHelp/html/peers.html b/macosx/TransmissionHelp/html/peers.html index 32b3fda13..ec025fc65 100644 --- a/macosx/TransmissionHelp/html/peers.html +++ b/macosx/TransmissionHelp/html/peers.html @@ -1,4 +1,5 @@ - + + @@ -39,15 +40,15 @@

    What are 'connections'?

    -

    Global maximum connections (Preferences -> Peers) is the total number of peers that Transmission will connect to across all of your transfers. Connections per torrent can also be adjusted here, as well as in the Inspector. +

    Global maximum connections (Preferences -> Peers) is the total number of peers that Transmission will connect to across all of your transfers. Connections per torrent can also be adjusted here, as well as in the Inspector.

    It is recommended that these values are left at their default setting, as allowing too many connections will severely hinder web browsing and other online activities, as well as possibly crashing your router. Increase this value at your own risk!

    Recommended settings:

    @@ -61,4 +62,4 @@ - \ No newline at end of file + diff --git a/macosx/TransmissionHelp/html/pffirewall.html b/macosx/TransmissionHelp/html/pffirewall.html index 357b7f3a3..7bf39e70a 100644 --- a/macosx/TransmissionHelp/html/pffirewall.html +++ b/macosx/TransmissionHelp/html/pffirewall.html @@ -1,4 +1,5 @@ - + + @@ -32,4 +33,4 @@ - \ No newline at end of file + diff --git a/macosx/TransmissionHelp/html/pfrouter.html b/macosx/TransmissionHelp/html/pfrouter.html index 1c6d51d74..eeaef266c 100644 --- a/macosx/TransmissionHelp/html/pfrouter.html +++ b/macosx/TransmissionHelp/html/pfrouter.html @@ -1,4 +1,5 @@ - + + @@ -72,4 +73,4 @@ - \ No newline at end of file + diff --git a/macosx/TransmissionHelp/html/portforward.html b/macosx/TransmissionHelp/html/portforward.html index 17553254f..d12e61f38 100644 --- a/macosx/TransmissionHelp/html/portforward.html +++ b/macosx/TransmissionHelp/html/portforward.html @@ -1 +1,2 @@ - Port Forwarding FAQ

    How do I Port Forward?

    If your router supports NAT-PMP, UPnP, or you have Apple AirPort, Transmission can map its port automatically. Most routers manufactured since 2001 have this feature.

    1. Open Transmission.
    2. Go to Preferences -> Network, and check 'Automatically map port'.
    3. If you get a green dot and 'Port is Open' then you have successfully port forwarded!
    4. If you get a red dot and the message 'Port is closed', click here.

    If you don't have a compatible router, it is simple to forward Transmission's port manually. For instructions click here.

    If you don't use a router, and your modem is directly connected to your computer, you'll need to open Transmission's port in the Mac OS X firewall. For instructions click here.

    Note: It is highly recommended you enable the Mac OS X firewall if you are not using a router.

    Keep in mind that many DSL modems also function as routers, so port forwarding may still be necessary, even though your computer is directly connected to the modem.

    \ No newline at end of file + + Port Forwarding FAQ

    How do I Port Forward?

    If your router supports NAT-PMP, UPnP, or you have Apple AirPort, Transmission can map its port automatically. Most routers manufactured since 2001 have this feature.

    1. Open Transmission.
    2. Go to Preferences -> Network, and check 'Automatically map port'.
    3. If you get a green dot and 'Port is Open' then you have successfully port forwarded!
    4. If you get a red dot and the message 'Port is closed', click here.

    If you don't have a compatible router, it is simple to forward Transmission's port manually. For instructions click here.

    If you don't use a router, and your modem is directly connected to your computer, you'll need to open Transmission's port in the Mac OS X firewall. For instructions click here.

    Note: It is highly recommended you enable the Mac OS X firewall if you are not using a router.

    Keep in mind that many DSL modems also function as routers, so port forwarding may still be necessary, even though your computer is directly connected to the modem.

    diff --git a/macosx/TransmissionHelp/html/remote.html b/macosx/TransmissionHelp/html/remote.html index e41af04fb..61d388a18 100644 --- a/macosx/TransmissionHelp/html/remote.html +++ b/macosx/TransmissionHelp/html/remote.html @@ -1,4 +1,5 @@ - + + @@ -21,7 +22,7 @@

    What is remote access?

    -

    Transmission has a web interface which can be used to monitor and manage your transfers over the internet. Other applications, such as transmission-remote, can also control Transmission. If you want to use the web interface, or another remote control application, check 'Enable remote access'. Leave this option unchecked if you are only going to be managing your transfers on your local machine. +

    Transmission has a web interface which can be used to monitor and manage your transfers over the internet. Other applications, such as transmission-remote, can also control Transmission. If you want to use the web interface, or another remote control application, check 'Enable remote access'. Leave this option unchecked if you are only going to be managing your transfers on your local machine.

    For security purposes, you can password protect access to Transmission, as well as restrict access to a trusted list of external IP addresses. To add an address to the list, click the + button.

    You can view the web interface on your local computer by clicking the 'Launch web interface' button. To view it on a remote location:

    @@ -29,8 +30,8 @@
  • Open your web browser
  • In the address bar, enter "http://localip:port/transmission/web/", where:
  • @@ -38,4 +39,4 @@ - \ No newline at end of file + diff --git a/macosx/TransmissionHelp/html/scripts.html b/macosx/TransmissionHelp/html/scripts.html index 59088434d..dd91c79ef 100644 --- a/macosx/TransmissionHelp/html/scripts.html +++ b/macosx/TransmissionHelp/html/scripts.html @@ -1,4 +1,5 @@ - + + @@ -37,4 +38,4 @@ - \ No newline at end of file + diff --git a/macosx/TransmissionHelp/html/tracker.html b/macosx/TransmissionHelp/html/tracker.html index 36f5611b3..3d64399ef 100644 --- a/macosx/TransmissionHelp/html/tracker.html +++ b/macosx/TransmissionHelp/html/tracker.html @@ -1,4 +1,5 @@ - + + @@ -28,16 +29,16 @@

    What does 'announce' mean?

    -

    When Transmission announces, it is updating its presence to the tracker and asking for more peers. This happens periodically, at the discretion of the tracker, however can be manually invoked via Transfers menu >> Update Tracker. +

    When Transmission announces, it is updating its presence to the tracker and asking for more peers. This happens periodically, at the discretion of the tracker, however can be manually invoked via Transfers menu >> Update Tracker.

    What does 'scrape' mean?

    -

    Scraping the tracker simply means asking for information about the swarm itself. For example, the number of peers, seeds etc. +

    Scraping the tracker simply means asking for information about the swarm itself. For example, the number of peers, seeds etc.

    - \ No newline at end of file + diff --git a/macosx/TransmissionHelp/html/troubleshoot.html b/macosx/TransmissionHelp/html/troubleshoot.html index 696eb08fe..296fa60d4 100644 --- a/macosx/TransmissionHelp/html/troubleshoot.html +++ b/macosx/TransmissionHelp/html/troubleshoot.html @@ -1,4 +1,5 @@ - + + @@ -64,7 +65,7 @@

    Another possible reason your port remains closed could be because your router is not the only device on the network which needs to be configured. -

    For example, your network might resemble the following: ADSL modem/router --> AirPort extreme --> MacBook. +

    For example, your network might resemble the following: ADSL modem/router --> AirPort extreme --> MacBook.

    If you have multiple routers in your home network (such as in the example above), you have two options. The easiest way is to turn one of the routers into 'Bridge mode' which means you then only have to configure one device rather than all of them. So, in our above example, we would set the AirPort extreme to 'Bridge'. See your router's help documentation for instructions. diff --git a/macosx/TransmissionHelp/html/usingt.html b/macosx/TransmissionHelp/html/usingt.html index 57df9c3ba..6b16cf84f 100644 --- a/macosx/TransmissionHelp/html/usingt.html +++ b/macosx/TransmissionHelp/html/usingt.html @@ -1,4 +1,5 @@ - + + @@ -38,4 +39,4 @@ - \ No newline at end of file +