#2 bug in _rawreceive() causing loss of messages from server

ALL
closed-fixed
None
9
2003-01-06
2002-12-31
No

There's a bug in SmartIRC.php, in function
_rawreceive(): $rawdataar is an array of received
lines to be parsed.
// loop through our received messages
for ($i=0; $i < sizeof($rawdataar); $i++) {
$rawline = array_shift($rawdataar);
...
}

$i is incremented for each line, while
sizeof($rawdataar) is decremented (array_shift).

This causes a loss of half the lines :)

I suggest this:
while ( $rawline = array_shift($rawdataar) ) {
...
}

Regards
Joern "Wulf" Heissler

Discussion

  • Mirco Bauer

    Mirco Bauer - 2002-12-31

    Logged In: YES
    user_id=598557

    this bug is fixed in the 0.5.0 version which will be
    released very soon, till then this bug stays in pending state.

     
  • Mirco Bauer

    Mirco Bauer - 2002-12-31
    • assigned_to: nobody --> meebey
    • status: open --> pending-fixed
     
  • Mirco Bauer

    Mirco Bauer - 2002-12-31
    • priority: 5 --> 9
    • status: pending-fixed --> open-fixed
     
  • Mirco Bauer

    Mirco Bauer - 2003-01-02

    Logged In: YES
    user_id=598557

    all versions from 0.2.6 to 0.4.0 are infected by this bug

     
  • Mirco Bauer

    Mirco Bauer - 2003-01-06
    • status: open-fixed --> closed-fixed
     
  • Mirco Bauer

    Mirco Bauer - 2003-01-06

    Logged In: YES
    user_id=598557

    0.5.0 is released, so the bug is fixed and closed

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks