Hi all,

I have the problem about the socket. This socket set some parameters from SSL. It worked fine for the first time binding. Then, I restarted the application, and the socket cannot bind anymore and throw an errno 142.

When running it on FP1 device, it works perfectly. But on FP2 device (E72), it failed on the second binding even though I restarted the application. E72 device is using the latest firmware. Is this the FP2 device problem?

Below is the brief of my code:

Initialize and binding code
Code:
m_socket = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);

...

if(bind(m_socket, (struct sockaddr*)&bindaddr, sizeof(bindaddr)) < 0)
{
	// Print the errno;
}

...

while (connect(m_socket, (struct sockaddr*)&sockaddr, sizeof(struct sockaddr_in)) < 0) {
        // return if error;
}
Release code
Code:
shutdown(m_socket, 2);
close(m_socket);
I have been stuck in this for a long time. Please help me.

Thanks a lot