mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-05 22:29:05 +00:00
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:
parent
f58d607ad2
commit
c126732799
1 changed files with 2 additions and 1 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue