mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-02-10 04:27:48 -05:00
raop: use pw_net utils to parse address
This commit is contained in:
parent
46e4a33f27
commit
bd4d61c83c
2 changed files with 11 additions and 22 deletions
|
|
@ -8,7 +8,7 @@
|
|||
#include <net/if.h>
|
||||
#include <errno.h>
|
||||
|
||||
static int pw_net_parse_address(const char *address, uint16_t port,
|
||||
static inline int pw_net_parse_address(const char *address, uint16_t port,
|
||||
struct sockaddr_storage *addr, socklen_t *len)
|
||||
{
|
||||
struct addrinfo hints;
|
||||
|
|
@ -38,7 +38,7 @@ static int pw_net_parse_address(const char *address, uint16_t port,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int pw_net_get_ip(const struct sockaddr_storage *sa, char *ip, size_t len, bool *ip4, uint16_t *port)
|
||||
static inline int pw_net_get_ip(const struct sockaddr_storage *sa, char *ip, size_t len, bool *ip4, uint16_t *port)
|
||||
{
|
||||
if (sa->ss_family == AF_INET) {
|
||||
struct sockaddr_in *in = (struct sockaddr_in*)sa;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue