miniupnp.tuxfamily.org Forum Index miniupnp.tuxfamily.org
The forum about miniupnp and libnatpmp
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Assertion when running miniupnp 1.5.20110527 on Windows

 
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> miniupnpc Bugs
View previous topic :: View next topic  
Author Message
dreijer



Joined: 16 Mar 2010
Posts: 7

PostPosted: Thu Jun 09, 2011 10:53 pm    Post subject: Assertion when running miniupnp 1.5.20110527 on Windows Reply with quote

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);
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1469

PostPosted: Fri Jun 10, 2011 4:09 pm    Post subject: Reply with quote

Thank you. Will be fixed in next release.

edit : should be fixed in miniupnpc-1.5.20110618.tar.gz
_________________
Main miniUPnP author.
http://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> miniupnpc Bugs All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP
© 2007 Thomas Bernard, author of MiniUPNP.