follow-up to osmo_sockaddr_from/to_octets()

Forgot to apply one code review change before merge.

Related: OS#5599
Change-Id: Id202f3fda51bea9149ab3462a2efe35cf08d8030
changes/85/27085/1
Neels Hofmeyr 10 months ago
parent cf7f7924d2
commit 1790f1763a
  1. 4
      src/socket.c

@ -1744,7 +1744,7 @@ int osmo_sockaddr_to_octets(uint8_t *dst, size_t dst_maxlen, const struct osmo_s
{
const void *addr;
size_t len;
switch (os->u.sin.sin_family) {
switch (os->u.sa.sa_family) {
case AF_INET:
addr = &os->u.sin.sin_addr;
len = sizeof(os->u.sin.sin_addr);
@ -1776,7 +1776,7 @@ int osmo_sockaddr_from_octets(struct osmo_sockaddr *os, const void *src, size_t
*os = (struct osmo_sockaddr){0};
switch (src_len) {
case sizeof(os->u.sin.sin_addr):
os->u.sin.sin_family = AF_INET;
os->u.sa.sa_family = AF_INET;
addr = &os->u.sin.sin_addr;
len = sizeof(os->u.sin.sin_addr);
break;

Loading…
Cancel
Save