dreijer
Joined: 16 Mar 2010 Posts: 7
|
Posted: Thu Jun 09, 2011 10:53 pm Post subject: Assertion when running miniupnp 1.5.20110527 on Windows |
|
|
miniupnp 1.5.20110527 causes an assertion in miniwget3() when it calls close() at the end of the function. It fails because you're using close() to close a SOCKET handle, when you're in fact supposed to be using closesocket() (which you seem to do correctly everywhere else).
The assertion is caused by the following check in close():
fh >= 0 && (unsigned)fh < (unsigned)_nhandle
In my case, _nhandle is 32 and fh is usually much larger.
To fix this, change line 384 in miniwget.c to:
closesocket(s); |
|