extmod/modlwip: Fix setting of IP option SOF_BROADCAST.
Follow up to 25b89cbe94
.
Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
parent
3637252b7b
commit
8dbdac8c82
@ -1382,9 +1382,9 @@ STATIC mp_obj_t lwip_socket_setsockopt(size_t n_args, const mp_obj_t *args) {
|
|||||||
mp_int_t val = mp_obj_get_int(args[3]);
|
mp_int_t val = mp_obj_get_int(args[3]);
|
||||||
// Options are common for UDP and TCP pcb's.
|
// Options are common for UDP and TCP pcb's.
|
||||||
if (val) {
|
if (val) {
|
||||||
ip_set_option(socket->pcb.tcp, SOF_REUSEADDR);
|
ip_set_option(socket->pcb.tcp, opt);
|
||||||
} else {
|
} else {
|
||||||
ip_reset_option(socket->pcb.tcp, SOF_REUSEADDR);
|
ip_reset_option(socket->pcb.tcp, opt);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user