Changeset 21127 in vbox for trunk/src/VBox/HostServices/SharedOpenGL
- Timestamp:
- Jul 1, 2009 2:25:14 PM (15 years ago)
- Location:
- trunk/src/VBox/HostServices/SharedOpenGL/crserverlib
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_context.c
r15532 r21127 140 140 for (pos = 0; pos < CR_MAX_CONTEXTS; ++pos) 141 141 if (cr_server.curClient->contextList[pos] == ctx) 142 { 142 143 cr_server.curClient->contextList[pos] = 0; 144 break; 145 } 146 CRASSERT(pos<CR_MAX_CONTEXTS); 143 147 } 144 148 } -
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_stream.c
r17964 r21127 116 116 int i, j; 117 117 int32_t pos; 118 119 crDebug("Deleting client %p (%d msgs left)", client, 120 118 CRClient *oldclient = cr_server.curClient; 119 120 crDebug("Deleting client %p (%d msgs left)", client, crNetNumMessages(client->conn)); 121 121 122 122 #if 0 … … 142 142 } 143 143 } 144 145 cr_server.curClient = client; 146 147 /* Destroy any windows created by the client */ 148 for (pos = 0; pos<CR_MAX_WINDOWS && client->windowList[pos]; pos++) 149 { 150 cr_server.dispatch.WindowDestroy(client->windowList[pos]); 151 } 152 153 /* Check if we have context(s) made by this client left, could happen if client side code is lazy */ 154 for (pos = 0; pos<CR_MAX_CONTEXTS && client->contextList[pos]; pos++) 155 { 156 cr_server.dispatch.DestroyContext(client->contextList[pos]); 157 } 158 159 cr_server.curClient = oldclient; 144 160 145 161 /* remove from the run queue */ … … 179 195 180 196 crNetFreeConnection(client->conn); 181 182 /* Destroy any windows created by the client */183 for (pos = 0; pos<CR_MAX_WINDOWS && client->windowList[pos]; pos++)184 {185 cr_server.dispatch.WindowDestroy(client->windowList[pos]);186 }187 188 /* Check if we have context(s) made by this client left, could happen if client side code is lazy */189 for (pos = 0; pos<CR_MAX_CONTEXTS && client->contextList[pos]; pos++)190 {191 cr_server.dispatch.DestroyContext(client->contextList[pos]);192 }193 197 194 198 crFree(client); -
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_window.c
r15532 r21127 119 119 } 120 120 121 122 #define EXTRA_WARN 0 121 void crServerCheckCurrentCtxWindowCB(unsigned long key, void *data1, void *data2) 122 { 123 CRContext *crCtx = (CRContext *) data1; 124 GLint window = *(GLint*)data2; 125 126 (void) key; 127 } 123 128 124 129 void SERVER_DISPATCH_APIENTRY … … 130 135 mural = (CRMuralInfo *) crHashtableSearch(cr_server.muralTable, window); 131 136 if (!mural) { 132 #if EXTRA_WARN133 137 crWarning("CRServer: invalid window %d passed to WindowDestroy()", window); 134 #endif135 138 return; 136 139 } … … 143 146 for (pos = 0; pos < CR_MAX_WINDOWS; ++pos) 144 147 if (cr_server.curClient->windowList[pos] == window) 148 { 145 149 cr_server.curClient->windowList[pos] = 0; 150 break; 151 } 152 CRASSERT(pos<CR_MAX_WINDOWS); 146 153 147 154 if (cr_server.curClient->currentMural == mural) … … 152 159 } 153 160 161 if (cr_server.currentWindow = window) 162 { 163 cr_server.currentWindow = -1; 164 } 165 166 crHashtableWalk(cr_server.contextTable, crServerCheckCurrentCtxWindowCB, &window); 154 167 crHashtableDelete(cr_server.pWindowCreateInfoTable, window, crServerCreateInfoDeleteCB); 155 /* @todo, can't issue it cause we could have context(s) referencing this one left */ 156 /*crHashtableDelete(cr_server.muralTable, window, crFree);*/ 168 crHashtableDelete(cr_server.muralTable, window, crFree); 157 169 } 158 170
Note:
See TracChangeset
for help on using the changeset viewer.