wireless: gs2200m: Add support for UDP connect in gs2200m_main.c

NOTE: gs2200m driver needs to be updated as well

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
This commit is contained in:
Masayuki Ishikawa 2020-04-14 17:02:49 +09:00 committed by Alin Jerpelea
parent f58d607ad2
commit c126732799

View File

@ -650,6 +650,7 @@ static int connect_request(int fd, FAR struct gs2200m_s *priv,
ntohs(addr.sin_port));
cmsg.cid = 'z'; /* set to invalid */
cmsg.type = usock->type;
ret = ioctl(priv->gsfd, GS2200M_IOC_CONNECT,
(unsigned long)&cmsg);
@ -744,7 +745,7 @@ static int sendto_request(int fd, FAR struct gs2200m_s *priv,
/* For UDP, addlen must be provided */
if (usock->type == SOCK_DGRAM)
if (usock->type == SOCK_DGRAM && CONNECTED != usock->state)
{
if (req->addrlen == 0)
{