Mercurial > pidgin.yaz
diff src/protocols/simple/simple.c @ 12769:a90255f67652
[gaim-migrate @ 15116]
Use the user specified port instead of the SRV one if the user
explicitly sets a port in the account prefs.
committer: Tailor Script <tailor@pidgin.im>
author | Thomas Butter <tbutter> |
---|---|
date | Sun, 08 Jan 2006 22:50:34 +0000 |
parents | 3f6f2d59bcb4 |
children | ab00cea25ef2 |
line wrap: on
line diff
--- a/src/protocols/simple/simple.c Sun Jan 08 22:26:30 2006 +0000 +++ b/src/protocols/simple/simple.c Sun Jan 08 22:50:34 2006 +0000 @@ -1250,9 +1250,8 @@ /* find the host to connect to */ if(results) { hostname = g_strdup(resp->hostname); - /* TODO: Should this work more like Jabber where the SRV value will be ignored - * if there is one manually specified? */ - port = resp->port; + if(!port) + port = resp->port; g_free(resp); } else { if(!gaim_account_get_bool(sip->account, "useproxy", FALSE)) { @@ -1264,6 +1263,7 @@ sip->realhostname = hostname; sip->realport = port; + if(!sip->realport) sip->realport = 5060; /* TCP case */ if(! sip->udp) { /* create socket for incoming connections */ @@ -1477,7 +1477,7 @@ option = gaim_account_option_bool_new(_("Publish status (note: everyone may watch you)"), "dopublish", TRUE); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); - option = gaim_account_option_int_new(_("Connect port"), "port", 5060); + option = gaim_account_option_int_new(_("Connect port"), "port", 0); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option);