Hey everybody,
I have a problem in my sendto function from the ti ndk 2.24.
actDataSize = sendto(pObj->sockFd, (void*)dataBuf, dataSize, 0,(struct sockaddr*)&pObj->ipAddrRemote, pObj->ipAddrRemoteLen);
The ipAddrRemoteLen parameter has the value of 16. When i follow the code to the next file (socket.c).
After the line /* Verify Address Size */ the programm goto the error stage. And I have no idea why.
int NDK_sendto( SOCKET s, void *pbuf, int size, int flags, PSA pName, int len ) { FILEDESC *pfd = (FILEDESC *)s; int error = 0; INT32 txsize; llEnter(); /* Lock the fd - type must be SOCK / SOCK6 */ if ((fdint_lockfd(pfd, HTYPE_SOCK) == SOCKET_ERROR) #ifdef _INCLUDE_IPv6_CODE && (fdint_lockfd(pfd, HTYPE_SOCK6) == SOCKET_ERROR) #endif ) { llExit(); return( SOCKET_ERROR ); } /* Verify Address Size */ if (((pfd->Type == HTYPE_SOCK) && len != sizeof(SA_IN)) #ifdef _INCLUDE_IPv6_CODE || ((pfd->Type == HTYPE_SOCK6) && len != sizeof(SA_IN6)) #endif ) { error = EINVAL; goto sendto_error; }
Benedikt