# HG changeset patch # User Thomas Butter # Date 1136760634 0 # Node ID a90255f676521e110dc944f65407d5b55fa68dfa # Parent 3f6f2d59bcb481d0e19fc03ec0a58f457fdcb1e6 [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 diff -r 3f6f2d59bcb4 -r a90255f67652 src/protocols/simple/simple.c --- 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);