Changeset 1122:d4371b7aa0ff in freeDiameter for libfdcore/endpoints.c
- Timestamp:
- May 14, 2013, 7:01:31 PM (11 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libfdcore/endpoints.c
r1119 r1122 94 94 return 0; 95 95 } 96 96 97 97 /* remove the ACCEPTALL flag */ 98 98 flags &= ~EP_ACCEPTALL; … … 135 135 break; 136 136 } 137 if (*ep_port < *port) 138 continue; 137 if (*ep_port < *port) { 138 cmp = -1; 139 continue; 140 } 139 141 if (*ep_port > *port) 140 142 cmp = 1; … … 217 219 while ((li_out != list) && (li_ex != exclude_list)) { 218 220 int cmp; 219 221 in_port_t * port_out, *port_ex; 222 220 223 out = (struct fd_endpoint *)li_out; 221 224 ex = (struct fd_endpoint *)li_ex; … … 235 238 case AF_INET: 236 239 cmp = memcmp(&out->sin.sin_addr, &ex->sin.sin_addr, sizeof(struct in_addr)); 240 port_out = &out->sin.sin_port; 241 port_ex = &ex->sin.sin_port; 237 242 break; 238 243 case AF_INET6: 239 244 cmp = memcmp(&out->sin6.sin6_addr, &ex->sin6.sin6_addr, sizeof(struct in6_addr)); 245 port_out = &out->sin6.sin6_port; 246 port_ex = &ex->sin6.sin6_port; 240 247 break; 241 248 default: … … 250 257 li_ex = li_ex->next; 251 258 continue; 259 } 260 261 if (port_out && (*port_out != 0) && (*port_ex != 0)) { 262 if (*port_out < *port_ex) { 263 li_out = li_out->next; 264 continue; 265 } 266 if (*port_out > *port_ex) { 267 li_ex = li_ex->next; 268 continue; 269 } 252 270 } 253 271 … … 298 316 } 299 317 300 CHECK_MALLOC_DO( fd_sa_dump _node_serv( FD_DUMP_STD_PARAMS, &ep->sa, NI_NUMERICHOST | NI_NUMERICSERV ), return NULL);318 CHECK_MALLOC_DO( fd_sa_dump( FD_DUMP_STD_PARAMS, &ep->sa, NI_NUMERICHOST | NI_NUMERICSERV ), return NULL); 301 319 CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "{%s%s%s%s%s}", 302 320 (ep->flags & EP_FL_CONF) ? "C" : "-",
Note: See TracChangeset
for help on using the changeset viewer.