After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 599781 - DCC transfers always time out by default.
DCC transfers always time out by default.
Status: RESOLVED FIXED
Product: xchat-gnome
Classification: Other
Component: general
HEAD
Other Linux
: Normal major
: ---
Assigned To: xchat-gnome maintainers
xchat-gnome maintainers
Depends on:
Blocks: 602311
 
 
Reported: 2009-10-27 15:10 UTC by Adam Buchbinder
Modified: 2010-01-14 12:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch against 107aa5c3406602a2b46811d7ba0fc84f5e20a830 fixing the default behavior. (1.37 KB, patch)
2009-10-27 15:14 UTC, Adam Buchbinder
committed Details | Review

Description Adam Buchbinder 2009-10-27 15:10:21 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
Comment 1 Adam Buchbinder 2009-10-27 15:14:32 UTC
Created attachment 146343 [details] [review]
Patch against 107aa5c3406602a2b46811d7ba0fc84f5e20a830 fixing the default behavior.
Comment 2 Ritesh Khadgaray ( irc:ritz) 2010-01-13 21:14:43 UTC
Review of attachment 146343 [details] [review]:

I am leaning towards implementing fe_confirm, and the whole shebang. Nice catch though.
Comment 3 Ritesh Khadgaray ( irc:ritz) 2010-01-14 12:53:07 UTC
Review of attachment 146343 [details] [review]:

Committed, along with autodccsend being set to 0 for new install.
Comment 4 Ritesh Khadgaray ( irc:ritz) 2010-01-14 12:54:54 UTC
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.