Opened 12 years ago

Last modified 11 years ago

#2930 new patch

libpurple purple_proxy_connect should have an equivalent to try multiple hosts/ports if one fails

Reported by: jeff Owned by: datallah
Milestone: Patches Needing Improvement Component: libpurple
Version: 2.1.1 Keywords: msimprpl state machine fsm port multiple retry


Many IM clients will try alternate ports if the connection fails. For example, MySpaceIM defaults to TCP port 1863, but if that fails, it will try 6660, 6661, ..., 80, 443. AIM can also be reached on port 443, to tunnel through firewalls.

libpurple should have a generic API, accepting perhaps a GList * of multiple host and port pairs to attempt to connect to. The one that succeeds should be saved with purple_account_set_* so that it is tried first upon connecting after restarting the program. If this host/port pair fails, it should try again from the list.

See also #2824, a patch for msimprpl, but it would be best if this functionality was available to all prpls.

Attachments (1)

port-retry.patch (13.4 KB) - added by Jaywalker 11 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 12 years ago by jeff

  • Component changed from pidgin (gtk) to libpurple
  • Owner set to jeff
  • Status changed from new to assigned

comment:2 Changed 12 years ago by jeff

  • Milestone set to 2.3.0

comment:3 Changed 11 years ago by Jaywalker

Added port retry patch... It's a bit noisy but it shows it's working. Currently I only implemented the MySpace? prpl as an example, but others could be easily implemented in a similar fashion. :)

Changed 11 years ago by Jaywalker

comment:4 Changed 11 years ago by jeff

  • Owner changed from jeff to datallah
  • Status changed from assigned to new

datallah, can you apply this patch?

comment:5 Changed 11 years ago by datallah

I'm not sure that this is the path to go down - it can't be applied until 3.0.0 as it is anyway as it changes the API.

comment:6 Changed 11 years ago by jeff

  • Milestone set to 3.0.0

Any thoughts on the proper fix?

comment:7 Changed 11 years ago by datallah

I guess I'm thinking that it'd be better to handle this where it is being used (i.e. in the prpl code) (which should possible with the current API) instead of adding support for fallbacks within libpurple.

comment:8 Changed 11 years ago by jeff

  • Milestone changed from 3.0.0 to Patches Needing Improvement
  • Type changed from enhancement to patch
Note: See TracTickets for help on using tickets.
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!