From: <cha...@us...> - 2008-09-29 15:34:07
|
Revision: 545 http://sipp.svn.sourceforge.net/sipp/?rev=545&view=rev Author: charlespwright Date: 2008-09-29 15:33:30 +0000 (Mon, 29 Sep 2008) Log Message: ----------- Fix: Decrement pending_messages when a socket is invalidated (provided by Martin H. VanLeeuwen. Modified Paths: -------------- sipp/trunk/sipp.cpp Modified: sipp/trunk/sipp.cpp =================================================================== --- sipp/trunk/sipp.cpp 2008-09-26 12:22:47 UTC (rev 544) +++ sipp/trunk/sipp.cpp 2008-09-29 15:33:30 UTC (rev 545) @@ -2925,6 +2925,12 @@ pollfiles[pollidx] = pollfiles[pollnfds]; sockets[pollidx] = sockets[pollnfds]; sockets[pollidx]->ss_pollidx = pollidx; + sockets[pollnfds] = NULL; + + if (socket->ss_msglen) + { + pending_messages--; + } } void sipp_close_socket (struct sipp_socket *socket) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |