Browse Source

MT#55283 convert endpoint_parse_port_any to bool

Change-Id: Iede44b1652ac749d0e0fbd31acb0e42bca8641c3
pull/1910/head
Richard Fuchs 10 months ago
parent
commit
fbcdaaee4a
2 changed files with 4 additions and 4 deletions
  1. +1
    -1
      daemon/call_interfaces.c
  2. +3
    -3
      lib/socket.h

+ 1
- 1
daemon/call_interfaces.c View File

@ -284,7 +284,7 @@ static bool streams_parse_func(char **a, void **ret, void *p) {
SP_SET(sp, RECV); SP_SET(sp, RECV);
sp->protocol = &transport_protocols[PROTO_UNKNOWN]; sp->protocol = &transport_protocols[PROTO_UNKNOWN];
if (endpoint_parse_port_any(&sp->rtp_endpoint, a[0], atoi(a[1])))
if (!endpoint_parse_port_any(&sp->rtp_endpoint, a[0], atoi(a[1])))
goto fail; goto fail;
sp->index = ++(*i); sp->index = ++(*i);


+ 3
- 3
lib/socket.h View File

@ -309,11 +309,11 @@ INLINE sockfamily_t *get_socket_family_enum(enum socket_families i) {
return NULL; return NULL;
return __get_socket_family_enum(i); return __get_socket_family_enum(i);
} }
INLINE int endpoint_parse_port_any(endpoint_t *e, const char *p, unsigned int port) {
INLINE bool endpoint_parse_port_any(endpoint_t *e, const char *p, unsigned int port) {
if (port > 0xffff) if (port > 0xffff)
return -1;
return false;
e->port = port; e->port = port;
return sockaddr_parse_any(&e->address, p) ? 0 : -1;
return sockaddr_parse_any(&e->address, p);
} }
// address (ip) required // address (ip) required
INLINE int endpoint_parse_any_full(endpoint_t *d, const char *s) { INLINE int endpoint_parse_any_full(endpoint_t *d, const char *s) {


Loading…
Cancel
Save