Mercurial > hg > freeDiameter
comparison freeDiameter/p_cnx.c @ 64:bb45a8ffec77
Enforce configuration flags for new outgoing connections
author | Sebastien Decugis <sdecugis@nict.go.jp> |
---|---|
date | Mon, 30 Nov 2009 15:58:20 +0900 |
parents | dbba83bafd66 |
children | 65b32c93f21e |
comparison
equal
deleted
inserted
replaced
63:56dd4efdf6e8 | 64:bb45a8ffec77 |
---|---|
126 } | 126 } |
127 | 127 |
128 last_prio = &peer->p_connparams; | 128 last_prio = &peer->p_connparams; |
129 | 129 |
130 /* Create TCP parameters unless specified otherwise */ | 130 /* Create TCP parameters unless specified otherwise */ |
131 if (peer->p_hdr.info.config.pic_flags.pro4 != PI_P4_SCTP) { | 131 if ((!fd_g_config->cnf_flags.no_tcp) && (peer->p_hdr.info.config.pic_flags.pro4 != PI_P4_SCTP)) { |
132 for (li = peer->p_hdr.info.pi_endpoints.next; li != &peer->p_hdr.info.pi_endpoints; li = li->next) { | 132 for (li = peer->p_hdr.info.pi_endpoints.next; li != &peer->p_hdr.info.pi_endpoints; li = li->next) { |
133 struct fd_endpoint * ep = (struct fd_endpoint *)li; | 133 struct fd_endpoint * ep = (struct fd_endpoint *)li; |
134 | 134 |
135 CHECK_MALLOC( new = malloc(sizeof(struct next_conn)) ); | 135 CHECK_MALLOC( new = malloc(sizeof(struct next_conn)) ); |
136 memset(new, 0, sizeof(struct next_conn)); | 136 memset(new, 0, sizeof(struct next_conn)); |
163 } | 163 } |
164 } | 164 } |
165 | 165 |
166 /* Now, add the SCTP entry, if not disabled */ | 166 /* Now, add the SCTP entry, if not disabled */ |
167 #ifndef DISABLE_SCTP | 167 #ifndef DISABLE_SCTP |
168 if (peer->p_hdr.info.config.pic_flags.pro4 != PI_P4_TCP) { | 168 if ((!fd_g_config->cnf_flags.no_sctp) && (peer->p_hdr.info.config.pic_flags.pro4 != PI_P4_TCP)) { |
169 struct next_conn * new; | 169 struct next_conn * new; |
170 | 170 |
171 CHECK_MALLOC( new = malloc(sizeof(struct next_conn)) ); | 171 CHECK_MALLOC( new = malloc(sizeof(struct next_conn)) ); |
172 memset(new, 0, sizeof(struct next_conn)); | 172 memset(new, 0, sizeof(struct next_conn)); |
173 fd_list_init(&new->chain, new); | 173 fd_list_init(&new->chain, new); |