drivers: modem: Fix UDP management in BG96 modem

Fix UDP test in connect and send to be able to send in TCP

Signed-off-by: Guillaume Paquet <guillaume.paquet@smile.fr>
This commit is contained in:
Guillaume Paquet 2021-01-14 14:52:42 +01:00 committed by Jukka Rissanen
parent a688b4da73
commit 6e7a2ecf1e

View file

@ -556,7 +556,7 @@ static ssize_t offload_sendto(void *obj, const void *buf, size_t len,
}
/* UDP is not supported. */
if (sock->ip_proto != IPPROTO_UDP) {
if (sock->ip_proto == IPPROTO_UDP) {
errno = ENOTSUP;
return -1;
}
@ -747,7 +747,7 @@ static int offload_connect(void *obj, const struct sockaddr *addr,
}
/* UDP is not supported. */
if (sock->ip_proto != IPPROTO_UDP) {
if (sock->ip_proto == IPPROTO_UDP) {
errno = ENOTSUP;
return -1;
}