Changeset 1136:140450615773 in freeDiameter for libfdcore/server.c
- Timestamp:
- May 16, 2013, 3:56:31 PM (11 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libfdcore/server.c
r1122 r1136 342 342 int empty_conf_ep = FD_IS_LIST_EMPTY(&fd_g_config->cnf_endpoints); 343 343 344 struct fd_list filter_list = FD_LIST_INITIALIZER(filter_list);345 346 344 /* SCTP */ 347 345 if (!fd_g_config->cnf_flags.no_sctp) { … … 449 447 } 450 448 451 /* we will filter this list and create endpoints with port information */452 #ifdef ADDRESS_AVP_INCLUDE_PORT453 fd_list_move_end(&filter_list, &fd_g_config->cnf_endpoints);454 while (!FD_IS_LIST_EMPTY(&filter_list)) {455 struct fd_endpoint * ep = (struct fd_endpoint *)filter_list.next;456 in_port_t * port = NULL;457 fd_list_unlink(&ep->chain);458 459 switch( ep->sa.sa_family ) {460 case AF_INET: port = &ep->sin.sin_port; break;461 case AF_INET6: port = &ep->sin6.sin6_port; break;462 }463 464 if (port) {465 if (fd_g_config->cnf_port) {466 *port = htons(fd_g_config->cnf_port);467 CHECK_FCT(fd_ep_add_merge( &fd_g_config->cnf_endpoints, &ep->sa, sSAlen(&ep->sa), ep->flags ));468 }469 if (fd_g_config->cnf_port_tls) {470 *port = htons(fd_g_config->cnf_port_tls);471 CHECK_FCT(fd_ep_add_merge( &fd_g_config->cnf_endpoints, &ep->sa, sSAlen(&ep->sa), ep->flags ));472 }473 }474 free(ep);475 }476 #endif /* ADDRESS_AVP_INCLUDE_PORT */477 478 449 { 479 450 char * buf = NULL;
Note: See TracChangeset
for help on using the changeset viewer.