please add gconf key support to set the --minport argument

Bug #5374 reported by David Nielsen
6
Affects Status Importance Assigned to Milestone
gnome-btdownload
Unknown
Unknown
gnome-btdownload (Ubuntu)
Fix Released
Medium
Ubuntu Desktop Bugs

Bug Description

many people, myself included, are in the most unfortunate situation of having only say port 6882 open, the default behaviour of gnome-btdownload would make filetransfer on such clients less effective.

Revision history for this message
Daniel Holbach (dholbach) wrote :

Thanks for your bug report. I don't fully understand. What is the problem. What solution do you suggest? Which version of Ubuntu and gnome-btdownload do you use?

Changed in gnome-btdownload:
assignee: nobody → gnome
status: New → NeedInfo
Revision history for this message
David Nielsen (davidnielsen-deactivatedaccount) wrote :

The problem quite specifically is that bitorrent uses the 6991 to 6889 port range, and my setup only allows 6882 alotted for my client machine, however bittorrent will start out by trying 6881, giving worse transfer speed. However the client accepts a commandline argument called --minport to get around this issue, I'm suggesting that since this is a little used but very useful setting it might be worth allowing to set it via gconf so to not clutter hte interface.

Revision history for this message
Daniel Holbach (dholbach) wrote :
Changed in gnome-btdownload:
assignee: gnome → desktop-bugs
status: Needs Info → Confirmed
Revision history for this message
Simon Law (sfllaw) wrote :

This appears to be a special-case of bug 20546.

Revision history for this message
Christopher Taylor (timrod) wrote :

I've fixed it. Here's a patch (sorry, I'm new to launchpad, as in just registered and haven't figured out how to attach files yet ;)

Oh and while I'm writing disclaimers, this is my first ever patch to a python/gnome app, but it looks alright and works for me...

--- 8< ---

diff -ur gnome-btdownload-0.0.22/src/gnome-btdownload gnome-btdownload-0.0.22-timrod/src/gnome-btdownload
--- gnome-btdownload-0.0.22/src/gnome-btdownload 2005-05-31 05:33:34.000000000 +0200
+++ gnome-btdownload-0.0.22-timrod/src/gnome-btdownload 2006-05-11 03:48:42.000000000 +0200
@@ -770,6 +775,12 @@
   #self.gconf_client.notify_add('/apps/'+app_name+'/settings', self.on_gconf_settings_notify)

   # Bt Setup
+ if not "--minport" in args:
+ minport = self.gconf_client.get_int('/apps/'+app_name+'/settings/min_port')
+ if minport > 0:
+ args.append("--minport")
+ args.append(minport)
+
   bt_state_args = BtState.Args(args[1:])

   if not bt_state_args.path_origin:
diff -ur gnome-btdownload-0.0.22/src/gnome-btdownload.schemas.in gnome-btdownload-0.0.22-timrod/src/gnome-btdownload.schemas.in
--- gnome-btdownload-0.0.22/src/gnome-btdownload.schemas.in 2005-05-30 00:06:12.000000000 +0200
+++ gnome-btdownload-0.0.22-timrod/src/gnome-btdownload.schemas.in 2006-05-11 03:51:04.000000000 +0200
@@ -66,5 +66,16 @@
     <long>If true, display an error dialog as well as log an event whenever an error occurs; otherwise, just log an error</long>
    </locale>
   </schema>
+ <schema>
+ <key>/schemas/apps/gnome-btdownload/settings/min_port</key>
+ <applyto>/apps/gnome-btdownload/settings/min_port</applyto>
+ <owner>gnome-btdownload</owner>
+ <type>int</type>
+ <default>6881</default>
+ <locale name="C">
+ <short>First port to bind to</short>
+ <long>Specifies the minimum port gnome-btdownload should bind to. If it is in use, the port is increased.</long>
+ </locale>
+ </schema>
  </schemalist>
 </gconfschemafile>

Revision history for this message
Christopher Taylor (timrod) wrote : adds min_port gconf option

ok, found out how to attach a file - sorry!

Revision history for this message
Daniel Holbach (dholbach) wrote :

Should be considered for Dapper.

About attaching stuff: "+ Add Attachment" in the top left droplet.

Revision history for this message
Christopher Taylor (timrod) wrote : Re: [Bug 5374] Re: please add gconf key support to set the --minport argument

daniel,

I'm going to add another gconf-option to set maxport, too, since if
one sets minport to somethin higher than maxport, gnome-btdownload
throws an error-message and doesn't download anything. I'll also add
some sane-checking, so that if the above condition occurs, maxport is
set to minport.

  --Chris

On 5/11/06, Daniel Holbach <email address hidden> wrote:
> Should be considered for Dapper.
>
> About attaching stuff: "+ Add Attachment" in the top left droplet.
>
> ** Changed in: gnome-btdownload (Ubuntu)
> Target: None => ubuntu-6.06
>
> --
> please add gconf key support to set the --minport argument
> https://launchpad.net/bugs/5374
>

Revision history for this message
Christopher Taylor (timrod) wrote : adds min_port and max_port gconf options

here's the patch I talked about above. It also does some sanity checking on the values, so that at least one port is tried.

values retrieved from gconf can be overridden from the command line (--minport and --maxport options)

it would be really nice to see this in dapper, but if it's too late I guess it's tough luck. Oh, and should I post this upstream, too?

Revision history for this message
Daniel Holbach (dholbach) wrote :

I forwarded the patch upstream, let's see how they like it.

Revision history for this message
Sebastien Bacher (seb128) wrote :

dapper is feature frozen, will be considered for edgy

Revision history for this message
Christopher Taylor (timrod) wrote : Re: [Bug 5374] Re: please add gconf key support to set the --minport argument

with upstream being unresponsive for ~ two months, can this patch be
included in edgy?

On 5/22/06, Sebastien Bacher <email address hidden> wrote:
> dapper is feature frozen, will be considered for edgy
>
> ** Changed in: gnome-btdownload (Ubuntu)
> Target: ubuntu-6.06 => None
>
> --
> please add gconf key support to set the --minport argument
> https://launchpad.net/bugs/5374
>

Changed in gnome-btdownload:
status: Confirmed → Fix Committed
Revision history for this message
Daniel Holbach (dholbach) wrote :

Fixed in 0.0.24, which is in Edgy.

Changed in gnome-btdownload:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.