GNOME Bugzilla – Bug 599781
DCC transfers always time out by default.
Last modified: 2010-01-14 12:54:54 UTC
On a fresh install of xchat-gnome (no ~/.xchat2 directory), requesting a file via XDCC fails. This is because xchat-gnome sets the preference dcc_auto_send to 2 by default; when the setting is set manually, it's set to 1. ("dcc_auto_send" is a misnomer; it should be called "dcc_auto_receive".) However, when autoreceive is disabled, it's set to 0, not 2. To sum up: dcc_auto_send = 0 -> ("No") File is added to the receive window in "waiting" state. (Can hit a button to start it.) dcc_auto_send = 1 -> ("Yes") File is added to the receive window in "active" state, starts downloading. dcc_auto_send = 2 -> ("Browse for save folder every time") File is added to the receive window in "waiting" state, save-as dialog pops up. These map to xchat options "never autostart", "always autostart" and "browse for save folder for each file". The default is due to xchat, which sets autodccsend (in the prefs file, that's dcc_auto_send) to 2. The default, in xchat-gnome's src/common/cfgfiles.c, is *also* to set it to 2. This is apparently inherited from xchat, which does the same, and this is the reason that new installs of xchat-gnome have broken DCC functionality. Several options present themselves for fixes: * Extend xchat-gnome to have three possibilities for that pref: autoaccept, don't autoaccept, and pop up the save-as dialog. This might be implemented as two checkboxes, with the "autoaccept" one enabling/disabling the "ask for location" one. * Force xchat-gnome to default to '0' ("ask"), as this is likely the safest behavior given the two options. If the imported preference is 2, force it to 0. * Make xchat-gnome interpret 0 (don't autoaccept) in the same way as 2 (browse for save folder)--that is, if the user doesn't want to save the file, they can just hit "cancel". This still leaves the question of what to save this preference as--0 or 2?--from the preferences dialog. I'm leaning toward the last option, because the code change is the simplest, but I don't know if this is the correct long-term option. The attached patch makes dcc_auto_send = 0 and dcc_auto_send = 2 have the same behavior, by replacing the check for "prefs.autodccchat == FALSE" with a check for "prefs.autodccchat != 1". It affects only src/fe-gnome/dcc-window.c. I've tested the attached patch, and it seems to work for me (I set up a testing bot using iroffer so I could see what it looked like from both sides). This was originally reported on Launchpad: https://bugs.launchpad.net/ubuntu/+source/xchat-gnome/+bug/315549
Created attachment 146343 [details] [review] Patch against 107aa5c3406602a2b46811d7ba0fc84f5e20a830 fixing the default behavior.
Review of attachment 146343 [details] [review]: I am leaning towards implementing fe_confirm, and the whole shebang. Nice catch though.
Review of attachment 146343 [details] [review]: Committed, along with autodccsend being set to 0 for new install.
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.