CVS Update: cr (branch: trunk)
Robert Ellison <[email protected]> Tue, 11 Apr 2006 01:06:51 -0700
| Newsgroups | gmane.comp.graphics.chromium.cvs |
|---|---|
| Message-ID | <[email protected]> |
CVSROOT: /cvsroot/chromium Module name: cr Repository: cr/util/ Changes by: [email protected].(none) 06/04/11 01:06:51 Log message: Fixed a bug that sometimes caused lost connections in a crserver to corrupt connections that were still up, if "sdp" or "tcpip" connection types were used for a client. These two connection types can, during normal use, detect that a connection has gone dead; if that happens, they disconnect the connection and set the conn->type field to CR_NO_CONNECTION to indicate the lost connection. Later, the crserver detects the lost client, and explicitly calls conn->Disconnect(), which attempts to disconnect the connection a second time. This is mostly benign, except if the connection module uses the conn->index field to keep track of the connection's entry in a private array. In this case, the conn->index field, which is invalid since the connection has already been disconnected, may still point to a more recently created and valid entry. The connection for the newly created entry is then disrupted. The connection itself is not lost, but the record of its socket file descriptor is, so the module may no longer receive incoming data. This can cause apparent hangs and/or spins. The fix affects both of the modules that use the CR_NO_CONNECTION indicator as an internal flag; these modules will now detect when a dead connection is being formally cleaned up, and will not corrupt their internal data structures when this happens. Modified files: cr/util/: sdp.c tcpip.c Revision Changes Path 1.19 +11 -0 cr/util/sdp.c 1.82 +11 -0 cr/util/tcpip.c ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642