Skip to content

Commit

Permalink
Fixed potential endless loop condition if a connection was lost in th…
Browse files Browse the repository at this point in the history
…e middle of a transaction.
  • Loading branch information
cap60552 committed Oct 8, 2010
1 parent 48960ff commit bfe128e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sip2.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
*/

/**
* 2010.10.08
* Fixed a potential endless loop condition if a socket lost connection in the middle of a transaction.
*
* 2008.04.11
* Encorported a bug fix submitted by Bob Wicksall
*
Expand Down Expand Up @@ -670,7 +673,7 @@ function get_message ($message)

$this->_debugmsg('SIP2: Request Sent, Reading response');

while ($terminator != "\x0D") {
while ($terminator != "\x0D" && $nr !== FALSE) {
$nr = socket_recv($this->socket,$terminator,1,0);
$result = $result . $terminator;
}
Expand Down

0 comments on commit bfe128e

Please sign in to comment.