mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-21 20:43:50 +01:00
grnc_sock_ip: implement SOCK_AUX_SET_LOCAL
This commit is contained in:
parent
6e1fb4c3aa
commit
2197f9c16a
@ -223,6 +223,13 @@ ssize_t sock_ip_send_aux(sock_ip_t *sock, const void *data, size_t len,
|
||||
}
|
||||
memcpy(&local, &sock->local, sizeof(local));
|
||||
}
|
||||
#if IS_USED(MODULE_SOCK_AUX_LOCAL)
|
||||
/* user supplied local endpoint takes precedent */
|
||||
if ((aux != NULL) && (aux->flags & SOCK_AUX_SET_LOCAL)) {
|
||||
local = aux->local;
|
||||
aux->flags &= ~SOCK_AUX_SET_LOCAL;
|
||||
}
|
||||
#endif
|
||||
if (remote == NULL) {
|
||||
/* sock can't be NULL at this point */
|
||||
memcpy(&rem, &sock->remote, sizeof(rem));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user