Browse Source

MT#55283 update function to bool

Change-Id: I290fc3b803db4ac0b5d95ef9609c158dff303af5
pull/1981/head
Richard Fuchs 5 months ago
parent
commit
3118b1e258
2 changed files with 6 additions and 5 deletions
  1. +5
    -4
      daemon/media_socket.c
  2. +1
    -1
      include/media_socket.h

+ 5
- 4
daemon/media_socket.c View File

@ -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);


+ 1
- 1
include/media_socket.h View File

@ -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);


Loading…
Cancel
Save