Mercurial > hg > freeDiameter
comparison libfdcore/p_cnx.c @ 897:d8d0772586ad
Use correct default port for outgoing connections even when local port is not the default one
author | Sebastien Decugis <sdecugis@freediameter.net> |
---|---|
date | Fri, 30 Nov 2012 23:14:34 +0100 |
parents | edbdb35a603f |
children | 5053f1abcf5d |
comparison
equal
deleted
inserted
replaced
896:b13359ace625 | 897:d8d0772586ad |
---|---|
135 empty_connection_list(peer); | 135 empty_connection_list(peer); |
136 | 136 |
137 /* Prepare the parameters */ | 137 /* Prepare the parameters */ |
138 if ((peer->p_hdr.info.config.pic_flags.sec != PI_SEC_DEFAULT) || (fd_g_config->cnf_flags.tls_alg)) { | 138 if ((peer->p_hdr.info.config.pic_flags.sec != PI_SEC_DEFAULT) || (fd_g_config->cnf_flags.tls_alg)) { |
139 dotls_immediate = 0; | 139 dotls_immediate = 0; |
140 port_no = htons(peer->p_hdr.info.config.pic_port ?: fd_g_config->cnf_port); | 140 port_no = htons(peer->p_hdr.info.config.pic_port ?: DIAMETER_PORT); |
141 } else { | 141 } else { |
142 dotls_immediate = 1; | 142 dotls_immediate = 1; |
143 port_no = htons(peer->p_hdr.info.config.pic_port ?: fd_g_config->cnf_port_tls); | 143 port_no = htons(peer->p_hdr.info.config.pic_port ?: DIAMETER_SECURE_PORT); |
144 } | 144 } |
145 | 145 |
146 last_prio = &peer->p_connparams; | 146 last_prio = &peer->p_connparams; |
147 | 147 |
148 /* Create TCP parameters unless specified otherwise */ | 148 /* Create TCP parameters unless specified otherwise */ |