VirtualBox

Changeset 15964 in vbox


Ignore:
Timestamp:
Jan 15, 2009 12:52:20 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
41612
Message:

crOpenGL: revert 41400, +add more clear comments

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/OpenGL/util/vboxhgcm.c

    r15818 r15964  
    906906    if (!g_crvboxhgcm.initialized) return;
    907907
    908     /* Connection count would be changed while we disconnect link, also the array of connections would be shifted*/
     908    /* Connection count would be changed in calls to crNetDisconnect, so we have to store original value.
     909     * Walking array backwards is not a good idea as it could cause some issues if we'd disconnect clients not in the
     910     * order of their connection.
     911     */
    909912    cCons = g_crvboxhgcm.num_conns;
    910913    for (i=0; i<cCons; i++)
    911914    {
    912         crNetDisconnect(g_crvboxhgcm.conns[i]);
     915        /* Note that [0] is intended, as the connections array would be shifted in each call to crNetDisconnect */
     916        crNetDisconnect(g_crvboxhgcm.conns[0]);
    913917    }
    914918    CRASSERT(0==g_crvboxhgcm.num_conns);
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette