diff --git a/daemon/media_socket.c b/daemon/media_socket.c index a28a7b57f..7ab5f04c7 100644 --- a/daemon/media_socket.c +++ b/daemon/media_socket.c @@ -665,21 +665,22 @@ static void __insert_local_intf_addr_type(struct intf_address *addr, struct loca l = t_list_prepend(l, intf); t_hash_table_replace(__local_intf_addr_type_hash, addr, l); } -int is_local_endpoint(const struct intf_address *addr, unsigned int port) { + +bool is_local_endpoint(const struct intf_address *addr, unsigned int port) { const struct local_intf *intf; const struct intf_spec *spec; __auto_type l = t_hash_table_lookup(__local_intf_addr_type_hash, addr); if (!l) - return 0; + return false; while (l) { intf = l->data; spec = intf->spec; if (spec->port_pool.min <= port && spec->port_pool.max >= port) - return 1; + return true; l = l->next; } - return 0; + return false; } static void release_reserved_port(struct port_pool *pp, ports_q *, unsigned int port); diff --git a/include/media_socket.h b/include/media_socket.h index c063f8935..c2bb00c9f 100644 --- a/include/media_socket.h +++ b/include/media_socket.h @@ -294,7 +294,7 @@ struct logical_intf *get_logical_interface(const str *name, sockfamily_t *fam, i struct local_intf *get_interface_address(const struct logical_intf *lif, sockfamily_t *fam); struct local_intf *get_any_interface_address(const struct logical_intf *lif, sockfamily_t *fam); void interfaces_exclude_port(endpoint_t *); -int is_local_endpoint(const struct intf_address *addr, unsigned int port); +bool is_local_endpoint(const struct intf_address *addr, unsigned int port); struct socket_port_link get_specific_port(unsigned int port, struct intf_spec *spec, const str *label);