libimobiledevice / libusbmuxd

A client library to multiplex connections from and to iOS devices
https://libimobiledevice.org
GNU Lesser General Public License v2.1
574 stars 270 forks source link

fixed usbmuxd_send case dead-loop on windows #124

Closed sandin closed 2 years ago

sandin commented 2 years ago

On windows, errno will not be set when socket send failed, see https://docs.microsoft.com/en-us/windows/win32/winsock/error-codes-errno-h-errno-and-wsagetlasterror-2

mexmer commented 2 years ago

redefining errno is bad practice, you should never ever do that.

you should put WSAGetLastError() to proper spots in code instead

nikias commented 2 years ago

Yes there are a few ideas here: https://github.com/libimobiledevice/libimobiledevice-glue/issues/14